Learn: R and RStudio Basics: Scripts, Packages, and Code

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/52

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 4:56 AM on 10/9/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

53 Terms

1
New cards

What is R?

R is both a programming language and a software package used for statistical analysis.

2
New cards

Who developed the S language, which R is based on?

John Chambers and others at Bell Telephone Laboratories.

3
New cards

When was R created?

In 1991 by Ross Ihaka and Robert Gentleman.

4
New cards

What is the Comprehensive R Archive Network (CRAN)?

CRAN is the primary source for downloading the R software package.

5
New cards

What are the four freedoms granted by the GNU General Public License for R?

1. Run the program for any purpose. 2. Study and adapt the program. 3. Redistribute copies. 4. Improve the program and share improvements.

6
New cards

What is 'Base R'?

Base R contains the fundamental functions required to run R.

7
New cards

What is Tidyverse?

Tidyverse is a collection of R packages designed for data science, sharing a common design philosophy.

8
New cards

What are some packages included in Tidyverse?

ggplot2, dplyr, tidyr, readr, purrr, tibble, stringr, forcats.

9
New cards

What is a limitation of R?

Objects must be stored in physical memory, limiting functionality based on available memory.

10
New cards

How can you modify settings in RStudio?

Go to Tools -> Global Options to change workspace settings and appearance.

11
New cards

What does green text represent in R scripts?

Green text represents comments, which are not executable lines of code.

12
New cards

What do black/blue text represent in R scripts?

Black/blue text represents executable lines of code.

13
New cards

What is the purpose of comments in R scripts?

Comments are used to explain code and can be 'commented out' for troubleshooting.

14
New cards

What is the structure of a basic function in R?

A basic function is written as f(argument1, argument2, ...).

15
New cards

What is the significance of headings in R scripts?

Headings help organize the script and serve as 'jump-to' points for navigation.

16
New cards

What is the primary use of RStudio?

RStudio is an integrated development environment (IDE) for writing, saving, and executing R code.

<p>RStudio is an integrated development environment (IDE) for writing, saving, and executing R code.</p>
17
New cards

What happens if the title of an R script is in red?

It indicates that there are unsaved changes in the document.

18
New cards

What is the purpose of the R console in RStudio?

The R console displays the execution of code, errors, and warnings.

19
New cards

What is the difference between R and RStudio?

R is the software package that runs the code, while RStudio is the IDE used to write and manage the code.

<p>R is the software package that runs the code, while RStudio is the IDE used to write and manage the code.</p>
20
New cards

What is the significance of frequent updates to R?

Frequent updates ensure that R remains compatible with modern computing environments and incorporates bug fixes.

21
New cards

What is the role of user contributions in R's functionality?

Functionality is based on consumer demand and voluntary user contributions.

22
New cards

What are some common tasks that can be simplified using R code?

R code can simplify tasks for specific purposes or projects using built-in functions.

23
New cards

What is the purpose of the 'Save workspace to .RData on exit' setting?

This setting controls whether the current workspace is saved when exiting RStudio.

<p>This setting controls whether the current workspace is saved when exiting RStudio.</p>
24
New cards

What is the native pipe operator in R?

The native pipe operator (|>) allows for chaining commands in R, improving code readability.

<p>The native pipe operator (|>) allows for chaining commands in R, improving code readability.</p>
25
New cards

What is the importance of R's graphics capabilities?

R can produce 'publication quality' graphics, making it valuable for data visualization.

26
New cards

What does it mean that R is free software?

It means that anyone can use, modify, and distribute the software without restrictions.

27
New cards

What is the significance of R being available on various platforms?

R can run on almost any standard computing platform, including modern tablets and phones.

28
New cards

What is required to initiate a heading in R scripts?

Two symbols: Hashtag(s) (#) at the start of the line and at least four hashtags (#), dashes (-), or equal-signs (=) at the end of the line.

29
New cards

What is the recommended way to compile R scripts?

Compile the scripts into a single file.

30
New cards

What is the least efficient method for running code in R?

Highlight the line of code and click Run.

31
New cards

What indicates that a command is incomplete in the R console?

A '+' symbol instead of a '>' symbol.

32
New cards

What is the recommended way to write commands in R scripts?

One command per line in the R Script file.

33
New cards

What does R and RStudio report when there is an issue with code?

Errors, warnings, and messages.

34
New cards

What is the purpose of R packages?

To extend the functionality of R by providing additional functions, data, and documentation.

35
New cards

How many R packages are available for use?

Over 10,000 packages.

36
New cards

What is the analogy used to describe R packages?

R is like a new mobile phone, and R packages are like apps you can download.

37
New cards

What is the command to install the Tidyverse package?

Use the command install.packages('tidyverse').

<p>Use the command install.packages('tidyverse').</p>
38
New cards

What happens when you load a package in R?

You open the app, and it will not load again in the same R session.

39
New cards

What should you do when RStudio prompts you to update?

Always update when prompted and save work prior to updating.

40
New cards

How do you update R on a PC?

Download the new version and uninstall the previous version.

41
New cards

What is the recommended method for commenting out code in R?

Use Ctrl + Shift + C on PCs or Cmd + Shift + C on Macs.

42
New cards

What is the command line method to install packages?

Use install.packages('package_name').

43
New cards

What is the Tidyverse?

A collection of packages designed to work seamlessly together.

44
New cards

What packages are included when you install Tidyverse?

dplyr, forcats, ggplot2, lubridate, purrr, readr, stringr, tibble, and tidyr.

45
New cards

What should you avoid doing when running code in R?

Copying code from the script to the console.

46
New cards

What does the '[1]' indicate in the R console output?

It indicates that it's the first object in the output.

47
New cards

What does a warning in R indicate?

The code will still work, but with some caveats.

48
New cards

What is the significance of the '>' symbol in the R console?

It indicates that the command is ready for a new command.

49
New cards

What is the purpose of the ESC key in R?

To abort a command when it is incomplete.

50
New cards

What should you do if you see a '+' symbol in the R console?

Complete the command or use the ESC key to abort.

51
New cards

What is the recommended practice for spacing in R commands?

Spacing generally doesn't matter in commands.

52
New cards

What is a common mistake when writing code in the R console?

Writing any code you want to save in the console.

53
New cards

What does R being case-sensitive imply?

Variable names and function names must match the exact case used.