Installing R-Studio on Windows 7 - Albany

Installing R-Studio on Windows 7 - Albany

Installing R-Studio on Windows 7 / Mac OS 10.6 (+) Goto http://www.rstudio.com/ Follow the link and then choose the desktop application Download the R base package (see also next page) & R-Studio Follow the instructions of the Installer Then download & install RStudio First download & install the R base package

Follow the link ATM 315 Environmental Statistics Course 2014-01-23 1 Installing R from the CRAN project pages www.cran.us.r-project.org ATM 315 Environmental Statistics Course 2014-01-23

2 A first session with R-Studio (Windows 7) Memory window: list of objects Currently in the memory for use Multi-function Window Command-line window ATM 315 Environmental Statistics Course (for file browsing, plotting, Software package management

2014-01-23 3 A first session with R-Studio (Windows 7) window Command-line Your files in the directory Menu list for the R-Studio: (1) Set your work path for the Session (and current sessions) I suggest for this course: Create your atm315course directory

with 3 sub-directories: (1) scripts (2) data (3) figures R-scripts (programs) are plain text files with ending .R ( NOT formatted Word documents) ATM 315 Environmental Statistics Course 2014-01-23 4 Our first R-session

We first set the working directory for the session (in menu session, choose set working directory) Or type into the command line window ( in windows it will start with C:/Users), MAC it will start with /Users/) setwd("C:/Users/oe524132/WORK/111TEACHING/R-course") Your working directory should have three subdirectories: Subdirectory scripts Subdirectory data Collection of datasets (input data and output data)

Contains the scripts. Scripts are text files ending .R They contain program codes that can be executed Subdirectory figures We will collect our plots in this directory 5 Our first R-session

With Windows File Browser tool / Mac Finder go into any directory of your choice Create a new folder (named e.g. R-Course). Then enter the folder and Create 3 new folders in there: scripts , data, figures NEXT start R-Studio and set the working directory for the session (in menu session, choose set working directory) Or type into the command line window (in windows it will start with C:/Users), MAC it will start with /Users/)

In my case the directory path in set setwd("C:/Users/oe524132/WORK/111TEACHING/R-course") (your path name will differ of course on your system) source(scripts/hadcrut4.R) NOTE: R commands and scripts are case sensitve (i.e. the function call Source(scripts/hadcrut4.R) doesnt work! 6 Our first R-session We first set the working directory for the session (in menu session, choose set

working directory) Or type into the command line window ( in windows it will start with C:/Users), MAC it will start with /Users/) setwd("C:/Users/oe524132/WORK/111TEACHING/R-course") source(scripts/hadcrut4.R) NOTE: R commands and scripts are case sensitve (i.e. the function call Source(scripts/hadcrut4.R) doesnt work! 7 Our first R-session: data types and objects example001.R

8 Our first R-session: data types and objects example001.R example001.R 9 Our first R-session: data types and objects example001.R

10 Our first R-session: data types and objects example001.R 11 Our first R-session HADCRUT4 global annual mean

temperature anomalies Global warming stalled? Global warming trend A good habit: give reference /credit to the data source and date of retrieval. Acknowledge the developers of the data sources: Morice, C. P., J. J. Kennedy, N. A. Rayner, and P. D. Jones (2012), J. Geophys. Res., 117, D08101, doi:10.1029/2011JD017187 . Data retrieved from http://www.metoffice.gov.uk/hadobs/hadcrut4/data/current/download.html 2014-01-20, [Version HadCRUT.4.2.0.0 (file HadCRUT.4.2.0.0.annual_ns_avg.txt)] 12 Our first R-session

script: hadcrut4.R 13 Our first R-session: Global mean temp. example001.R hadcrut4.R 14 NOTES

15

Recently Viewed Presentations

  • EXTERNALISING DISORDERS Chapter D.2 OPPOSITIONAL DEFIANT DISORDER Katie

    EXTERNALISING DISORDERS Chapter D.2 OPPOSITIONAL DEFIANT DISORDER Katie

    The result is that the parent may in the end give in, reinforcing the child's negative behaviours. This paradoxical "reward" of a child's negative behaviour may both increase and maintain oppositional behaviours and is the specific target of therapeutic interventions...
  • Programming Languages & Software Engineering

    Programming Languages & Software Engineering

    Why the Single-GUI-Thread Rule? Simpler programming. No datarace nor deadlock on GUI objects. Less overhead. No locking when accessing GUI objects. A single event queue can dispatch UI events. Easy event processing, program comprehension, and testing
  • WCA-B343 Unified Modern Device Management with Microsoft ...

    WCA-B343 Unified Modern Device Management with Microsoft ...

    WCA-B343 - Unified Modern Device Management with Microsoft System Center 2012 SP1 Configuration Manager Integrated with Windows Intune. WCA-B304 - Application Delivery with Microsoft System Center 2012 SP1 Configuration Manager and Windows Intune
  • <Title> American Society of Access Professionals FOIA/Privacy ...

    <Title> American Society of Access Professionals FOIA/Privacy ...

    Includes log-keeping and auditing activities Recovery -- When all else fails, be prepared to pull out backup media and restore from scratch, or cut to backup servers and net connections, or fall back on a disaster recovery facility. Arguably, this...
  • VoIP - UMIACS

    VoIP - UMIACS

    Flexibility in media streams, participants, "ownership"; service not pre-defined at call setup Multiple media per call, differing (and very wide range of) bandwidths Dynamic reconfigurability during call Potential for multicast conferencing, streaming Implications Call admission control becomes more complex Much...
  • Cattle Parasites - Amazon S3

    Cattle Parasites - Amazon S3

    "Strongyles or strongyle-type eggs" In general, treated the same Digestive tract May compete for nutrients, cause tissue damage, or suck blood (anemia) Strongyles Trichostrongyles Ostertagia ostertagi Recognized as the most important nematode parasite of cattle raised in temperate climates Can...
  • &#x27;Men Should Weep&#x27; Ena Lamont Stewart - Mrs Ruxton

    'Men Should Weep' Ena Lamont Stewart - Mrs Ruxton

    Throughout the play, Ena Lamont Stewart uses humour to leaven the tragedy of the Morrison family's situation. Act 2, Scene 1 is a good example of the way the mood in the play shifts between . comedy. and . traged....
  • ADVANCES ON SHEAR STRENGTH AND BEHAVIOR OF BRIDGE

    ADVANCES ON SHEAR STRENGTH AND BEHAVIOR OF BRIDGE

    Introduction. 1. Advantages of corrugated web plates. They have much higher buckling strengths. The own significant out-of-plane stiffness. They act as continuous stiffeners, so no need to use stiffeners.