Basics of R
Loading datasets Suppose you want to load the foo dataset. If the dataset is in I an existing R package, load the package and type data(foo) I.RData format, type load(foo) I.txt or other text formats, type read.table("foo.txt") I.csv format, type read.csv("foo.txt") I.dta (Stata) format, load the foreign library and type read.dta("foo.dta") To save objects into these formats, use the …
Tag:
r sample data sets