Continue....R-commands
3. To enter data in a range[START-END]
Example
> x=c(1:80) [enter data from 1 to 80 associated with a variable x]
> x [to read entered data]
[1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
[26] 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
[51] 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
[76] 76 77 78 79 80
Ex. enter data from 1-10 and than 2
> x=c(1:10,2)
> x
[1] 1 2 3 4 5 6 7 8 9 10 2
4. To add/remove/change entered data x
> data.entry(x)
> x
[1] 1 2 3 4 5 6 7 8 9 10 NA [we remove 2 from x]
> de(x) [command work same as data.entry]
>x
[1] 1 2 3 4 5 6 7 8 9 10 NA
5. To enter data in a sequence with specified interval:
syntex a= seq(start, end, interval)
Ex. a=seq(1, 100, 0.5)
3. To enter data in a range[START-END]
Example
> x=c(1:80) [enter data from 1 to 80 associated with a variable x]
> x [to read entered data]
[1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
[26] 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
[51] 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
[76] 76 77 78 79 80
Ex. enter data from 1-10 and than 2
> x=c(1:10,2)
> x
[1] 1 2 3 4 5 6 7 8 9 10 2
4. To add/remove/change entered data x
> data.entry(x)
> x
[1] 1 2 3 4 5 6 7 8 9 10 NA [we remove 2 from x]
> de(x) [command work same as data.entry]
>x
[1] 1 2 3 4 5 6 7 8 9 10 NA
5. To enter data in a sequence with specified interval:
syntex a= seq(start, end, interval)
Ex. a=seq(1, 100, 0.5)
No comments:
Post a Comment