[R] readBin with connection of unknown compression type

2018-10-12 Thread William Dunlap via R-help
I would like to use readBin to read parts of a compressed binary file whose compression type is not known (e.g, a *.RData file, which may be compressed with gz, xz, or bz compression or not compressed at all). If I use con <- file("theFile", "r") to create the connection then the compression t

Re: [R] install issue with survey package?

2018-10-12 Thread Jeff Newmiller
I think that would be a mistake, since R itself works just fine there. Your error has to do with the location of your default user library, not the software or its base library. If you set R_LIBS_USER to a directory without spaces you should be fine. I suspect you can use the 8.3 directory nota

Re: [R] install issue with survey package?

2018-10-12 Thread Alexander Nervedi
Hi Michael, I think you are spot on. Haven't resolved the issue yet. Here is what i get: > utils:::menuInstallLocal() * installing *source* package 'survey' ... ** package 'survey' successfully unpacked and MD5 sums checked ** R ** data ** inst ** preparing package for lazy loading ** help *** in

[R] Help in jointprior(kslf.nw)

2018-10-12 Thread Jiblal Upadhya
Dear All, I tried to implement following code, but its giving error as "Error in array(1:TD, dim = Dim) : 'dims' cannot be of length 0" Code for ksl dataset in deal package kslfs <- ksl[c(1:300),c(1,2,4,5,6,7,8)] head(kslfs) kslfs[,c(1:7)] <- lapply(kslfs[,c(1:7)], as.factor) indx <- sapply(kslfs

Re: [R] keeping github packages up to date

2018-10-12 Thread Amit Mittal
I'd just check with a strip script checking for updates with devtools, maybe every week and maybe when a mail pops from the git team, if subscribed (pretty powerful about merges into the final software ) BR On Fri 12 Oct, 2018, 21:03 Jeff Newmiller, wrote: > Reinstall the updated versions howev

Re: [R] keeping github packages up to date

2018-10-12 Thread Jeff Newmiller
Reinstall the updated versions however you originally did. The "obstacles" imposed by CRAN that cause package developers to forgo sharing there came about to confirm documentation, cross-platform compatibility and dependencies. With no referee enforcing such care in the environments you are pull

[R] keeping github packages up to date

2018-10-12 Thread Federico Calboli
Hi all, more and more people (sadly) are putting stuff on github, with either no CRAN upload or an package. So I am stuck with using devtools and install_github. I know how to keep stuff from CRAN updated — how do I do the same for github stuff? Cheers F -- Federico Calboli LBEG - Laborato

Re: [R] Package updates for new versions

2018-10-12 Thread Rich Shepard
On Fri, 12 Oct 2018, Micha Silver wrote: Just to clarify, I believe that rpy2 is a *python* package. Micha, So I learned yesterday. Thanks very much, Rich __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch

Re: [R] install issue with survey package?

2018-10-12 Thread Michael Dewey
Dear Al It looks like the problem may be the embedded space in Al Nerdi What happens if you manually download the tar.gz file, put it somewhere convenient and then from the commend line run R CMD INSTALL survey_3.34.tar.gz You will need to make sure R is on your path first Michael On 12/10

Re: [R] how to exclude certain keywords in strings

2018-10-12 Thread Rui Barradas
Hello, If you want to remove everything from the last underscore to the end of the string, this regex is better. Note that you don't need gsub, 'g' is to replace all matches. x <- c("StationName1_temp.csv", "Station_Name1_temp.csv", "StationName2_temp.csv") sub("_[^_]*$", "", x) #[1] "Stati

[R] install issue with survey package?

2018-10-12 Thread Alexander Nervedi
Have been trying to run a few packages with dependency on the survey package (e.g. twang) and have run into trouble that I am not sure how to resolve. Any help would be appreciated, the code (and error messages) are below: --- R log begins --- > install.packages("survey") Installing package into

Re: [R] Finding unique terms

2018-10-12 Thread Tóth Dénes
On 10/12/2018 08:58 AM, Dénes Tóth wrote: On 10/12/2018 04:36 AM, Jeff Newmiller wrote: You said "add up"... so you did not mean to say that? Denes computed the mean... Nice catch, Jeff. Of course I wanted to use 'sum' instead of 'mean'. Oh, and one more note: If you have NAs in your co