Re: [Bioc-devel] package vignette error : external data can't be captured when compiling package vignette
Hi Jurat, Please read the Writing R Extensions manual if you have not already: https://cran.r-project.org/doc/manuals/r-release/R-exts.html It is quite comprehensive. A gentler introduction is: https://bioconductor.org/developers/how-to/buildingPackagesForBioc/ As for your vignette, note that your function readPeakFiles() takes (as its 'peakFolder' argument a vector, not a list, but you are passing it a list in two places in the MSPC_user_guide.Rmd vignette. So remove this line (line 56): res <- as.list(res) and change line 76 from fAll <- list(bar=f1, cat=f2, foo=f3) to fAll <- c(bar=f1, cat=f2, foo=f3) After this, there is an error at line 92 because inputData is an empty named list and somewhere in the denoise_ERs() function the code is trying to subset that list and get the first item. BTW, useful tools for troubleshooting vignettes: go to the vignette directory: cd MSPC\vignettes Create an R script from your vignette: R CMD Stangle MSPC_user_guide.Rmd That produces a file called MSPC_user_guide.R so you can then open an interactive R session: R ...and source the file: source("MSPC_user_guide.R", echo=TRUE, max=Inf) And then the code will run in your interactive session and you can use tools like traceback() to see where the problems are. Regarding your large data file, software packages cannot exceed 4MB in size (see https://bioconductor.org/developers/package-guidelines/#correctness ). So see if you can use smaller data files in your package. As for issues with R CMD check: regarding this: * checking for hidden files and directories ... NOTE Found the following hidden files and directories: .gitignore .git These were most likely included in error. See section ‘Package structure’ in the ‘Writing R Extensions’ manual. ...see https://cran.r-project.org/doc/manuals/r-release/R-exts.html#index-_002eRbuildignore-file * checking DESCRIPTION meta-information ... NOTE Checking should be performed on sources prepared by ‘R CMD build’. Package listed in more than one of Depends, Imports, Suggests, Enhances: ‘rmarkdown’ A package should be listed in only one of these fields. This should be self-explanatory. In the case of rmarkdown it should only appear in the Suggests: field. * checking top-level files ... NOTE File LICENSE This means you have a LICENSE file but you do not refer to it in your DESCRIPTION file. However your license looks fairly standard so you could probably just say: License: GPL-3 and remove the LICENSE file. See https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Licensing . * checking dependencies in R code ... NOTE Namespace in Imports field not imported from: ‘tidyverse’ All declared Imports should be used. This means you need to have import(tidyverse) in your NAMESPACE if you indeed use the tidyverse package. * checking R code for possible problems ... NOTE FDR_stats : : no visible global function definition for ‘as’ ... Consider adding importFrom("methods", "as") importFrom("stats", "var") to your NAMESPACE file (and ensure that your DESCRIPTION Imports field contains 'methods'). The error message tells you exactly what to do to fix this. Undocumented arguments in documentation object 'FDR_stats' ‘replicate.type’ Undocumented arguments in documentation object 'create_output' ‘peakList_A’ ‘peakList_B’ ‘output_path’ Documented arguments not in \usage in documentation object 'create_output': ‘peaklist_A’ ‘peaklist_B’ ‘outDir’ Undocumented arguments in documentation object 'filterByFisherMethod' ‘.hitList’ Documented arguments not in \usage in documentation object 'filterByFisherMethod': ‘.hitLiist’ Functions with \usage entries need to have the appropriate \alias entries, and all their arguments documented. The \usage entries must correspond to syntactically valid R code. See chapter ‘Writing R documentation files’ in the ‘Writing R Extensions’ manual. This should be self-explanatory. * checking examples ... NONE Add examples to each man page. * checking tests ... ... > test_check("MSPC") Error: No tests found for MSPC Execution halted Add some unit tests, see https://bioconductor.org/developers/unitTesting-guidelines/ Dan ----- Original Message ----- > From: "Jurat Shayidin" > To: "lcollado" , "bioc-devel" > Sent: Monday, December 5, 2016 9:32:15 AM > Subject: Re: [Bioc-devel] package vignette error : external data can't be > captured when compiling package vignette > Dear Leonardo : > > Thanks again for your helpful package to resolve my doubt. Through Dan's > kind instruction, previous problems are partially solved instead still > getting error with vignette compilation. I reproduced example bed files and > tried most simplest way to load these data to l
Re: [Bioc-devel] package vignette error : external data can't be captured when compiling package vignette
755") : > > cannot create dir 'C:\Program Files\R\R-devel\bin\x64\MSPC.Rcheck', > > reason 'Permission denied' > > ERROR: cannot create check dir 'C:/Program > > Files/R/R-devel/bin/x64/MSPC.Rcheck' > > > > C:\Program Files\R\R-devel\bin\x64>R CMD build > > "C:\Users\jvrat\Documents\MSPC" > > * checking for file 'C:\Users\jvrat\Documents\MSPC/DESCRIPTION' ... OK > > * preparing 'MSPC': > > * checking DESCRIPTION meta-information ... OK > > * installing the package to build vignettes > > * creating vignettes ...Warning: running command > > '"C:/PROGRA~1/R/R-devel/bin/x64/Rscript" --vanilla --default-packages= > -e > > "tools::buildVignettes(dir = '.', tangle = TRUE)"' had status 1 > > ERROR > > Warning in engine$weave(file, quiet = quiet, encoding = enc) : > > Pandoc (>= 1.12.3) and/or pandoc-citeproc not available. Falling back > to > > R Markdown v1. > > Quitting from lines 60-64 (vignette.Rmd) > > Error: processing vignette 'vignette.Rmd' failed with diagnostics: > > subscript out of bounds > > Execution halted > > > > C:\Program Files\R\R-devel\bin\x64> > > > > > > How I fix R CMD check error above ? system.file() still can't detect > > external data. Any idea please ? Thanks a lot > > > > Best regards : > > > > Jurat > > > > > > On Fri, Dec 2, 2016 at 5:43 PM, Dan Tenenbaum > > wrote: > > > >> See below. > >> > >> - Original Message - > >> > From: "Jurat Shayidin" > >> > To: "Dan Tenenbaum" , "bioc-devel" < > >> bioc-devel@r-project.org> > >> > Sent: Friday, December 2, 2016 8:32:35 AM > >> > Subject: Re: [Bioc-devel] package vignette error : external data can't > >> be captured when compiling package vignette > >> > >> > Dear Dan : > >> > > >> > Really appreciated for your quick respond. Instead, I am using R CMD > >> check > >> > on my packages, I have an error. Here is whole session detail : > >> > > >> > Microsoft Windows [Version 6.3.9600] > >> > (c) 2013 Microsoft Corporation. All rights reserved. > >> > > >> > C:\Users\jvrat>cd C:\Program Files\R\R-devel\bin\x64 > >> > > >> > C:\Program Files\R\R-devel\bin\x64>R CMD INSTALL > >> > "C:\Users\jvrat\Documents\MSPC" > >> > * installing to library 'C:/Users/jvrat/Documents/R/win-library/3.4' > >> > * installing *source* package 'MSPC' ... > >> > ** R > >> > ** inst > >> > ** preparing package for lazy loading > >> > ** help > >> > *** installing help indices > >> > ** building package indices > >> > ** installing vignettes > >> > ** testing if installed package can be loaded > >> > * DONE (MSPC) > >> > > >> > C:\Program Files\R\R-devel\bin\x64>R CMD check > >> > "C:\Users\jvrat\Documents\MSPC" > >> > Warning in dir.create(pkgoutdir, mode = "0755") : > >> > cannot create dir 'C:\Program Files\R\R-devel\bin\x64\MSPC.Rcheck', > >> reason > >> > 'Permission denied' > >> > ERROR: cannot create check dir 'C:/Program > >> > Files/R/R-devel/bin/x64/MSPC.Rcheck' > >> > >> You need to run R CMD check in a directory where you have write > >> permissions. > >> > >> > >> > > >> > C:\Program Files\R\R-devel\bin\x64>R CMD build > >> > "C:\Users\jvrat\Documents\MSPC" > >> > * checking for file 'C:\Users\jvrat\Documents\MSPC/DESCRIPTION' ... > OK > >> > * preparing 'MSPC': > >> > * checking DESCRIPTION meta-information ... OK > >> > * installing the package to build vignettes > >> > * creating vignettes ...Warning: running command > >> > '"C:/PROGRA~1/R/R-devel/bin/x64/Rscript" --vanilla > --default-packages= > >> -e > >> > "tools::buildVignettes(dir = '.', tangle = TRUE)"' had status 1 > >> > ERROR > >> > Warning in engine$weave(file, quiet = quiet, encoding = enc) : > >> > Pandoc (>= 1.12.3) and/or pandoc-citeproc not available. Falling > back to > >> > R Markdown v1. > >> > Qu
Re: [Bioc-devel] package vignette error : external data can't be captured when compiling package vignette
Dear Dan : Thank you very much. I applied your approach and it worked perfectly, external data now are available for vignette code. I am sorry for my naive question, didn't realize it become simple question to ask here. I'll make sure to state my question valid, understandable. Thanks again for kind help. Best regards : Jurat On Sun, Dec 4, 2016 at 7:36 PM, Dan Tenenbaum wrote: > I don't really understand your question. But, create an inst/extdata > directory: > > md inst > md inst\extdata > ... add your files to inst\extdata ... > git add inst\extdata > git commit > git push > > Dan > > > > - Original Message - > > From: "Jurat Shayidin" > > To: "Dan Tenenbaum" , "bioc-devel" < > bioc-devel@r-project.org> > > Sent: Sunday, December 4, 2016 5:12:50 AM > > Subject: Re: [Bioc-devel] package vignette error : external data can't > be captured when compiling package vignette > > > Dear Dan : > > > > Thanks again for your kind help. I did clean up my package git working > > tree, make every commit readable, tractable. I've read about R writing > > extension manual and that helped a lot. Many thanks to Herve' insightful > > answer to overcome file permission issue, R CMD check working perfectly > > now. Through the long list of R CMD check report, CMD check alarmed me > > several possible issues on my packages, and I am working on it. Plus, R > > CMD check complained about some hidden file such as .gitignore, > > .Rproj.user, .git . Therefore I did strip away these files following this > > way : > > > > > > C:\Windows\system32>cd C:\Program Files\R\R-devel\bin\x64 > > > > C:\Program Files\R\R-devel\bin\x64>R CMD build > > "C:\Users\jvrat\Documents\MSPC" > > * checking for file 'C:\Users\jvrat\Documents\MSPC/DESCRIPTION' ... OK > > * preparing 'MSPC': > > * checking DESCRIPTION meta-information ... OK > > * installing the package to build vignettes > > * creating vignettes ... OK > > * checking for LF line-endings in source and make files > > * checking for empty or unneeded directories > > Removed empty directory 'MSPC/tests/testthat' > > * building 'MSPC_0.99.0.tar.gz' > > > > > > C:\Program Files\R\R-devel\bin\x64>R CMD check "MSPC_0.99.0.tar.gz" > > * using log directory 'C:/Program Files/R/R-devel/bin/x64/MSPC.Rcheck' > > * using R Under development (unstable) (2016-11-09 r71642) > > * using platform: x86_64-w64-mingw32 (64-bit) > > * using session charset: ISO8859-1 > > * checking for file 'MSPC/DESCRIPTION' ... OK > > * checking extension type ... Package > > * this is package 'MSPC' version '0.99.0' > > * checking package namespace information ... OK > > > > Now inst/ directory is created in MSPC_0.99.0.tar.gz, I could add my > > external data in extdata (I think I need manually create extdata folder) > > and make available these data for vignette code. But How can I commit > these > > changes to git automatically ? Because MSPC_0.99.0.tar.gz was not in my > > package directory, I cannot push these changes to git. Could you give me > > possible idea please ? Many thanks to Bioconductor Project team. > > > > Best regards : > > Jurat > > > > On Fri, Dec 2, 2016 at 7:05 PM, Dan Tenenbaum > > wrote: > > > >> I tried building your package, there are a number of issues with it. > >> > >> I recommend that you 1) always be aware of what is and is not in github, > >> by using the 'git status' command. Bear in mind that if files are not > >> committed to git then we will not be able to see them and not be able to > >> help you. Specifically, the inst folder and everything under it does not > >> exist in the github repository. Therefore I get an error in the chunk at > >> lines 45-50, I don't get as far as you (error in lines 60-64). > >> > >> As Herve suggests, please run R CMD check from a directory that you have > >> write permission in, such as your home directory. > >> > >> R CMD check will alert you about various problems, including referring > to > >> packages in NAMESPACE but not DESCRIPTION, relying on BiocStyle but not > >> mentioning it in DESCRIPTION, etc. > >> > >> Dan > >> > >> > >> > >> - Original Message - > >> > From: "Jurat Shayidin" > >> > To: "Dan Tenenbaum" , "bioc-dev
Re: [Bioc-devel] package vignette error : external data can't be captured when compiling package vignette
I don't really understand your question. But, create an inst/extdata directory: md inst md inst\extdata ... add your files to inst\extdata ... git add inst\extdata git commit git push Dan - Original Message - > From: "Jurat Shayidin" > To: "Dan Tenenbaum" , "bioc-devel" > > Sent: Sunday, December 4, 2016 5:12:50 AM > Subject: Re: [Bioc-devel] package vignette error : external data can't be > captured when compiling package vignette > Dear Dan : > > Thanks again for your kind help. I did clean up my package git working > tree, make every commit readable, tractable. I've read about R writing > extension manual and that helped a lot. Many thanks to Herve' insightful > answer to overcome file permission issue, R CMD check working perfectly > now. Through the long list of R CMD check report, CMD check alarmed me > several possible issues on my packages, and I am working on it. Plus, R > CMD check complained about some hidden file such as .gitignore, > .Rproj.user, .git . Therefore I did strip away these files following this > way : > > > C:\Windows\system32>cd C:\Program Files\R\R-devel\bin\x64 > > C:\Program Files\R\R-devel\bin\x64>R CMD build > "C:\Users\jvrat\Documents\MSPC" > * checking for file 'C:\Users\jvrat\Documents\MSPC/DESCRIPTION' ... OK > * preparing 'MSPC': > * checking DESCRIPTION meta-information ... OK > * installing the package to build vignettes > * creating vignettes ... OK > * checking for LF line-endings in source and make files > * checking for empty or unneeded directories > Removed empty directory 'MSPC/tests/testthat' > * building 'MSPC_0.99.0.tar.gz' > > > C:\Program Files\R\R-devel\bin\x64>R CMD check "MSPC_0.99.0.tar.gz" > * using log directory 'C:/Program Files/R/R-devel/bin/x64/MSPC.Rcheck' > * using R Under development (unstable) (2016-11-09 r71642) > * using platform: x86_64-w64-mingw32 (64-bit) > * using session charset: ISO8859-1 > * checking for file 'MSPC/DESCRIPTION' ... OK > * checking extension type ... Package > * this is package 'MSPC' version '0.99.0' > * checking package namespace information ... OK > > Now inst/ directory is created in MSPC_0.99.0.tar.gz, I could add my > external data in extdata (I think I need manually create extdata folder) > and make available these data for vignette code. But How can I commit these > changes to git automatically ? Because MSPC_0.99.0.tar.gz was not in my > package directory, I cannot push these changes to git. Could you give me > possible idea please ? Many thanks to Bioconductor Project team. > > Best regards : > Jurat > > On Fri, Dec 2, 2016 at 7:05 PM, Dan Tenenbaum > wrote: > >> I tried building your package, there are a number of issues with it. >> >> I recommend that you 1) always be aware of what is and is not in github, >> by using the 'git status' command. Bear in mind that if files are not >> committed to git then we will not be able to see them and not be able to >> help you. Specifically, the inst folder and everything under it does not >> exist in the github repository. Therefore I get an error in the chunk at >> lines 45-50, I don't get as far as you (error in lines 60-64). >> >> As Herve suggests, please run R CMD check from a directory that you have >> write permission in, such as your home directory. >> >> R CMD check will alert you about various problems, including referring to >> packages in NAMESPACE but not DESCRIPTION, relying on BiocStyle but not >> mentioning it in DESCRIPTION, etc. >> >> Dan >> >> >> >> - Original Message - >> > From: "Jurat Shayidin" >> > To: "Dan Tenenbaum" , "bioc-devel" < >> bioc-devel@r-project.org> >> > Sent: Friday, December 2, 2016 9:11:29 AM >> > Subject: Re: [Bioc-devel] package vignette error : external data can't >> be captured when compiling package vignette >> >> > Dear Dan : >> > >> > I forgot to commit vignette file, now I pushed new changes, so now error >> > could be something else. People in stackoverflow suggest me to put all my >> > external data (a.k.a, bed files) into vignette folder, try to run R CMD >> > check and see what happen, I did this solution, but it doesn't work. >> Plus, >> > I checked file permission of my package parent directory, seems fine to >> me. >> > How I check file permission of my package ? >> > How can I fix this write permission on my machine ? This
Re: [Bioc-devel] package vignette error : external data can't be captured when compiling package vignette
Dear Dan : Thanks again for your kind help. I did clean up my package git working tree, make every commit readable, tractable. I've read about R writing extension manual and that helped a lot. Many thanks to Herve' insightful answer to overcome file permission issue, R CMD check working perfectly now. Through the long list of R CMD check report, CMD check alarmed me several possible issues on my packages, and I am working on it. Plus, R CMD check complained about some hidden file such as .gitignore, .Rproj.user, .git . Therefore I did strip away these files following this way : C:\Windows\system32>cd C:\Program Files\R\R-devel\bin\x64 C:\Program Files\R\R-devel\bin\x64>R CMD build "C:\Users\jvrat\Documents\MSPC" * checking for file 'C:\Users\jvrat\Documents\MSPC/DESCRIPTION' ... OK * preparing 'MSPC': * checking DESCRIPTION meta-information ... OK * installing the package to build vignettes * creating vignettes ... OK * checking for LF line-endings in source and make files * checking for empty or unneeded directories Removed empty directory 'MSPC/tests/testthat' * building 'MSPC_0.99.0.tar.gz' C:\Program Files\R\R-devel\bin\x64>R CMD check "MSPC_0.99.0.tar.gz" * using log directory 'C:/Program Files/R/R-devel/bin/x64/MSPC.Rcheck' * using R Under development (unstable) (2016-11-09 r71642) * using platform: x86_64-w64-mingw32 (64-bit) * using session charset: ISO8859-1 * checking for file 'MSPC/DESCRIPTION' ... OK * checking extension type ... Package * this is package 'MSPC' version '0.99.0' * checking package namespace information ... OK Now inst/ directory is created in MSPC_0.99.0.tar.gz, I could add my external data in extdata (I think I need manually create extdata folder) and make available these data for vignette code. But How can I commit these changes to git automatically ? Because MSPC_0.99.0.tar.gz was not in my package directory, I cannot push these changes to git. Could you give me possible idea please ? Many thanks to Bioconductor Project team. Best regards : Jurat On Fri, Dec 2, 2016 at 7:05 PM, Dan Tenenbaum wrote: > I tried building your package, there are a number of issues with it. > > I recommend that you 1) always be aware of what is and is not in github, > by using the 'git status' command. Bear in mind that if files are not > committed to git then we will not be able to see them and not be able to > help you. Specifically, the inst folder and everything under it does not > exist in the github repository. Therefore I get an error in the chunk at > lines 45-50, I don't get as far as you (error in lines 60-64). > > As Herve suggests, please run R CMD check from a directory that you have > write permission in, such as your home directory. > > R CMD check will alert you about various problems, including referring to > packages in NAMESPACE but not DESCRIPTION, relying on BiocStyle but not > mentioning it in DESCRIPTION, etc. > > Dan > > > > ----- Original Message - > > From: "Jurat Shayidin" > > To: "Dan Tenenbaum" , "bioc-devel" < > bioc-devel@r-project.org> > > Sent: Friday, December 2, 2016 9:11:29 AM > > Subject: Re: [Bioc-devel] package vignette error : external data can't > be captured when compiling package vignette > > > Dear Dan : > > > > I forgot to commit vignette file, now I pushed new changes, so now error > > could be something else. People in stackoverflow suggest me to put all my > > external data (a.k.a, bed files) into vignette folder, try to run R CMD > > check and see what happen, I did this solution, but it doesn't work. > Plus, > > I checked file permission of my package parent directory, seems fine to > me. > > How I check file permission of my package ? > > How can I fix this write permission on my machine ? This is not intuitive > > to me, Any hint please ? > > > > Herve suggest me don't create inst/extdata directory manually, but I > still > > can't let external data available for vignette code. FYI, my objective in > > vignette file : let external data available for package use, compile > > trivial version of vignette with no error, then continue to make it > > perfect. Here is updated session of R CMD check : > > > > > > Microsoft Windows [Version 6.3.9600] > > (c) 2013 Microsoft Corporation. All rights reserved. > > > > C:\Users\jvrat>cd C:\Program Files\R\R-devel\bin\x64 > > > > C:\Program Files\R\R-devel\bin\x64>R CMD INSTALL > > "C:\Users\jvrat\Documents\MSPC" > > * installing to library 'C:/Users/jvrat/Documents/R/win-library/3.4' > > * installing *source*
Re: [Bioc-devel] package vignette error : external data can't be captured when compiling package vignette
I tried building your package, there are a number of issues with it. I recommend that you 1) always be aware of what is and is not in github, by using the 'git status' command. Bear in mind that if files are not committed to git then we will not be able to see them and not be able to help you. Specifically, the inst folder and everything under it does not exist in the github repository. Therefore I get an error in the chunk at lines 45-50, I don't get as far as you (error in lines 60-64). As Herve suggests, please run R CMD check from a directory that you have write permission in, such as your home directory. R CMD check will alert you about various problems, including referring to packages in NAMESPACE but not DESCRIPTION, relying on BiocStyle but not mentioning it in DESCRIPTION, etc. Dan - Original Message - > From: "Jurat Shayidin" > To: "Dan Tenenbaum" , "bioc-devel" > > Sent: Friday, December 2, 2016 9:11:29 AM > Subject: Re: [Bioc-devel] package vignette error : external data can't be > captured when compiling package vignette > Dear Dan : > > I forgot to commit vignette file, now I pushed new changes, so now error > could be something else. People in stackoverflow suggest me to put all my > external data (a.k.a, bed files) into vignette folder, try to run R CMD > check and see what happen, I did this solution, but it doesn't work. Plus, > I checked file permission of my package parent directory, seems fine to me. > How I check file permission of my package ? > How can I fix this write permission on my machine ? This is not intuitive > to me, Any hint please ? > > Herve suggest me don't create inst/extdata directory manually, but I still > can't let external data available for vignette code. FYI, my objective in > vignette file : let external data available for package use, compile > trivial version of vignette with no error, then continue to make it > perfect. Here is updated session of R CMD check : > > > Microsoft Windows [Version 6.3.9600] > (c) 2013 Microsoft Corporation. All rights reserved. > > C:\Users\jvrat>cd C:\Program Files\R\R-devel\bin\x64 > > C:\Program Files\R\R-devel\bin\x64>R CMD INSTALL > "C:\Users\jvrat\Documents\MSPC" > * installing to library 'C:/Users/jvrat/Documents/R/win-library/3.4' > * installing *source* package 'MSPC' ... > ** R > ** inst > ** preparing package for lazy loading > ** help > *** installing help indices > ** building package indices > ** installing vignettes > ** testing if installed package can be loaded > * DONE (MSPC) > > C:\Program Files\R\R-devel\bin\x64>R CMD check > "C:\Users\jvrat\Documents\MSPC" > Warning in dir.create(pkgoutdir, mode = "0755") : > cannot create dir 'C:\Program Files\R\R-devel\bin\x64\MSPC.Rcheck', > reason 'Permission denied' > ERROR: cannot create check dir 'C:/Program > Files/R/R-devel/bin/x64/MSPC.Rcheck' > > C:\Program Files\R\R-devel\bin\x64>R CMD build > "C:\Users\jvrat\Documents\MSPC" > * checking for file 'C:\Users\jvrat\Documents\MSPC/DESCRIPTION' ... OK > * preparing 'MSPC': > * checking DESCRIPTION meta-information ... OK > * installing the package to build vignettes > * creating vignettes ...Warning: running command > '"C:/PROGRA~1/R/R-devel/bin/x64/Rscript" --vanilla --default-packages= -e > "tools::buildVignettes(dir = '.', tangle = TRUE)"' had status 1 > ERROR > Warning in engine$weave(file, quiet = quiet, encoding = enc) : > Pandoc (>= 1.12.3) and/or pandoc-citeproc not available. Falling back to > R Markdown v1. > Quitting from lines 60-64 (vignette.Rmd) > Error: processing vignette 'vignette.Rmd' failed with diagnostics: > subscript out of bounds > Execution halted > > C:\Program Files\R\R-devel\bin\x64> > > > How I fix R CMD check error above ? system.file() still can't detect > external data. Any idea please ? Thanks a lot > > Best regards : > > Jurat > > > On Fri, Dec 2, 2016 at 5:43 PM, Dan Tenenbaum > wrote: > >> See below. >> >> - Original Message - >> > From: "Jurat Shayidin" >> > To: "Dan Tenenbaum" , "bioc-devel" < >> bioc-devel@r-project.org> >> > Sent: Friday, December 2, 2016 8:32:35 AM >> > Subject: Re: [Bioc-devel] package vignette error : external data can't >> be captured when compiling package vignette >> >> > Dear Dan : >> > >> > Really appreciated for your quick respond. Instead, I am using R CMD >> check
Re: [Bioc-devel] package vignette error : external data can't be captured when compiling package vignette
On 12/02/2016 09:26 AM, Leonardo Collado Torres wrote: Dear Jurat, Maybe it'll be helpful to you if you see how other packages have their data. For example, take a look at one of my packages: https://github.com/lcolladotor/derfinder You'll see that I have two directories inside /inst/extdata with some files that I use in my vignette code. See https://github.com/lcolladotor/derfinder/tree/master/inst/extdata for the files and search system.file() inside https://github.com/lcolladotor/derfinder/blob/master/vignettes/derfinder-quickstart.Rmd to see how I use it in the vignette. Regarding your permissions issue, I don't recall right now how to get this to work with Windows. But basically you can see that error at: Warning in dir.create(pkgoutdir, mode = "0755") : cannot create dir 'C:\Program Files\R\R-devel\bin\x64\MSPC.Rcheck', reason 'Permission denied' Is your user in your windows machine part of the "administrators" group? If not, that could be why. Just to clarify, you don't need (and shouldn't) need administrator privileges to 'R CMD check' a package. The error message above (which appears as a warning) indicates that Jurat is trying to run 'R CMD check' from inside the C:\Program Files\R\R-devel\bin\x64\ folder, which is of course a very bad idea. As Dan said, 'R CMD check' should be run in a directory where you have write permissions. Typically in your home or in a directory below it. H. You could otherwise run R CMD build and upload your tar ball (a .tar.gz file) to https://builder.r-hub.io/. Finally, you might want to search the manual of how to create R extensions for other details. https://cran.r-project.org/doc/manuals/r-release/R-exts.html Best, Leo On Fri, Dec 2, 2016 at 12:11 PM, Jurat Shayidin wrote: Dear Dan : I forgot to commit vignette file, now I pushed new changes, so now error could be something else. People in stackoverflow suggest me to put all my external data (a.k.a, bed files) into vignette folder, try to run R CMD check and see what happen, I did this solution, but it doesn't work. Plus, I checked file permission of my package parent directory, seems fine to me. How I check file permission of my package ? How can I fix this write permission on my machine ? This is not intuitive to me, Any hint please ? Herve suggest me don't create inst/extdata directory manually, but I still can't let external data available for vignette code. FYI, my objective in vignette file : let external data available for package use, compile trivial version of vignette with no error, then continue to make it perfect. Here is updated session of R CMD check : Microsoft Windows [Version 6.3.9600] (c) 2013 Microsoft Corporation. All rights reserved. C:\Users\jvrat>cd C:\Program Files\R\R-devel\bin\x64 C:\Program Files\R\R-devel\bin\x64>R CMD INSTALL "C:\Users\jvrat\Documents\MSPC" * installing to library 'C:/Users/jvrat/Documents/R/win-library/3.4' * installing *source* package 'MSPC' ... ** R ** inst ** preparing package for lazy loading ** help *** installing help indices ** building package indices ** installing vignettes ** testing if installed package can be loaded * DONE (MSPC) C:\Program Files\R\R-devel\bin\x64>R CMD check "C:\Users\jvrat\Documents\MSPC" Warning in dir.create(pkgoutdir, mode = "0755") : cannot create dir 'C:\Program Files\R\R-devel\bin\x64\MSPC.Rcheck', reason 'Permission denied' ERROR: cannot create check dir 'C:/Program Files/R/R-devel/bin/x64/MSPC.Rcheck' C:\Program Files\R\R-devel\bin\x64>R CMD build "C:\Users\jvrat\Documents\MSPC" * checking for file 'C:\Users\jvrat\Documents\MSPC/DESCRIPTION' ... OK * preparing 'MSPC': * checking DESCRIPTION meta-information ... OK * installing the package to build vignettes * creating vignettes ...Warning: running command '"C:/PROGRA~1/R/R-devel/bin/x64/Rscript" --vanilla --default-packages= -e "tools::buildVignettes(dir = '.', tangle = TRUE)"' had status 1 ERROR Warning in engine$weave(file, quiet = quiet, encoding = enc) : Pandoc (>= 1.12.3) and/or pandoc-citeproc not available. Falling back to R Markdown v1. Quitting from lines 60-64 (vignette.Rmd) Error: processing vignette 'vignette.Rmd' failed with diagnostics: subscript out of bounds Execution halted C:\Program Files\R\R-devel\bin\x64> How I fix R CMD check error above ? system.file() still can't detect external data. Any idea please ? Thanks a lot Best regards : Jurat On Fri, Dec 2, 2016 at 5:43 PM, Dan Tenenbaum wrote: See below. - Original Message - From: "Jurat Shayidin" To: "Dan Tenenbaum" , "bioc-devel" < bioc-devel@r-project.org> Sent: Friday, December 2, 2016 8:32:35 AM Subject: Re: [Bioc-dev
Re: [Bioc-devel] package vignette error : external data can't be captured when compiling package vignette
Dear Jurat, Maybe it'll be helpful to you if you see how other packages have their data. For example, take a look at one of my packages: https://github.com/lcolladotor/derfinder You'll see that I have two directories inside /inst/extdata with some files that I use in my vignette code. See https://github.com/lcolladotor/derfinder/tree/master/inst/extdata for the files and search system.file() inside https://github.com/lcolladotor/derfinder/blob/master/vignettes/derfinder-quickstart.Rmd to see how I use it in the vignette. Regarding your permissions issue, I don't recall right now how to get this to work with Windows. But basically you can see that error at: Warning in dir.create(pkgoutdir, mode = "0755") : cannot create dir 'C:\Program Files\R\R-devel\bin\x64\MSPC.Rcheck', reason 'Permission denied' Is your user in your windows machine part of the "administrators" group? If not, that could be why. You could otherwise run R CMD build and upload your tar ball (a .tar.gz file) to https://builder.r-hub.io/. Finally, you might want to search the manual of how to create R extensions for other details. https://cran.r-project.org/doc/manuals/r-release/R-exts.html Best, Leo On Fri, Dec 2, 2016 at 12:11 PM, Jurat Shayidin wrote: > Dear Dan : > > I forgot to commit vignette file, now I pushed new changes, so now error > could be something else. People in stackoverflow suggest me to put all my > external data (a.k.a, bed files) into vignette folder, try to run R CMD > check and see what happen, I did this solution, but it doesn't work. Plus, > I checked file permission of my package parent directory, seems fine to me. > How I check file permission of my package ? > How can I fix this write permission on my machine ? This is not intuitive > to me, Any hint please ? > > Herve suggest me don't create inst/extdata directory manually, but I still > can't let external data available for vignette code. FYI, my objective in > vignette file : let external data available for package use, compile > trivial version of vignette with no error, then continue to make it > perfect. Here is updated session of R CMD check : > > > Microsoft Windows [Version 6.3.9600] > (c) 2013 Microsoft Corporation. All rights reserved. > > C:\Users\jvrat>cd C:\Program Files\R\R-devel\bin\x64 > > C:\Program Files\R\R-devel\bin\x64>R CMD INSTALL > "C:\Users\jvrat\Documents\MSPC" > * installing to library 'C:/Users/jvrat/Documents/R/win-library/3.4' > * installing *source* package 'MSPC' ... > ** R > ** inst > ** preparing package for lazy loading > ** help > *** installing help indices > ** building package indices > ** installing vignettes > ** testing if installed package can be loaded > * DONE (MSPC) > > C:\Program Files\R\R-devel\bin\x64>R CMD check > "C:\Users\jvrat\Documents\MSPC" > Warning in dir.create(pkgoutdir, mode = "0755") : > cannot create dir 'C:\Program Files\R\R-devel\bin\x64\MSPC.Rcheck', > reason 'Permission denied' > ERROR: cannot create check dir 'C:/Program > Files/R/R-devel/bin/x64/MSPC.Rcheck' > > C:\Program Files\R\R-devel\bin\x64>R CMD build > "C:\Users\jvrat\Documents\MSPC" > * checking for file 'C:\Users\jvrat\Documents\MSPC/DESCRIPTION' ... OK > * preparing 'MSPC': > * checking DESCRIPTION meta-information ... OK > * installing the package to build vignettes > * creating vignettes ...Warning: running command > '"C:/PROGRA~1/R/R-devel/bin/x64/Rscript" --vanilla --default-packages= -e > "tools::buildVignettes(dir = '.', tangle = TRUE)"' had status 1 > ERROR > Warning in engine$weave(file, quiet = quiet, encoding = enc) : > Pandoc (>= 1.12.3) and/or pandoc-citeproc not available. Falling back to > R Markdown v1. > Quitting from lines 60-64 (vignette.Rmd) > Error: processing vignette 'vignette.Rmd' failed with diagnostics: > subscript out of bounds > Execution halted > > C:\Program Files\R\R-devel\bin\x64> > > > How I fix R CMD check error above ? system.file() still can't detect > external data. Any idea please ? Thanks a lot > > Best regards : > > Jurat > > > On Fri, Dec 2, 2016 at 5:43 PM, Dan Tenenbaum > wrote: > >> See below. >> >> - Original Message - >> > From: "Jurat Shayidin" >> > To: "Dan Tenenbaum" , "bioc-devel" < >> bioc-devel@r-project.org> >> > Sent: Friday, December 2, 2016 8:32:35 AM >> > Subject: Re: [Bioc-devel] package vignette error : external data can't >> be captured when compiling package
Re: [Bioc-devel] package vignette error : external data can't be captured when compiling package vignette
On 12/02/2016 09:11 AM, Jurat Shayidin wrote: Dear Dan : I forgot to commit vignette file, now I pushed new changes, so now error could be something else. People in stackoverflow suggest me to put all my external data (a.k.a, bed files) into vignette folder, try to run R CMD check and see what happen, I did this solution, but it doesn't work. Plus, I checked file permission of my package parent directory, seems fine to me. How I check file permission of my package ? How can I fix this write permission on my machine ? This is not intuitive to me, Any hint please ? Herve suggest me don't create inst/extdata directory manually, I didn't say that. Please re-read carefully what I wrote and make sure you understand it. H. but I still can't let external data available for vignette code. FYI, my objective in vignette file : let external data available for package use, compile trivial version of vignette with no error, then continue to make it perfect. Here is updated session of R CMD check : Microsoft Windows [Version 6.3.9600] (c) 2013 Microsoft Corporation. All rights reserved. C:\Users\jvrat>cd C:\Program Files\R\R-devel\bin\x64 C:\Program Files\R\R-devel\bin\x64>R CMD INSTALL "C:\Users\jvrat\Documents\MSPC" * installing to library 'C:/Users/jvrat/Documents/R/win-library/3.4' * installing *source* package 'MSPC' ... ** R ** inst ** preparing package for lazy loading ** help *** installing help indices ** building package indices ** installing vignettes ** testing if installed package can be loaded * DONE (MSPC) C:\Program Files\R\R-devel\bin\x64>R CMD check "C:\Users\jvrat\Documents\MSPC" Warning in dir.create(pkgoutdir, mode = "0755") : cannot create dir 'C:\Program Files\R\R-devel\bin\x64\MSPC.Rcheck', reason 'Permission denied' ERROR: cannot create check dir 'C:/Program Files/R/R-devel/bin/x64/MSPC.Rcheck' C:\Program Files\R\R-devel\bin\x64>R CMD build "C:\Users\jvrat\Documents\MSPC" * checking for file 'C:\Users\jvrat\Documents\MSPC/DESCRIPTION' ... OK * preparing 'MSPC': * checking DESCRIPTION meta-information ... OK * installing the package to build vignettes * creating vignettes ...Warning: running command '"C:/PROGRA~1/R/R-devel/bin/x64/Rscript" --vanilla --default-packages= -e "tools::buildVignettes(dir = '.', tangle = TRUE)"' had status 1 ERROR Warning in engine$weave(file, quiet = quiet, encoding = enc) : Pandoc (>= 1.12.3) and/or pandoc-citeproc not available. Falling back to R Markdown v1. Quitting from lines 60-64 (vignette.Rmd) Error: processing vignette 'vignette.Rmd' failed with diagnostics: subscript out of bounds Execution halted C:\Program Files\R\R-devel\bin\x64> How I fix R CMD check error above ? system.file() still can't detect external data. Any idea please ? Thanks a lot Best regards : Jurat On Fri, Dec 2, 2016 at 5:43 PM, Dan Tenenbaum wrote: See below. - Original Message - From: "Jurat Shayidin" To: "Dan Tenenbaum" , "bioc-devel" < bioc-devel@r-project.org> Sent: Friday, December 2, 2016 8:32:35 AM Subject: Re: [Bioc-devel] package vignette error : external data can't be captured when compiling package vignette Dear Dan : Really appreciated for your quick respond. Instead, I am using R CMD check on my packages, I have an error. Here is whole session detail : Microsoft Windows [Version 6.3.9600] (c) 2013 Microsoft Corporation. All rights reserved. C:\Users\jvrat>cd C:\Program Files\R\R-devel\bin\x64 C:\Program Files\R\R-devel\bin\x64>R CMD INSTALL "C:\Users\jvrat\Documents\MSPC" * installing to library 'C:/Users/jvrat/Documents/R/win-library/3.4' * installing *source* package 'MSPC' ... ** R ** inst ** preparing package for lazy loading ** help *** installing help indices ** building package indices ** installing vignettes ** testing if installed package can be loaded * DONE (MSPC) C:\Program Files\R\R-devel\bin\x64>R CMD check "C:\Users\jvrat\Documents\MSPC" Warning in dir.create(pkgoutdir, mode = "0755") : cannot create dir 'C:\Program Files\R\R-devel\bin\x64\MSPC.Rcheck', reason 'Permission denied' ERROR: cannot create check dir 'C:/Program Files/R/R-devel/bin/x64/MSPC.Rcheck' You need to run R CMD check in a directory where you have write permissions. C:\Program Files\R\R-devel\bin\x64>R CMD build "C:\Users\jvrat\Documents\MSPC" * checking for file 'C:\Users\jvrat\Documents\MSPC/DESCRIPTION' ... OK * preparing 'MSPC': * checking DESCRIPTION meta-information ... OK * installing the package to build vignettes * creating vignettes ...Warning: running command '"C:/PROGRA~1/R/R-devel/bin/x64/Rscript" --vanilla --default-packages= -e "tools:
Re: [Bioc-devel] package vignette error : external data can't be captured when compiling package vignette
Dear Dan : I forgot to commit vignette file, now I pushed new changes, so now error could be something else. People in stackoverflow suggest me to put all my external data (a.k.a, bed files) into vignette folder, try to run R CMD check and see what happen, I did this solution, but it doesn't work. Plus, I checked file permission of my package parent directory, seems fine to me. How I check file permission of my package ? How can I fix this write permission on my machine ? This is not intuitive to me, Any hint please ? Herve suggest me don't create inst/extdata directory manually, but I still can't let external data available for vignette code. FYI, my objective in vignette file : let external data available for package use, compile trivial version of vignette with no error, then continue to make it perfect. Here is updated session of R CMD check : Microsoft Windows [Version 6.3.9600] (c) 2013 Microsoft Corporation. All rights reserved. C:\Users\jvrat>cd C:\Program Files\R\R-devel\bin\x64 C:\Program Files\R\R-devel\bin\x64>R CMD INSTALL "C:\Users\jvrat\Documents\MSPC" * installing to library 'C:/Users/jvrat/Documents/R/win-library/3.4' * installing *source* package 'MSPC' ... ** R ** inst ** preparing package for lazy loading ** help *** installing help indices ** building package indices ** installing vignettes ** testing if installed package can be loaded * DONE (MSPC) C:\Program Files\R\R-devel\bin\x64>R CMD check "C:\Users\jvrat\Documents\MSPC" Warning in dir.create(pkgoutdir, mode = "0755") : cannot create dir 'C:\Program Files\R\R-devel\bin\x64\MSPC.Rcheck', reason 'Permission denied' ERROR: cannot create check dir 'C:/Program Files/R/R-devel/bin/x64/MSPC.Rcheck' C:\Program Files\R\R-devel\bin\x64>R CMD build "C:\Users\jvrat\Documents\MSPC" * checking for file 'C:\Users\jvrat\Documents\MSPC/DESCRIPTION' ... OK * preparing 'MSPC': * checking DESCRIPTION meta-information ... OK * installing the package to build vignettes * creating vignettes ...Warning: running command '"C:/PROGRA~1/R/R-devel/bin/x64/Rscript" --vanilla --default-packages= -e "tools::buildVignettes(dir = '.', tangle = TRUE)"' had status 1 ERROR Warning in engine$weave(file, quiet = quiet, encoding = enc) : Pandoc (>= 1.12.3) and/or pandoc-citeproc not available. Falling back to R Markdown v1. Quitting from lines 60-64 (vignette.Rmd) Error: processing vignette 'vignette.Rmd' failed with diagnostics: subscript out of bounds Execution halted C:\Program Files\R\R-devel\bin\x64> How I fix R CMD check error above ? system.file() still can't detect external data. Any idea please ? Thanks a lot Best regards : Jurat On Fri, Dec 2, 2016 at 5:43 PM, Dan Tenenbaum wrote: > See below. > > ----- Original Message - > > From: "Jurat Shayidin" > > To: "Dan Tenenbaum" , "bioc-devel" < > bioc-devel@r-project.org> > > Sent: Friday, December 2, 2016 8:32:35 AM > > Subject: Re: [Bioc-devel] package vignette error : external data can't > be captured when compiling package vignette > > > Dear Dan : > > > > Really appreciated for your quick respond. Instead, I am using R CMD > check > > on my packages, I have an error. Here is whole session detail : > > > > Microsoft Windows [Version 6.3.9600] > > (c) 2013 Microsoft Corporation. All rights reserved. > > > > C:\Users\jvrat>cd C:\Program Files\R\R-devel\bin\x64 > > > > C:\Program Files\R\R-devel\bin\x64>R CMD INSTALL > > "C:\Users\jvrat\Documents\MSPC" > > * installing to library 'C:/Users/jvrat/Documents/R/win-library/3.4' > > * installing *source* package 'MSPC' ... > > ** R > > ** inst > > ** preparing package for lazy loading > > ** help > > *** installing help indices > > ** building package indices > > ** installing vignettes > > ** testing if installed package can be loaded > > * DONE (MSPC) > > > > C:\Program Files\R\R-devel\bin\x64>R CMD check > > "C:\Users\jvrat\Documents\MSPC" > > Warning in dir.create(pkgoutdir, mode = "0755") : > > cannot create dir 'C:\Program Files\R\R-devel\bin\x64\MSPC.Rcheck', > reason > > 'Permission denied' > > ERROR: cannot create check dir 'C:/Program > > Files/R/R-devel/bin/x64/MSPC.Rcheck' > > You need to run R CMD check in a directory where you have write > permissions. > > > > > > C:\Program Files\R\R-devel\bin\x64>R CMD build > > "C:\Users\jvrat\Documents\MSPC" > > * checking for file 'C:\Users\jvrat\Documents\MSPC/DESCRIPTION
Re: [Bioc-devel] package vignette error : external data can't be captured when compiling package vignette
See below. - Original Message - > From: "Jurat Shayidin" > To: "Dan Tenenbaum" , "bioc-devel" > > Sent: Friday, December 2, 2016 8:32:35 AM > Subject: Re: [Bioc-devel] package vignette error : external data can't be > captured when compiling package vignette > Dear Dan : > > Really appreciated for your quick respond. Instead, I am using R CMD check > on my packages, I have an error. Here is whole session detail : > > Microsoft Windows [Version 6.3.9600] > (c) 2013 Microsoft Corporation. All rights reserved. > > C:\Users\jvrat>cd C:\Program Files\R\R-devel\bin\x64 > > C:\Program Files\R\R-devel\bin\x64>R CMD INSTALL > "C:\Users\jvrat\Documents\MSPC" > * installing to library 'C:/Users/jvrat/Documents/R/win-library/3.4' > * installing *source* package 'MSPC' ... > ** R > ** inst > ** preparing package for lazy loading > ** help > *** installing help indices > ** building package indices > ** installing vignettes > ** testing if installed package can be loaded > * DONE (MSPC) > > C:\Program Files\R\R-devel\bin\x64>R CMD check > "C:\Users\jvrat\Documents\MSPC" > Warning in dir.create(pkgoutdir, mode = "0755") : > cannot create dir 'C:\Program Files\R\R-devel\bin\x64\MSPC.Rcheck', reason > 'Permission denied' > ERROR: cannot create check dir 'C:/Program > Files/R/R-devel/bin/x64/MSPC.Rcheck' You need to run R CMD check in a directory where you have write permissions. > > C:\Program Files\R\R-devel\bin\x64>R CMD build > "C:\Users\jvrat\Documents\MSPC" > * checking for file 'C:\Users\jvrat\Documents\MSPC/DESCRIPTION' ... OK > * preparing 'MSPC': > * checking DESCRIPTION meta-information ... OK > * installing the package to build vignettes > * creating vignettes ...Warning: running command > '"C:/PROGRA~1/R/R-devel/bin/x64/Rscript" --vanilla --default-packages= -e > "tools::buildVignettes(dir = '.', tangle = TRUE)"' had status 1 > ERROR > Warning in engine$weave(file, quiet = quiet, encoding = enc) : > Pandoc (>= 1.12.3) and/or pandoc-citeproc not available. Falling back to > R Markdown v1. > Quitting from lines 62-66 (vignette.Rmd) > Error: processing vignette 'vignette.Rmd' failed with diagnostics: > object 'inputData' not found > Execution halted > Line 61 of the vignette (as it is in Github; it's apparently different on yur machine based on the error message) is: total.ERs <- denoise_ERs(peakGRs = inputData, tau.w = 1.0E-04, .fileName = "noiseER", outDir = "", verbose = FALSE) As you can see, the peakGRs argument is set to inputData, but inputData is not defined anywhere. Dan > C:\Program Files\R\R-devel\bin\x64> > > > How can I fix this R CMD check error ? Instead people in stackoverflow > remind me that using devtools packages is not stable some times, so I go > for old fashion : use CMD. Plus, still my external data can't available for > vignette data, and vignette compilation is failed again. I used > system.file() to do this, but not working. Any idea please ? How can I > overcome this problem? Thanks a lot to Bioconductor project team. > > Best regards : > > Jurat > > > On Fri, Dec 2, 2016 at 5:20 PM, Dan Tenenbaum > wrote: > >> If your package is in github at https://github.com/julaiti/MSPC , it >> looks like there is no inst or extdata folder in that repository. >> >> Maybe it has not yet been added/committed/pushed to git? >> >> Note that everything _under_ inst gets installed when you install the >> package, but the inst directory itself goes away. >> >> If in your package source you have the following structure: >> >> inst/extdata/ >> inst/foo.txt >> >> In the installed package you end up with: >> >> extdata/ >> foo.txt >> >> HTH >> Dan >> >> >> - Original Message - >> > From: "Jurat Shayidin" >> > To: "Hervé Pagès" , "bioc-devel" < >> bioc-devel@r-project.org> >> > Sent: Friday, December 2, 2016 5:36:28 AM >> > Subject: Re: [Bioc-devel] package vignette error : external data can't >> be captured when compiling package vignette >> >> > Dear Hervé : >> > >> > Thanks again for your response on my issue. I've read your message very >> > carefully and did all you suggested to me, still can't fix the vignette >> > compilation error. I have developed my package on windows machine under
Re: [Bioc-devel] package vignette error : external data can't be captured when compiling package vignette
Dear Dan : Really appreciated for your quick respond. Instead, I am using R CMD check on my packages, I have an error. Here is whole session detail : Microsoft Windows [Version 6.3.9600] (c) 2013 Microsoft Corporation. All rights reserved. C:\Users\jvrat>cd C:\Program Files\R\R-devel\bin\x64 C:\Program Files\R\R-devel\bin\x64>R CMD INSTALL "C:\Users\jvrat\Documents\MSPC" * installing to library 'C:/Users/jvrat/Documents/R/win-library/3.4' * installing *source* package 'MSPC' ... ** R ** inst ** preparing package for lazy loading ** help *** installing help indices ** building package indices ** installing vignettes ** testing if installed package can be loaded * DONE (MSPC) C:\Program Files\R\R-devel\bin\x64>R CMD check "C:\Users\jvrat\Documents\MSPC" Warning in dir.create(pkgoutdir, mode = "0755") : cannot create dir 'C:\Program Files\R\R-devel\bin\x64\MSPC.Rcheck', reason 'Permission denied' ERROR: cannot create check dir 'C:/Program Files/R/R-devel/bin/x64/MSPC.Rcheck' C:\Program Files\R\R-devel\bin\x64>R CMD build "C:\Users\jvrat\Documents\MSPC" * checking for file 'C:\Users\jvrat\Documents\MSPC/DESCRIPTION' ... OK * preparing 'MSPC': * checking DESCRIPTION meta-information ... OK * installing the package to build vignettes * creating vignettes ...Warning: running command '"C:/PROGRA~1/R/R-devel/bin/x64/Rscript" --vanilla --default-packages= -e "tools::buildVignettes(dir = '.', tangle = TRUE)"' had status 1 ERROR Warning in engine$weave(file, quiet = quiet, encoding = enc) : Pandoc (>= 1.12.3) and/or pandoc-citeproc not available. Falling back to R Markdown v1. Quitting from lines 62-66 (vignette.Rmd) Error: processing vignette 'vignette.Rmd' failed with diagnostics: object 'inputData' not found Execution halted C:\Program Files\R\R-devel\bin\x64> How can I fix this R CMD check error ? Instead people in stackoverflow remind me that using devtools packages is not stable some times, so I go for old fashion : use CMD. Plus, still my external data can't available for vignette data, and vignette compilation is failed again. I used system.file() to do this, but not working. Any idea please ? How can I overcome this problem? Thanks a lot to Bioconductor project team. Best regards : Jurat On Fri, Dec 2, 2016 at 5:20 PM, Dan Tenenbaum wrote: > If your package is in github at https://github.com/julaiti/MSPC , it > looks like there is no inst or extdata folder in that repository. > > Maybe it has not yet been added/committed/pushed to git? > > Note that everything _under_ inst gets installed when you install the > package, but the inst directory itself goes away. > > If in your package source you have the following structure: > > inst/extdata/ > inst/foo.txt > > In the installed package you end up with: > > extdata/ > foo.txt > > HTH > Dan > > > ----- Original Message - > > From: "Jurat Shayidin" > > To: "Hervé Pagès" , "bioc-devel" < > bioc-devel@r-project.org> > > Sent: Friday, December 2, 2016 5:36:28 AM > > Subject: Re: [Bioc-devel] package vignette error : external data can't > be captured when compiling package vignette > > > Dear Hervé : > > > > Thanks again for your response on my issue. I've read your message very > > carefully and did all you suggested to me, still can't fix the vignette > > compilation error. I have developed my package on windows machine under > > devel version of R and Bioc, all unit test works fine to me. I don't > > understand why inst/ directory was not created when I build and install > my > > packages, external data can't be read during vignette compilation. > > However, my objective is, to build my package vignette with no error in > the > > first place, then continue to edit the context until getting final > version > > of vignette file. When I install packages using devtools::install(), I > got > > this : > > > >> devtools::install() > > Installing MSPC > > "C:/PROGRA~1/R/R-devel/bin/x64/R" \ > > --no-site-file --no-environ --no-save \ > > --no-restore --quiet CMD INSTALL \ > > "C:/Users/jvrat/Documents/MSPC" \ > > --library="C:/Users/jvrat/Documents/R/win-library/3.4" \ > > --install-tests > > * installing *source* package 'MSPC' ... > > ** R > > ** tests > > ** preparing package for lazy loading > > ** help > > *** installing help indices > > ** building package indices > > ** installing vignettes > > ** testing if installed package can be loaded > > * DONE (MSPC
Re: [Bioc-devel] package vignette error : external data can't be captured when compiling package vignette
If your package is in github at https://github.com/julaiti/MSPC , it looks like there is no inst or extdata folder in that repository. Maybe it has not yet been added/committed/pushed to git? Note that everything _under_ inst gets installed when you install the package, but the inst directory itself goes away. If in your package source you have the following structure: inst/extdata/ inst/foo.txt In the installed package you end up with: extdata/ foo.txt HTH Dan - Original Message - > From: "Jurat Shayidin" > To: "Hervé Pagès" , "bioc-devel" > > Sent: Friday, December 2, 2016 5:36:28 AM > Subject: Re: [Bioc-devel] package vignette error : external data can't be > captured when compiling package vignette > Dear Hervé : > > Thanks again for your response on my issue. I've read your message very > carefully and did all you suggested to me, still can't fix the vignette > compilation error. I have developed my package on windows machine under > devel version of R and Bioc, all unit test works fine to me. I don't > understand why inst/ directory was not created when I build and install my > packages, external data can't be read during vignette compilation. > However, my objective is, to build my package vignette with no error in the > first place, then continue to edit the context until getting final version > of vignette file. When I install packages using devtools::install(), I got > this : > >> devtools::install() > Installing MSPC > "C:/PROGRA~1/R/R-devel/bin/x64/R" \ > --no-site-file --no-environ --no-save \ > --no-restore --quiet CMD INSTALL \ > "C:/Users/jvrat/Documents/MSPC" \ > --library="C:/Users/jvrat/Documents/R/win-library/3.4" \ > --install-tests > * installing *source* package 'MSPC' ... > ** R > ** tests > ** preparing package for lazy loading > ** help > *** installing help indices > ** building package indices > ** installing vignettes > ** testing if installed package can be loaded > * DONE (MSPC) > Reloading installed MSPC > > > I believe doing this is right in vignette file after I follow your advise : > > ```{r} > library(MSPC) > inputBed <- list.files(system.file("extdata", package = "MSPC"), full.names > = TRUE) > inputData <- readPeakFile(peakFolder = inputBed) > > inputData > ``` > > > However, I should not add inst/extdata manually , without this I can't > allow to load external data for package use, and vignette compilation keep > failed. To be honest, this is my very first time building R packages, I > don't know how to fix this error. Just out of curiosity, during package > installation, everything is under the inst/ , but I don't have this folder. > Why is that ? Is that possible to get further help from Bioconductor > project team to review the package source in github ? > > I am stuck with this problem, I searched all possible answer from all over > the place, cannot fix my issues. I am very sorry if my question is naive to > ask here. Could you point me out how to possibly solve this problem? Thanks > again for your great favor. > > Best regards : > > Jurat > > > > On Fri, Dec 2, 2016 at 2:04 AM, Hervé Pagès wrote: > >> Hi, >> >> Make sure you understand the difference between the *package source >> tree*, which you control and where you must create the inst/ folder, >> and the *package installation folder*, which gets created and >> populated by 'R CMD INSTALL'. The exact location of the *package >> installation folder* doesn't really matter but if you are curious >> you can use the .libPaths() command to see it. The *package installation >> folder* is the subfolder of .libPaths() that has the name of the >> package. You can also see it with find.package("mypackage"). >> >> During installation, everything that is under the inst/ folder will >> get installed *directly* under the *package installation folder*. >> So if you created the extdata/ folder under inst/ (as it should be), >> extdata/ will end up being installed at .libPaths()/mypackage/extdata/ >> The code in your examples can get the path to the *installed* extdata/ >> folder with >> >> system.file(package="mypackage", "extdata") >> >> or get the path to any file under extdata/ with e.g. >> >> system.file(package="mypackage", "extdata", "data1.bed") >> >> Don't do >> >> system.file(package="mypackage", "extdata/data1.bed") >> >> even if it works for yo
Re: [Bioc-devel] package vignette error : external data can't be captured when compiling package vignette
Dear Hervé : Thanks again for your response on my issue. I've read your message very carefully and did all you suggested to me, still can't fix the vignette compilation error. I have developed my package on windows machine under devel version of R and Bioc, all unit test works fine to me. I don't understand why inst/ directory was not created when I build and install my packages, external data can't be read during vignette compilation. However, my objective is, to build my package vignette with no error in the first place, then continue to edit the context until getting final version of vignette file. When I install packages using devtools::install(), I got this : > devtools::install() Installing MSPC "C:/PROGRA~1/R/R-devel/bin/x64/R" \ --no-site-file --no-environ --no-save \ --no-restore --quiet CMD INSTALL \ "C:/Users/jvrat/Documents/MSPC" \ --library="C:/Users/jvrat/Documents/R/win-library/3.4" \ --install-tests * installing *source* package 'MSPC' ... ** R ** tests ** preparing package for lazy loading ** help *** installing help indices ** building package indices ** installing vignettes ** testing if installed package can be loaded * DONE (MSPC) Reloading installed MSPC I believe doing this is right in vignette file after I follow your advise : ```{r} library(MSPC) inputBed <- list.files(system.file("extdata", package = "MSPC"), full.names = TRUE) inputData <- readPeakFile(peakFolder = inputBed) inputData ``` However, I should not add inst/extdata manually , without this I can't allow to load external data for package use, and vignette compilation keep failed. To be honest, this is my very first time building R packages, I don't know how to fix this error. Just out of curiosity, during package installation, everything is under the inst/ , but I don't have this folder. Why is that ? Is that possible to get further help from Bioconductor project team to review the package source in github ? I am stuck with this problem, I searched all possible answer from all over the place, cannot fix my issues. I am very sorry if my question is naive to ask here. Could you point me out how to possibly solve this problem? Thanks again for your great favor. Best regards : Jurat On Fri, Dec 2, 2016 at 2:04 AM, Hervé Pagès wrote: > Hi, > > Make sure you understand the difference between the *package source > tree*, which you control and where you must create the inst/ folder, > and the *package installation folder*, which gets created and > populated by 'R CMD INSTALL'. The exact location of the *package > installation folder* doesn't really matter but if you are curious > you can use the .libPaths() command to see it. The *package installation > folder* is the subfolder of .libPaths() that has the name of the > package. You can also see it with find.package("mypackage"). > > During installation, everything that is under the inst/ folder will > get installed *directly* under the *package installation folder*. > So if you created the extdata/ folder under inst/ (as it should be), > extdata/ will end up being installed at .libPaths()/mypackage/extdata/ > The code in your examples can get the path to the *installed* extdata/ > folder with > > system.file(package="mypackage", "extdata") > > or get the path to any file under extdata/ with e.g. > > system.file(package="mypackage", "extdata", "data1.bed") > > Don't do > > system.file(package="mypackage", "extdata/data1.bed") > > even if it works for you because it's not portable (the use of / as > a separator is a platform-dependent thing). > > Finally note that you should never try to modify anything that is under > .libPaths() by hand. Furthermore, and that's a mistake we see sometimes > with contributed packages, the code in your package should always > treat the *package installation folder* as a read-only folder. > > Hope this helps, > > H. > > > On 12/01/2016 04:34 PM, Jurat Shayidin wrote: > >> Hi BiocDevel : >> >> I am getting vignette error when I building my packages, and external data >> can't be captured by system.file() . I did unit test all function of my >> packages, it works fine. When I am going to compile package vignette, test >> input bed file can't be detected. However, I used >> devtools::install()command >> to install my packages, but installation directory inst/ was not created >> automatically. By R package convention, all external data must be located >> in inst/, so I manually created this folder inst/extdata and paste my >> data, but vignette compilation still failed. According to convention of R >> package, my package structure will be: >> >> myPackage >> `- inst >> `- extdata >> `- data1.bed >> `- data2.bed >> `- R >> `- ... >> `- NAMESPACE >> `- DESCRIPTION >> >> > -- > Hervé Pagès > > Program in Computational Biology > Division of Public Health Sciences > Fred Hutchinson Cancer Research Center > 1100 Fairview Ave. N, M1-B514 > P.O. Box 19024 > Seattle, WA 98109-1024 > > E-mail: hpa...@fredhutch.org > Phone: (206) 667-5791
Re: [Bioc-devel] package vignette error : external data can't be captured when compiling package vignette
Hi, Make sure you understand the difference between the *package source tree*, which you control and where you must create the inst/ folder, and the *package installation folder*, which gets created and populated by 'R CMD INSTALL'. The exact location of the *package installation folder* doesn't really matter but if you are curious you can use the .libPaths() command to see it. The *package installation folder* is the subfolder of .libPaths() that has the name of the package. You can also see it with find.package("mypackage"). During installation, everything that is under the inst/ folder will get installed *directly* under the *package installation folder*. So if you created the extdata/ folder under inst/ (as it should be), extdata/ will end up being installed at .libPaths()/mypackage/extdata/ The code in your examples can get the path to the *installed* extdata/ folder with system.file(package="mypackage", "extdata") or get the path to any file under extdata/ with e.g. system.file(package="mypackage", "extdata", "data1.bed") Don't do system.file(package="mypackage", "extdata/data1.bed") even if it works for you because it's not portable (the use of / as a separator is a platform-dependent thing). Finally note that you should never try to modify anything that is under .libPaths() by hand. Furthermore, and that's a mistake we see sometimes with contributed packages, the code in your package should always treat the *package installation folder* as a read-only folder. Hope this helps, H. On 12/01/2016 04:34 PM, Jurat Shayidin wrote: Hi BiocDevel : I am getting vignette error when I building my packages, and external data can't be captured by system.file() . I did unit test all function of my packages, it works fine. When I am going to compile package vignette, test input bed file can't be detected. However, I used devtools::install()command to install my packages, but installation directory inst/ was not created automatically. By R package convention, all external data must be located in inst/, so I manually created this folder inst/extdata and paste my data, but vignette compilation still failed. According to convention of R package, my package structure will be: myPackage `- inst `- extdata `- data1.bed `- data2.bed `- R `- ... `- NAMESPACE `- DESCRIPTION -- Hervé Pagès Program in Computational Biology Division of Public Health Sciences Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N, M1-B514 P.O. Box 19024 Seattle, WA 98109-1024 E-mail: hpa...@fredhutch.org Phone: (206) 667-5791 Fax:(206) 667-1319 ___ Bioc-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/bioc-devel