Description Usage Arguments Details Value Examples
Read CCAFS data
1 | cc_data_read(x, unreadable = "filter")
|
x |
A |
unreadable |
(character) what to do when unreadable files are passed in. default is to filter them out and proceed ("filter") - alternatively, you can choose "stop", in which case we'll stop with a message. |
Look in rappdirs::user_cache_dir("ccafs")
for what files
are cached and to delete any.
cc_data_fetch()
downloads data to your machine, and this
function reads the data into your R session.
For more control over vizualizations of raster data, check out the
rasterVis
package (https://CRAN.R-project.org/package=rasterVis)
RasterLayer
or RasterStack
class object. See their
help files in raster
package documentation.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | ## Not run:
key <- "ccafs/ccafs-climate/data/ipcc_5ar_ciat_downscaled/rcp2_6/
2030s/bcc_csm1_1_m/10min/
bcc_csm1_1_m_rcp2_6_2030s_prec_10min_r1i1p1_no_tile_asc.zip"
res <- cc_data_fetch(key = key)
# a single file
cc_data_read(res[1])
# select individual files
cc_data_read(res[1:2])
# all files
cc_data_read(res)
# character path input
## you can also pass in a path to a file(s)
cc_data_read(unclass(res[1]))
# plot data
library(raster)
plot(cc_data_read(res[1:3]))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.