R: Entering Data
Code Only
|
Code with Rweb Output
|
|
### Enter 4 numbers into R, then save the numbers as data
data=c(2,4,6,8) data ### Create a list of numbers 1 through 5, save as y y=1:5 y ### Create a sequence of numbers from 1 through 3, with increments of ### 0.5, save as z z=seq(1,3,by=0.5) z |
> ### Enter 4 numbers into R, then save the numbers as data
> data=c(2,4,6,8) > data [1] 2 4 6 8 > > ### Create a list of numbers 1 through 5, save as y > y=1:5 > y [1] 1 2 3 4 5 > > ### Create a sequence of numbers from 1 through 3, with increments of > ### 0.5, save as z > z=seq(1,3,by=0.5) > z [1] 1.0 1.5 2.0 2.5 3.0 |

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
