Re: [Rd] unlist strips date class
Hi, On 12/02/2016 10:45 AM, Kenny Bell wrote: Is this a bug? unlist(list(as.Date("2015-01-01"))) [1] 16436 Good question. More generally one might reasonably expect 'unlist(x)' to be equivalent to 'do.call(c, x)' on a list 'x' where all the list elements are atomic vectors: x <- list(1:3, letters[1:2]) unlist(x) # [1] "1" "2" "3" "a" "b" do.call(c, x) # [1] "1" "2" "3" "a" "b" However, if the list contains dates: x <- list(as.Date("2015-01-01") + 0:2, as.Date("2016-12-02")) unlist(x) # [1] 16436 16437 16438 17137 do.call(c, x) # [1] "2015-01-01" "2015-01-02" "2015-01-03" "2016-12-02" then 'unlist(x)' drops the attributes and 'do.call(c, x)' does not. And if the list contains factors: x <- list(factor("Z"), factor(c("a", "Z", "b"))) unlist(x) # [1] Z a Z b # Levels: Z a b do.call(c, x) # [1] 1 1 3 2 then it's the other way around. Also note that the fact that the first 2 numbers in the result of 'do.call(c, x)' are the same is confusing/misleading. Hard to see how this result could be useful to anybody. These inconsistencies might well be documented but hopefully they can be addressed. Cheers, H. -- 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 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Spam messages
Have others received spam messages after posting to this list? The two problem emails are hodgesdonna...@yahoo.com and amykristen4...@octbm.com. [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Bioc-devel] Dependency update propagation (rcdk on morelia)
Hi Bioc, - the Rcpi package depends on rcdk, and the rcdk package was updated last week from 3.3.6 to 3.3.8 on CRAN thanks to Zach's (cc'd) work, which removed the Java > 1.8 requirement (previously discussed in https://stat.ethz.ch/pipermail/bioc-devel/2016-October/009881.html ). I've updated the Rcpi package and specified the rcdk version to be >= 3.3.8, while the most recent Mac build gives the error: ( http://bioconductor.org/checkResults/release/bioc-LATEST/Rcpi/morelia-buildsrc.html ) namespace 'rcdk' 3.3.6 is being loaded, but >= 3.3.8 is required. So it seems morelia is still using rcdk 3.3.6, while this >= 3.3.8 version requirement is fulfilled by Linux and Windows builds (if I understand correctly). Is there anything I could do to solve this issue? Thanks a lot, -Nan -- http://nanx.me [[alternative HTML version deleted]] ___ Bioc-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/bioc-devel
Re: [Rd] unlist strips date class
On 2 December 2016 at 10:45, Kenny Bell wrote: | Is this a bug? | | > unlist(list(as.Date("2015-01-01"))) | [1] 16436 Not really, it is documented. S3 classes operate via an attribute tag, and attributes get dropped by certain base functions. I must have hit something like the following about a thousand times by now: R> for (i in as.Date("2015-01-01")+ 0:2) print(i) [1] 16436 [1] 16437 [1] 16438 R> Live and learn. Dirk -- http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] unlist strips date class
Is this a bug? > unlist(list(as.Date("2015-01-01"))) [1] 16436 [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
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 >> > 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
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 Shayidinwrote: 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
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 Shayidinwrote: > 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
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 Tenenbaumwrote: 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. Quitting from lines 62-66 (vignette.Rmd) Error: processing vignette 'vignette.Rmd' failed with
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 Tenenbaumwrote: > 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. > > Quitting from lines 62-66 (vignette.Rmd) > >
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 >> > 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 \ >> >
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 Tenenbaumwrote: > 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) > > 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
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 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
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èswrote: > 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 >