2016-12-01から1ヶ月間の記事一覧

Raster Stackの計算

R

Githubにて。 https://github.com/naru-T/Rscripts/blob/master/raster_calc_function.mdもうちょっとmarkdownの書き方べんきょうせねば。

try user-defined function approach

this does not necessary to prepare large amount of RAM.```{r} na_func x[x return(as.vector(x)) }stk system.time(ans summary(ans) ``` user system elapsed 10.585 0.254 10.898 #### calculation for temporal interpolating NA values in raster st…

try normal approach

this approach depends on RAM. it is only faster when using smaller raster data. Do not try this way if you use big raster data.```{r} system.time(stk[stk summary(stk) ``````{r} system.time(stk[stk summary(stk) ``` user system elapsed 0.984…

set up raster stack

```{r} library(raster) r r1 r2 r3 r4 r5 r6 stk ```

try user-defined function approach

this does not necessary to prepare large amount of RAM.```{r} na_func x[x return(as.vector(x)) }stk system.time(ans summary(ans) ``` user system elapsed 10.585 0.254 10.898 #### calculation for temporal interpolating NA values in raster st…

try normal approach

this approach depends on RAM. it is only faster when using smaller raster data. Do not try this way if you use big raster data.```{r} system.time(stk[stk summary(stk) ``````{r} system.time(stk[stk summary(stk) ``` user system elapsed 0.984…

set up raster stack

```{r} library(raster) r r1 r2 r3 r4 r5 r6 stk ```

メモ. Rでpasteをdplyrっぽく

こちらのネタです。マルチパイプもいけます https://twitter.com/R_Programming/status/713217963801710594 `%s%` これだけ。> "A" %s% "B"%s% "C" [1] "ABC"