Skip to content

Instantly share code, notes, and snippets.

@nataliamd11
Created July 30, 2018 20:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nataliamd11/da5ab2d10b47e5b484cc1e7db8532033 to your computer and use it in GitHub Desktop.
Save nataliamd11/da5ab2d10b47e5b484cc1e7db8532033 to your computer and use it in GitHub Desktop.
read_data_from_la_calera.R
# First we read the .csv with the data from La Calera
#
calera_raw <- read.csv(".../meteorologicos_la_calera.csv")
head(calera_raw)
#
#> head(calera)
# fecha mm temp humedad
# 1 04/27/2018 17:00:00 0 22.8 49.8
# 2 04/27/2018 16:00:00 0 24.0 47.9
# 3 04/27/2018 15:00:00 0 26.4 45.5
# 4 04/27/2018 14:00:00 0 25.9 49.7
# 5 04/27/2018 13:00:00 0 26.0 56.7
# 6 04/27/2018 12:00:00 0 25.6 58.5
#
# How many observations are recorded?
nrow(calera_raw) # 91421
#
calera_raw[91421, 1] # [1] 10/16/2007 00:00:00
calera_raw[1, 1] # 04/27/2018 17:00:00
#
str(calera_raw)
#
# > str(calera)
# 'data.frame': 91421 obs. of 4 variables:
# $ fecha : Factor w/ 91421 levels "01/01/2008 00:00:00",..: 30473 30472 30471 30470 30469 30468 30467 30466 30465 30464 ...
# $ mm : num 0 0 0 0 0 0 0 0 0 0 ...
# $ temp : num 22.8 24 26.4 25.9 26 25.6 25.7 25.3 23.9 20.7 ...
# $ humedad: num 49.8 47.9 45.5 49.7 56.7 58.5 57.1 58.3 62 73.6 ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment