Write the script a at the blinking cursor enter the

Info icon This preview shows pages 4–8. Sign up to view the full content.

View Full Document Right Arrow Icon
2. Write the Script a. At the blinking cursor, enter the following text exactly as below in the text box, paying close attention to spaces, capital letters, and symbols. 3. Save the Script a. Click on the disc icon to save your script.
Image of page 4

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

View Full Document Right Arrow Icon
b. Choose the R folder, and name your file hello . Click Save. You can close out the window where you composed your script once it is saved. 3 Execute the Script: For this part of the lab, you will be working in the console window of RStudio. In order to execute the script, you will be selecting the source file and then executing a command.
Image of page 5
1. At the top of the RStudio screen, click on “Code.” 2. Choose “Source File...” 3. From the R folder, select “Hello” and click “Open.” 4. In the console window , at the prompt, enter Hello(“Your name”), entering your own name between the quotation marks. For example, enter hello(“Bob”) 5. You should see a statement appear. Enter that statement on the line provided. ____” hello Jonathan” _____________________________________ Congratulations! You have successfully written and executed a script in R! 4 Modify a Script, Part 1 – You will now go back into your original script, modify it, and observe the different results that you obtain when running the program. 1. Open your original file by clicking on “File” and then “Open File.” Select hello.R from the R folder by selecting it and clicking “Open.”
Image of page 6

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

View Full Document Right Arrow Icon
( 2. Using your mouse to navigate, modify your original script in the following way: 3. Save your changes using the file icon, using the same process as before. 5 Execute Your Modified Script – Following the same steps as above: 1. Click on “Code” and then “Source File.” Open the R folder and select the file you would like to run, and then click “Open.” 2. At the prompt in the console window, execute your script by typing Hello(“YourName”). For example, Hello(“Bob”)
Image of page 7
Image of page 8
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