Giter Site home page Giter Site logo

forestgeo / fgeo.krig Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 3.0 37.56 MB

Analyze soil data

Home Page: https://forestgeo.github.io/fgeo.krig/

License: Other

R 0.50% Shell 0.01% HTML 0.90% CSS 0.03% TeX 0.05% C++ 98.31% Rebol 0.01% Makefile 0.01% C 0.21% Perl 0.01% Objective-C 0.01%

fgeo.krig's Introduction

Analyze soils

lifecycle Travis build status Coverage status CRAN status

Installation

Install the development version of fgeo.krig with:

# install.packages("devtools")
devtools::install_github("forestgeo/fgeo.krig")

Example

library(fgeo.krig)

Krige soil data

Using custom parameters and multiple soil variable.

params <- list(
  model = "circular", range = 100, nugget = 1000, sill = 46000, kappa = 0.5
)

vars <- c("c", "p")
custom <- krig(soil_fake, vars, params = params, quiet = TRUE)
#> Guessing: plotdim = c(1000, 460)

# Showing only the first item of the resulting output
as_tibble(custom)
#> # A tibble: 2,300 x 4
#>    var       x     y     z
#>    <chr> <dbl> <dbl> <dbl>
#>  1 c        10    10  2.29
#>  2 c        30    10  2.31
#>  3 c        50    10  2.22
#>  4 c        70    10  2.04
#>  5 c        90    10  1.79
#>  6 c       110    10  1.54
#>  7 c       130    10  1.55
#>  8 c       150    10  1.64
#>  9 c       170    10  1.77
#> 10 c       190    10  1.89
#> # ... with 2,290 more rows

Using automated parameters.

result <- krig(soil_fake, var = "c", quiet = TRUE)
#> Guessing: plotdim = c(1000, 460)
summary(result)
#> var: c 
#> df
#> Classes 'tbl_df', 'tbl' and 'data.frame':    1150 obs. of  3 variables:
#>  $ x: num  10 30 50 70 90 110 130 150 170 190 ...
#>  $ y: num  10 10 10 10 10 10 10 10 10 10 ...
#>  $ z: num  2.13 2.12 2.1 2.09 2.07 ...
#> 
#> df.poly
#> Classes 'tbl_df', 'tbl' and 'data.frame':    1150 obs. of  3 variables:
#>  $ gx: num  10 30 50 70 90 110 130 150 170 190 ...
#>  $ gy: num  10 10 10 10 10 10 10 10 10 10 ...
#>  $ z : num  2.13 2.12 2.1 2.09 2.07 ...
#> 
#> lambda
#> 'numeric'
#>  num 1
#> 
#> vg
#> 'variogram'
#> List of 20
#>  $ u               : num [1:9] 60.9 86.5 103 122.7 146.1 ...
#>  $ v               : num [1:9] 0.284 0.422 0.882 0.543 0.211 ...
#>  $ n               : num [1:9] 7 9 10 10 18 19 36 34 38
#>  $ sd              : num [1:9] 0.414 0.48 0.633 0.501 0.405 ...
#>  $ bins.lim        : num [1:31] 1.00e-12 2.00 2.38 2.84 3.38 ...
#>  $ ind.bin         : logi [1:30] FALSE FALSE FALSE FALSE FALSE FALSE ...
#>  $ var.mark        : num 0.317
#>  $ beta.ols        : num 1.36e-09
#>  $ output.type     : chr "bin"
#>  $ max.dist        : num 320
#>  $ estimator.type  : chr "classical"
#>  $ n.data          : int 30
#>  $ lambda          : num 1
#>  $ trend           : chr "cte"
#>  $ pairs.min       : num 5
#>  $ nugget.tolerance: num 1e-12
#>  $ direction       : chr "omnidirectional"
#>  $ tolerance       : chr "none"
#>  $ uvec            : num [1:30] 1 2.19 2.61 3.11 3.7 ...
#>  $ call            : language variog(geodata = geodata, breaks = breaks, trend = trend, pairs.min = 5)
#> 
#> vm
#> 'variomodel', variofit'
#> List of 17
#>  $ nugget               : num 0.352
#>  $ cov.pars             : num [1:2] 0 160
#>  $ cov.model            : chr "exponential"
#>  $ kappa                : num 0.5
#>  $ value                : num 4.64
#>  $ trend                : chr "cte"
#>  $ beta.ols             : num 1.36e-09
#>  $ practicalRange       : num 480
#>  $ max.dist             : num 320
#>  $ minimisation.function: chr "optim"
#>  $ weights              : chr "npairs"
#>  $ method               : chr "WLS"
#>  $ fix.nugget           : logi FALSE
#>  $ fix.kappa            : logi TRUE
#>  $ lambda               : num 1
#>  $ message              : chr "optim convergence code: 0"
#>  $ call                 : language variofit(vario = vg, ini.cov.pars = c(initialVal, startRange), cov.model = varModels[i],      nugget = initialVal)

Get started with fgeo

Information

fgeo.krig's People

Contributors

maurolepore avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

fgeo.krig's Issues

Release fgeo.krig 1.0.2

Prepare for release:

  • Check that description is informative
  • Check licensing of included files
  • usethis::use_cran_comments()
  • devtools::check()
  • devtools::check_win_devel()
  • rhub::check_for_cran()
  • Polish pkgdown reference index
  • Draft blog post

Submit to CRAN:

  • usethis::use_version('major')
  • Update cran-comments.md
  • devtools::submit_cran()
  • Approve email

Wait for CRAN...

  • Accepted ๐ŸŽ‰
  • usethis::use_github_release()
  • usethis::use_dev_version()
  • usethis::use_news()
  • Update install instructions in README
  • Finish blog post
  • Tweet
  • Add link to blog post in pkgdown news menu

Release 1.0.1

Prepare for release:

  • Create pre-release branch.
  • rhub::validate_email()
  • ck <- rhub::check_for_cran()
  • Windows, R-devel
  • Ubuntu, R-release
  • Fedora, R-devel
  • Mac, R-release: rhub::check_on_macos()
  • revdepcheck::revdep_check(num_workers = 4)
  • Update NEWS.md (tidyverse style ); May temporarily use version.9000
  • Merge.

Perform release:

  • Have you updated packages with (update.packages())?
  • Create release branch
  • Bump version (in DESCRIPTION and NEWS)

(Walk through devtools::release() but don't submit)

  • Have you run R CMD check locally?
  • Have you checked for spelling errors (with spell_check())?
  • Were devtool's checks successful?
  • devtools::check_win_devel()
  • rhub::check_for_cran().
  • Have you updated NEWS.md file?
  • Have you updated DESCRIPTION (version number, use_tidy_version(), use_tidy_description())?
  • Have you updated cran-comments.md?
  • Merge

Publish release:

  • Check website built OK (e.g. version, links to NEWS.md and CHANGELOG.md)
  • Release on GitHub
  • Release on drat
  • Build source and win binary locally and add to drat
  • With source build mac binary on https://builder.r-hub.io/ and add to drat
  • Update README.Rmd
  • Bump dev version

Announce

  • Write blog post
  • Add link to blog post in pkgdown news menu
  • Tweet

Templatate at forestgeo/learn#182 (adapted from https://github.com/r-lib/usethis/issues/338).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.