Introduction to R and RStudio
-Last updated on 2023-11-16 | +
Last updated on 2023-11-18 | Edit this page
@@ -538,8 +538,7 @@OUTPUT< more information on indexing vectors, see Episode 6: Subsetting Data.
If you type in an incomplete command, R will wait for you to complete
-it. If you are familiar with Unix Shell’s bash, you may recognize
-this
+it. If you are familiar with Unix Shell’s bash, you may recognize this
behavior from bash.
R
@@ -933,7 +932,7 @@
Solution to challenge 1
-
+
The following can be used as R variables:
@@ -969,7 +968,7 @@ R
One final thing to be aware of is that R is vectorized,
meaning that variables and functions can have vectors as values. In
contrast to physics and mathematics, a vector in R describes a set of
-values in a certain order of the same data type. For example
+values in a certain order of the same data type. For example:
R
@@ -1082,7 +1081,7 @@ OUTPUT<
}
else all.names
}
-<bytecode: 0x55bec8f02a70>
+<bytecode: 0x55de69f00a80>
<environment: namespace:base>
What’s going on here?
@@ -1215,7 +1214,7 @@
Solution to challenge 2
-
+
R
@@ -1271,7 +1270,7 @@
Solution to challenge 3
-
+
One way of answering this question in R is to use the
>
to set up the following:
@@ -1312,7 +1311,7 @@
Solution to challenge 4
-
+
We can use the rm
command to accomplish this task
@@ -1345,7 +1344,7 @@
Solution to challenge 5
-
+
We can use the install.packages()
command to install the
required packages.
@@ -1425,7 +1424,7 @@ KeypointsTemplate licensed under CC-BY 4.0 by The Carpentries
Built with sandpaper (0.14.1),
- pegboard (0.7.1),
+ pegboard (0.7.2),
and varnish (0.3.3).
@@ -1447,8 +1446,8 @@ Keypoints
The following can be used as R variables:
R
One final thing to be aware of is that R is vectorized, meaning that variables and functions can have vectors as values. In contrast to physics and mathematics, a vector in R describes a set of -values in a certain order of the same data type. For example
+values in a certain order of the same data type. For example:R
@@ -1082,7 +1081,7 @@OUTPUT< } else all.names } -<bytecode: 0x55bec8f02a70> +<bytecode: 0x55de69f00a80> <environment: namespace:base>
What’s going on here?
@@ -1215,7 +1214,7 @@Solution to challenge 2
-R
@@ -1271,7 +1270,7 @@
Solution to challenge 3
-
+
One way of answering this question in R is to use the
>
to set up the following:
@@ -1312,7 +1311,7 @@
Solution to challenge 4
-
+
We can use the rm
command to accomplish this task
@@ -1345,7 +1344,7 @@
Solution to challenge 5
-
+
We can use the install.packages()
command to install the
required packages.
@@ -1425,7 +1424,7 @@ KeypointsTemplate licensed under CC-BY 4.0 by The Carpentries
Built with sandpaper (0.14.1),
- pegboard (0.7.1),
+ pegboard (0.7.2),
and varnish (0.3.3).
@@ -1447,8 +1446,8 @@ Keypoints
One way of answering this question in R is to use the
>
to set up the following:
Solution to challenge 4
-We can use the rm
command to accomplish this task
Solution to challenge 5
-We can use the install.packages()
command to install the
required packages.
KeypointsTemplate licensed under CC-BY 4.0 by The Carpentries
Built with sandpaper (0.14.1), - pegboard (0.7.1), + pegboard (0.7.2), and varnish (0.3.3).