You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<imgsrc="{{ site.url }}/images/rfigs/courses/earth-analytics/02-time-series-data/get-to-know-r/2017-01-25-R05-missing-data-in-r/quick-plot-1.png"title="quick plot of temperature"alt="quick plot of temperature"width="90%" />
@@ -159,11 +158,9 @@ temperature column above.
159
158
```r
160
159
# calculate mean usign the na.rm argument
161
160
mean(boulder_precip$PRECIP)
162
-
## [1] 1.055556
161
+
## [1] 1.056
163
162
mean(boulder_precip$TEMP, na.rm=TRUE)
164
-
## Warning in mean.default(boulder_precip$TEMP, na.rm = TRUE): argument is not
165
-
## numeric or logical: returning NA
166
-
## [1] NA
163
+
## [1] -204.9
167
164
```
168
165
169
166
@@ -173,7 +170,7 @@ examples.
173
170
{: .notice--success}
174
171
175
172
So now you have successfully calculated the mean value of both precipitation and
176
-
temperature in your spreadsheet. However does the mean temperature value (NA make
173
+
temperature in your spreadsheet. However does the mean temperature value (-204.9375 make
177
174
sense looking at the data? It seems a bit low - you know that there aren't temperature
178
175
values of -200 here in Boulder, Colorado!
179
176
@@ -185,8 +182,8 @@ is -999.
185
182
```r
186
183
# calculate mean usign the na.rm argument
187
184
summary(boulder_precip$TEMP, na.rm=TRUE)
188
-
## Length Class Mode
189
-
## 0 NULLNULL
185
+
## Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
186
+
## -999 -238 56 -205 70 95 2
190
187
```
191
188
192
189
@@ -213,7 +210,7 @@ This should solve all of your missing data problems!
<imgsrc="{{ site.url }}/images/rfigs/courses/earth-analytics/02-time-series-data/get-to-know-r/2017-01-25-R05-missing-data-in-r/plot-2nodata-1.png"title="Plot of temperature with missing data accounted for"alt="Plot of temperature with missing data accounted for"width="90%" />
0 commit comments