Programming and Statistics in R Exercise 4
Programming and Statistics in R Exercise 4
Exercise 4
This sheet is concerned with usage issues.
ls()
objects()
search()
attach(stackloss)
search()
write.table(stackloss,"test.dat")
write.csv(stackloss,"test.csv")
temp.df <- read.csv("test.csv")
Where is this file situated on the file system? Examine the default
output format of write.table by viewing the file with your favourite
text editor.
5. Get some help
?mean
help.start()
sin(matrix(0,nrow=5000,ncol=5000))
Use the escape key to interrupt. Note that this might take some time
to return control to the console.
1
Problems
1. Generate a matrix of size n p. Use the function as.data.frame to
coerce the matrix to a data frame. Which object requires more storage
space?