-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
some NASIS user site IDs interpreted as scientific notation #39
Labels
NASIS-local
This tag is used for pull requests, issues, discussions etc. for soilDB local NASIS functions
Comments
Worth trying: odbc package. |
Note to self: investigate this in #149 |
With {DBI}+{odbc} and either ODBC Driver version 11 or 13: # selected set contains only 056E916010
library(soilDB)
x <- get_site_data_from_NASIS_db()
x
#> siteiid peiid site_id pedon_id obs_date utmzone utmeasting
#> 1 1353895 1245208 056E916010 056E916010 1991-06-27 NA NA
#> utmnorthing x y horizdatnm x_std y_std gpspositionalerror
#> 1 NA NA NA <NA> NA NA NA
#> describer pedonpurpose pedontype pedlabsampnum
#> 1 C. Thomson & S. Jamsa soil survey inventory <NA> <NA>
#> labdatadescflag tsectstopnum tsectinterval utransectid tsectkind tsectselmeth
#> 1 FALSE NA NA <NA> <NA> <NA>
#> elev_field slope_field aspect_field plantassocnm earthcovkind1 earthcovkind2
#> 1 1844 50 260 <NA> <NA> <NA>
#> erocl bedrckdepth bedrckkind bedrckhardness hillslopeprof geomslopeseg
#> 1 <NA> NA <NA> <NA> backslope middle third
#> shapeacross shapedown slopecomplex drainagecl flodfreqcl floddurcl
#> 1 linear linear <NA> well <NA> <NA>
#> flodmonthbeg pondfreqcl ponddurcl pondmonthbeg geomposhill geomposmntn
#> 1 <NA> <NA> <NA> <NA> <NA> <NA>
#> geompostrce geomposflats swaterdepth slope_shape
#> 1 <NA> <NA> NA linear / linear |
Can confirm that the conversion to {odbc} in #149 will close and resolve this issue. Even with newer ODBC driver, {RODBC} converts this pedon to scientific notation: # selected set contains only 056E916010
library(soilDB)
#> Warning: package 'soilDB' was built under R version 4.0.3
x <- get_site_data_from_NASIS_db()
#> Loading required namespace: RODBC
x
#> siteiid peiid site_id pedon_id obs_date utmzone utmeasting utmnorthing x
#> 1 1353895 1245208 Inf Inf 1991-06-27 NA NA NA NA
#> y horizdatnm x_std y_std gpspositionalerror describer
#> 1 NA <NA> NA NA NA C. Thomson & S. Jamsa
#> pedonpurpose pedontype pedlabsampnum labdatadescflag tsectstopnum
#> 1 soil survey inventory <NA> NA 0 NA
#> tsectinterval utransectid tsectkind tsectselmeth elev_field slope_field
#> 1 NA NA <NA> <NA> 1844 50
#> aspect_field plantassocnm earthcovkind1 earthcovkind2 erocl bedrckdepth
#> 1 260 NA <NA> <NA> <NA> NA
#> bedrckkind bedrckhardness hillslopeprof geomslopeseg shapeacross shapedown
#> 1 <NA> <NA> backslope middle third linear linear
#> slopecomplex drainagecl flodfreqcl floddurcl flodmonthbeg pondfreqcl
#> 1 <NA> well <NA> <NA> <NA> <NA>
#> ponddurcl pondmonthbeg geomposhill geomposmntn geomposflats swaterdepth
#> 1 <NA> <NA> <NA> <NA> <NA> NA
#> slope_shape
#> 1 linear / linear |
9 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
NASIS-local
This tag is used for pull requests, issues, discussions etc. for soilDB local NASIS functions
Try this one
056E916010
:results:
Notice
site_id
andpedon_id
are interpreted as numbers in scientific notation that overflow limits of R's datatype.I can't find any arguments to
RODBC::sqlQuery()
that might solve this problem.The text was updated successfully, but these errors were encountered: