Skip to content
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

def.format.sdg function #5

Open
jbeaulie opened this issue Sep 14, 2017 · 12 comments
Open

def.format.sdg function #5

jbeaulie opened this issue Sep 14, 2017 · 12 comments

Comments

@jbeaulie
Copy link
Collaborator

This function calls a function from the neonDataStackR package, which isn't available on CRAN. This package needs to be made available to user.

@kcawley
Copy link
Collaborator

kcawley commented Sep 14, 2017

I fixed up the importing so that you shouldn't need to install neonDataStackR separately if you install this package using the following procedure. If it still doesn't work I'll have to look into how to better set up the dependencies.
install.packages("devtools")
library(devtools)
install_github("NEONScience/neonDissGas")

@jbeaulie
Copy link
Collaborator Author

This failed for me:

install.packages("devtools")
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/devtools_1.13.3.zip'
Content type 'application/zip' length 440079 bytes (429 KB)
downloaded 429 KB

package ‘devtools’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
C:\Users\JBEAULIE\AppData\Local\Temp\RtmpYX2B1u\downloaded_packages

library(devtools)
Warning message:
package ‘devtools’ was built under R version 3.3.3
install_github("NEONScience/neonDissGas")
Downloading GitHub repo NEONScience/neonDissGas@master
from URL https://api.github.com/repos/NEONScience/neonDissGas/zipball/master
Installation failed: Not Found (404)

sessionInfo()
R version 3.3.0 (2016-05-03)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] devtools_1.13.3

loaded via a namespace (and not attached):
[1] httr_1.2.1 R6_2.1.3 tools_3.3.0 withr_1.0.2 curl_2.4 memoise_1.0.0
[7] git2r_0.18.0 jsonlite_1.4 digest_0.6.12

@kcawley
Copy link
Collaborator

kcawley commented Sep 28, 2017

@jbeaulie
try the following, I think I forgot to include the "NEON-dissolved-gas" part!
install_github("NEONScience/NEON-dissolved-gas/neonDissGas")

@jbeaulie
Copy link
Collaborator Author

It seems we are still missing something.

install_github("NEONScience/NEON-dissolved-gas/neonDissGas")
Downloading GitHub repo NEONScience/NEON-dissolved-gas@master
from URL https://api.github.com/repos/NEONScience/NEON-dissolved-gas/zipball/master
Installing neonDissGas
"C:/PROGRA1/R/R-341.0/bin/x64/R" --no-site-file --no-environ --no-save --no-restore
--quiet CMD INSTALL
"C:/Users/JBEAULIE/AppData/Local/Temp/Rtmp8wTXzv/devtools56c4e6e1eb0/NEONScience-NEON-dissolved-gas-253fab7/neonDissGas"
--library="C:/Program Files/R/R-3.4.0/library" --install-tests

ERROR: dependency 'neonDataStackR' is not available for package 'neonDissGas'

  • removing 'C:/Program Files/R/R-3.4.0/library/neonDissGas'
    Installation failed: Command failed (1)

session_info()
Session info --------------------------------------------------------------------------------
setting value
version R version 3.4.0 (2017-04-21)
system x86_64, mingw32
ui RStudio (1.0.143)
language (EN)
collate English_United States.1252
tz America/New_York
date 2017-09-29

Packages ------------------------------------------------------------------------------------
package * version date source
base * 3.4.0 2017-04-21 local
compiler 3.4.0 2017-04-21 local
curl 2.8.1 2017-07-21 CRAN (R 3.4.1)
datasets * 3.4.0 2017-04-21 local
devtools * 1.13.3 2017-08-02 CRAN (R 3.4.1)
digest 0.6.12 2017-01-27 CRAN (R 3.4.1)
git2r 0.19.0 2017-07-19 CRAN (R 3.4.1)
graphics * 3.4.0 2017-04-21 local
grDevices * 3.4.0 2017-04-21 local
httr 1.3.1 2017-08-20 CRAN (R 3.4.1)
memoise 1.1.0 2017-04-21 CRAN (R 3.4.1)
methods * 3.4.0 2017-04-21 local
R6 2.2.2 2017-06-17 CRAN (R 3.4.1)
stats * 3.4.0 2017-04-21 local
tools 3.4.0 2017-04-21 local
utils * 3.4.0 2017-04-21 local
withr 2.0.0 2017-07-28 CRAN (R 3.4.1)

