06.09.2021 Views

Learning Statistics with R - A tutorial for psychology students and other beginners, 2018a

Learning Statistics with R - A tutorial for psychology students and other beginners, 2018a

Learning Statistics with R - A tutorial for psychology students and other beginners, 2018a

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Figure 4.3: The Rstudio dialog box <strong>for</strong> updating packages.<br />

.......................................................................................................<br />

Besides these three, there are a number of packages that I use in a more limited fashion: gplots, sciplot,<br />

<strong>for</strong>eign, effects, R.matlab, gdata, lmtest, <strong>and</strong> probably one or two <strong>other</strong>s that I’ve missed. There are<br />

also a number of packages that I refer to but don’t actually use in this book, such as reshape, compute.es,<br />

HistData <strong>and</strong> multcomp among <strong>other</strong>s. Finally, there are a number of packages that provide more advanced<br />

tools that I hope to talk about in future versions of the book, such as sem, ez, nlme <strong>and</strong> lme4. In any case,<br />

whenever I’m using a function that isn’t in the core packages, I’ll make sure to note this in the text.<br />

4.3<br />

Managing the workspace<br />

Let’s suppose that you’re reading through this book, <strong>and</strong> what you’re doing is sitting down <strong>with</strong> it once<br />

a week <strong>and</strong> working through a whole chapter in each sitting. Not only that, you’ve been following my<br />

advice <strong>and</strong> typing in all these comm<strong>and</strong>s into R. So far during this chapter, you’d have typed quite a<br />

few comm<strong>and</strong>s, although the only ones that actually involved creating variables were the ones you typed<br />

during Section 4.1. As a result, you currently have three variables; seeker, lover, <strong>and</strong>keeper. These<br />

three variables are the contents of your workspace, also referred to as the global environment. The<br />

workspace is a key concept in R, so in this section we’ll talk a lot about what it is <strong>and</strong> how to manage<br />

its contents.<br />

4.3.1 Listing the contents of the workspace<br />

The first thing that you need to know how to do is examine the contents of the workspace. If you’re<br />

using Rstudio, you will probably find that the easiest way to do this is to use the “Environment” panel<br />

- 80 -

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!