|
2 | 2 |
|
3 | 3 | !!! info |
4 | 4 |
|
5 | | - === "Keypoints" |
| 5 | + === "Key points" |
6 | 6 |
|
7 | 7 | - R provides thousands of functions for analyzing data, and provides several way to get help |
8 | 8 | - Using R will mean searching for online help, and there are tips and resources on how to search effectively |
@@ -55,10 +55,10 @@ Often, in order to duplicate the issue you are having, someone may need |
55 | 55 | to see the data you are working with or verify the versions of R or R |
56 | 56 | packages you are using. The following R functions will help with this: |
57 | 57 |
|
58 | | -You can **check the version of R** you are working with using the |
59 | | -`sessionInfo()` function. Actually, it is good to save this information |
60 | | -as part of your notes on any analysis you are doing. When you run the |
61 | | -same script that has worked fine a dozen times before, looking back at |
| 58 | +You can **check the version of R** (and any loaded packages) you are working |
| 59 | +with using the `sessionInfo()` function. Actually, it is good to save this |
| 60 | +information as part of your notes on any analysis you are doing. When you run |
| 61 | +the same script that has worked fine a dozen times before, looking back at |
62 | 62 | these notes will remind you that you upgraded R and forget to check your |
63 | 63 | script. |
64 | 64 |
|
@@ -91,12 +91,11 @@ script. |
91 | 91 | Many times, there may be some issues with your data and the way it is |
92 | 92 | formatted. In that case, you may want to share that data with someone |
93 | 93 | else. However, you may not need to share the whole dataset; looking at a |
94 | | -subset of your 50,000 row, 10,000 column dataframe may be TMI (too much |
95 | | -information)! You can take an object you have in memory such as |
96 | | -dataframe (if you don't know what this means yet, we will get to it!) |
97 | | -and save it to a file. In our example we will use the `dput()` function |
98 | | -on the `iris` dataframe which is an example dataset that is installed in |
99 | | -R: |
| 94 | +subset of your 50,000 row, 10,000 column data frame may be TMI (too much |
| 95 | +information)! You can take an object you have in memory such as a |
| 96 | +data frame and save it to a file. In our example we will use the `dput()` |
| 97 | +function on the `iris` data frame which is an example dataset that is installed |
| 98 | +in R: |
100 | 99 |
|
101 | 100 | !!! r-project "r" |
102 | 101 |
|
@@ -163,15 +162,15 @@ them here because they come up commonly: |
163 | 162 | 1:101 # generates the sequence of numbers from 1 to 101 |
164 | 163 | ``` |
165 | 164 |
|
166 | | -!!! success "Output" |
167 | | - |
168 | | - ``` |
169 | | - [1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
170 | | - [23] 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
171 | | - [45] 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
172 | | - [67] 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
173 | | - [89] 89 90 91 92 93 94 95 96 97 98 99 100 101 |
174 | | - ``` |
| 165 | + !!! success "Output" |
| 166 | + |
| 167 | + ``` |
| 168 | + [1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
| 169 | + [23] 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
| 170 | + [45] 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
| 171 | + [67] 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
| 172 | + [89] 89 90 91 92 93 94 95 96 97 98 99 100 101 |
| 173 | + ``` |
175 | 174 |
|
176 | 175 | In the output above, `[89]` indicates that the first value on that line |
177 | 176 | is the 89th item in your result |
|
0 commit comments