@cklunch
Copy link
Collaborator

cklunch commented Sep 29, 2017

I'm looking into it. Thanks for trying out this code!

@jbeaulie
Copy link
Collaborator Author

jbeaulie commented Oct 4, 2017

@kcawley @cklunch

OK, your update to the DESCRIPTION files seems to have done the trick. Now I can install the package and access the functions, but I"m still having trouble with the def.format.sdg function. Should I apply this function to the NEON-dissolved-gas/neonDissGas/inst/extdata directory? I assume this directory contains example datasets pulled from NEON data portal. Do all the files need to be unzipped first?

@kcawley
Copy link
Collaborator

kcawley commented Oct 5, 2017

@jbeaulie You shouldn't need to unzip the files first. The input for def.format.sdg should be in the form of the path to the zipped folder plus the zipped folder, e.g. "~/Downloads/NEON_dissolved-gases-surfacewater.zip"

@jbeaulie
Copy link
Collaborator Author

jbeaulie commented Oct 6, 2017

@kcawley @cklunch

Ok, getting closer. Here is the most recent error:

library(neonDissGas)
def.format.sdg("C:/Users/JBEAULIE/GitRepository/NEON-dissolved-gas/neonDissGas/inst/extdata/NEON_dissolved-gases-surfacewater.zip")
Unpacked NEON.D01.HOPB.DP1.20097.001.2016-09.expanded.20170705T171439Z.zip
Unpacked NEON.D01.HOPB.DP1.20097.001.2016-10.expanded.20170705T171457Z.zip
Unpacked NEON.D01.HOPB.DP1.20097.001.2016-11.expanded.20170705T170913Z.zip
Unpacked NEON.D01.HOPB.DP1.20097.001.2016-12.expanded.20170705T170516Z.zip
Unpacked NEON.D03.BARC.DP1.20097.001.2016-07.expanded.20170705T170424Z.zip
Unpacked NEON.D03.BARC.DP1.20097.001.2016-08.expanded.20170705T170807Z.zip
Unpacked NEON.D03.BARC.DP1.20097.001.2016-09.expanded.20170705T170617Z.zip
Unpacked NEON.D03.BARC.DP1.20097.001.2016-10.expanded.20170705T171631Z.zip
Unpacked NEON.D03.BARC.DP1.20097.001.2016-11.expanded.20170705T171645Z.zip
Unpacked NEON.D03.BARC.DP1.20097.001.2016-12.expanded.20170705T171518Z.zip
Error in stackDataFiles(location.data) : object 'table_types' not found

@cklunch
Copy link
Collaborator

cklunch commented Oct 6, 2017

@jbeaulie
I got that error a couple of days ago and had to re-install neonDataStackR. If you re-install neonDissGas, I think it will also grab the newest version of neonDataStackR. If not, we'll need to look into it.

Sorry, this is the nature of NEON code at this stage, we're constantly updating and revising these packages!

@jbeaulie
Copy link
Collaborator Author

jbeaulie commented Feb 7, 2018

@cklunch
Same result on 2/7/2018.

@kcawley
Copy link
Collaborator

kcawley commented Feb 7, 2018

@jbeaulie Try adding the following line before you fun the package. Sometimes it won't re-install even though there are changes if I don't set force = T.
install_github("NEONScience/NEON-utilities/neonDataStackR", force = T)

@kcawley
Copy link
Collaborator

kcawley commented Apr 23, 2018

@jbeaulie Try running the code in "installingPackages.R" to install the required packages to run the code here. The neonDataStackR has been replaces by the neonUtilities package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants