lab1 - R-FILE TEMPLATE FOR GEO 503 LABS E-H Enki Yoo Copy...

Info icon This preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 # %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% # R-FILE TEMPLATE FOR GEO 503 LABS # # E.-H. Enki Yoo # # Copy this file into your working directory C:\Workspace, rename it as, say, lab01.r, and use it as a template (i.e., append the # From R, open this file using the R Editor. # Use a single sharp sign # to include comments/answers in your R-file. # Anything after (to the right of) # is treated as a comment, i.e., not considered a R command. # # You should first try to answer each Lab question in the R command # window. Once you have decided on the correct R syntax, copy that command in the R-file for the corresponding Lab. # # For each Lab assignment, you need to turn in your R-file in digital format as an E-mail attachment to: # [email protected] # # *** EACH TEAM SHOULD ONLY TURN IN A SINGLE R-FILE *** # # Good luck. # ##Page 1/2 ## Question #2 print('************************ Question #2 ******************************') print('See code') print('') ##Code #lab1<-read.table("ithaca.dat",header=F,skip=6) #colnames(lab1)<-c('Day','Precip','Tmin','Tmax') #lab1['Day']->day #lab1['Precip']->pre #lab1['Tmin']->tmin #lab1['Tmax']->tmax ## Question #a print('************************ Question #a ******************************') print('Dimension: 31*4') print('Sample Data: 31*4') print('Variables: 4') print('') ##Code #dim(lab1) ## Question #b print('************************ Question #b ******************************') print('Average precipitation: 0.129') print('Minimum daily Temperature: 19')
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern