I use this for calculating the estimated marginal means for post-hoc analyses. I use this for statistics, particularly for ANOVAs (analysis of variance) Installing this package will take some time-wait until the console is completely finished installing the package. Its utility in my case lies in its abilities in graphing (ggplot2) and user-friendly formatting (dplyr). This package is actually comprised of multiple packages. Notice that the names of the packages are surrounded by quotation marks!īelow are brief descriptions of how I will use these packages: Here is the code you will need to execute: In further sections, you may be asked to install additional packages, but these will give you a good starting point. That is, if you want to use packages on multiple computers, you must separately install them for each computer.įor this guide, you will need to install the following packages: tidyverse, afex, emmeans, writexl, readxl, and ggthemes. Remember that everything in RStudio is local to your computer. Similarly, a new computer (R versions) may not be able to run old software (packages), so it’s important that both the R version and the package version can work together. Just as new versions of software can slow down or not work on an older computer, updated packages may not work on an old R Statistics version. The only times you would re-install a package is if you updated the R Statistics version (or for package updates). R packages only need to be installed once on a computer. R packages can provide better ways to code in R by building on the foundational “base” code R has by default. For example, some packages are designed to help you graph while others help perform statistics. R packages contain a collection of tools that allow R to perform certain tasks. Next, we will go over how to install R packages. To update your R version, you will need to only download the new R Statistics, you do not have to download RStudio again.īriefly, let’s check where our current working directory is located by typing getwd() in the console. You don’t need to download every R Statistics update, but there is a chance that some parts of your code will stop working if you wait too long. It is important to periodically check R’s website to make sure that you update R Statistics to the latest version. By the time you read this guide, the version will have updated far past 3.5.2 () – “Eggshell Igloo”, but that is my current R Statistics version. You’ll notice that the console tells you which R version you currently have. Upon opening RStudio (no need to open regular R Statistics), your screen should look like Figure 3.4. For now, let’s create an R project specifically for working on this book. Another project contains files from my Intro Statistics course. One R project contains files from my Summer 2019 R course. One R project contains all of the files (Word, Excel, R files, etc.) for my experimental study about nicotine reward. For example, I have different R Projects for different purposes. Like other folders, you should think about what you want your Project to contain. A working directory simply specifies the file path we want to use now. A file path is an umbrella term that simply refers to a file location (all files have a file path just like every location on earth has a longitude and lattitude). What’s the difference between a working directory and a file path? All working directories are file paths, but not all file paths are working directory. The “Documents” folder is located within a folder called “wendy”, which is located inside a folder called “Users”. The “R Files” folder is located within the “Documents” folder. The rest of the information gives us information about the file path to the current WD. Translated, the WD above tells us that we are currently working in the folder named: “R Files”. This location is called a working directory (WD). Like any other folder, a Project folder organizes files that you deem are related in one location. 10.9.4 Centering and Bolding the Plot TitleĪ Project is essentially a folder on your computer.7.4.1 Exercises (use practice dataset):.3.6.4 Using the Internet to Your Advantage.3.3.4 Typing in the Script versus the console.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |