R is built around an idea similar to that of a wheel and spokes. This comes in very handy because so many analyses may only require a small change (for example, if you are making a number of graphs, you may just want to change the name of the variable you are interested in graphing), and this command essentially copies the command for you. You can push the "Down" arrow to go to more recent commands. Try pushing your "Up" arrow key to see the code you just entered. So that R knows that the commands you type in are meant to apply to that dataset only. Since we know that there are many datasets included in R, type To see the R help file for the "View" command. The help file gives a description of the data, usage, format, and source, and even provides sample code that can be used. Take a moment to look over the information. ?attitude and you should see a file called "The Chatterjee–Price Attitude Data," which comes from a survey of business employees. To understand what the data refer to, type in That RStudio begins to give you command options to choose from), and the variable you want the command to apply to is included in parentheses. That is, the command is given (you may notice that as you begin to type The "View" command has a logic similar to that of many R commands. Push Enter, and you should see a dataset in a spreadsheet that has "rating" as the first variable and "advance" as the last one. Then follow the instructions below to try out different commands. To access the one we want to see, open RStudio and type in (or copy and paste) the following command to the console: View( attitude ). Teaching you the commands that are most common and most useful is the purpose of this textbook, so let's start with something simple.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |