[R] Help with study guide for R exam

343GS robbiesqp at gmail.com
Thu Dec 8 20:34:49 CET 2011


Hi there. I have a final exam coming up in a class that is heavily based in
the R programming language. The teacher has provided to us a few questions
to study in preparation for the exam. I was looking to see if anyone could
help answer any or all of these questions. Your help is extremely
appreciated! Thank you! - Spark


1.	Write the first 6 lines of a hypothetical external data file named infile
that will be completely read by the following  R command:

mydata <- read.table(“infile”, skip=3, header=FALSE, sep=’,’,
colClasses=c(‘character’, rep(‘numeric’, 3) ) )

2.	Describe and fix the error in the following R command.

if(mydata[,2]=2) {mydata[,2]=mydata[,2]*2}

3.	Write 1 or more R statements that will calculate the mean, sum, and
standard deviation of the numeric columns of mydata described in question
#1.

4.	What type of data structure is produced by the R command in question #1?

5.	What type of data structure is returned by the which statement in the
following R command?

myresult <- mydata[which(mydata[,1]>

6.	Be able to fully describe the characteristcs and advantages of the
following data structures:

vector, dataframe, matrix, list

7.	Be able to describe the following data types:

character, numeric, logical, date, factor

8.	Describe several advantages and disadvantages to the R open-source
development process (ie. of the R system development)

9.	What is an R package?

10.	What makes R different from a language like Fortran or C?


--
View this message in context: http://r.789695.n4.nabble.com/Help-with-study-guide-for-R-exam-tp4173951p4173951.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list