Re: [R] How to simulate informative censoring in a Cox PH model?

2015-08-03 Thread Daniel Meddings
Hi Greg The copulas concept seems a nicely simple way of simulating event times that are subject to informative censoring (in contrast to the double cox model approach I use). The correlation between the marginal uniform random variables you speak of reminded me that my approach should also induce

Re: [R] Environmental Data Connector v1.3

2015-08-03 Thread Roy Mendelssohn - NOAA Federal
> On Aug 3, 2015, at 8:12 AM, Robert in SA wrote: > > Hello. I have "successfully" installed EDC v1.3 on linux ubuntu 14.04. I am > running a 64bit machine with R 3.2.1 via Rstudio. I have tried "> example1 > <- EDC.get(1)" after loading the ncdf and EDCR libraries, from both the R > terminal an

Re: [R] scaling variables consecutively and independently

2015-08-03 Thread David Winsemius
On Aug 3, 2015, at 1:06 PM, Ram09 wrote: > Yes, I've been using the scale function but I don't know how to write a line > of code that will scale the scores in each variable independently of each > other instead of as a whole. You do not appear to be reading the help page for `scale`. > In oth

Re: [R] scaling variables consecutively and independently

2015-08-03 Thread Ram09
Yes, I've been using the scale function but I don't know how to write a line of code that will scale the scores in each variable independently of each other instead of as a whole. In other words, how can I get the scale function to standardize all the scores in one variable (column) then move on t

Re: [R] scaling variables consecutively and independently

2015-08-03 Thread David Winsemius
On Aug 3, 2015, at 11:42 AM, Ram09 wrote: > Hello Everyone, > > So I am very new to R and I'm having some trouble. I basically have around > 110 datasets each one made up of around 100 variables. I am trying to > z-score the scores in each column but independently of each other ( each > column

Re: [R] Environmental Data Connector v1.3

2015-08-03 Thread William Dunlap
> During installation EDC_HOME was set to /home/robert/EDC > and the directory definitely exists. Are you sure that EDC_HOME is set now? What do you get from the following command? Sys.getenv("EDC_HOME") If that is set to something other than "", what do you get from getwd() setwd(Sys.ge

Re: [R] Environmental Data Connector v1.3

2015-08-03 Thread Roy Mendelssohn - NOAA Federal
Hi Robert: I didn’t see this until Dan sent me something offline. I apologize for the problem. Yes the function should work as is, and a lot of the EDC is Java. I have forwarded your email to the people who did the coding. But in the meantime can you do two things for me to help us in the de

[R] scaling variables consecutively and independently

2015-08-03 Thread Ram09
Hello Everyone, So I am very new to R and I'm having some trouble. I basically have around 110 datasets each one made up of around 100 variables. I am trying to z-score the scores in each column but independently of each other ( each column independent of the other). The problem is that there a

Re: [R] Households per Census block

2015-08-03 Thread Zack Almquist
Hi Anthony and Keith Weintraub, Here is a way to do what you are asking using the UScensus2010 packages: ## latest version of the package, not yet on CRAN install.packages("UScensus2010", repos="http://R-Forge.R-project.org";) library(UScensus2010) install.blk() library(UScensus2010blk) ### You w

Re: [R] Environmental Data Connector v1.3

2015-08-03 Thread Robert in SA
Hi Dan, thanks for your response. The setwd is coded somewhere in the EDC.get function. I guess I could try alter the code but I assume this package should work as is. -- View this message in context: http://r.789695.n4.nabble.com/Environmental-Data-Connector-v1-3-tp4710686p4710701.html Sent

Re: [R] R error

2015-08-03 Thread peter dalgaard
> On 03 Aug 2015, at 18:00 , Hood, Kyle (CDC/OCOO/OCIO/ITSO) (CTR) > wrote: > > Good afternoon, > > I recently received a ticket from a customer to upgrade from 3.1.1. to 3.2.1. > After the upgrade, when he tries to install a package he receives the error > below. Could you please advise a

Re: [R] Environmental Data Connector v1.3

2015-08-03 Thread Nordlund, Dan (DSHS/RDA)
Why are you using paste() ? Why not just setwd(Sys.getenv("EDC_HOME")) Dan Daniel Nordlund, PhD Research and Data Analysis Division Services & Enterprise Support Administration Washington State Department of Social and Health Services -Original Message- From: R-help [mailto:r-help-b

Re: [R] Households per Census block

2015-08-03 Thread Anthony Damico
hi, ccing the package maintainer. one alternative is to pull the HU100 variable directly from the census bureau's summary files: that variable starts at position 328 and ends at 336. just modify this loop and you'll get a table with one-record-per-census-block in every state. https://github.com/

[R] R error

2015-08-03 Thread Hood, Kyle (CDC/OCOO/OCIO/ITSO) (CTR)
Good afternoon, I recently received a ticket from a customer to upgrade from 3.1.1. to 3.2.1. After the upgrade, when he tries to install a package he receives the error below. Could you please advise as to what is wrong? Thank you. Kyle --- Please select a CRAN mirror for use in this sessi

Re: [R] vectorized sub, gsub, grep, etc.

2015-08-03 Thread John Thaden
sub() has practical uses though gsub() may have more. This function was what I needed at the time. Of course the gsub() version is also possible. Sent from Yahoo Mail on Android [[alternative HTML version deleted]] __ R-help@r-project.org mai

[R] Matching posterior probabilities from poLCA

2015-08-03 Thread Rob de Vries
Hi all, I'm a newbie to R with a question about poLCA. When you run a latent class analysis in poLCA it generates a value for each respondent giving their posterior probability of 'belonging' to each latent class. These are stored as a matrix in the element 'posterior'. I would like to create a d

[R] Environmental Data Connector v1.3

2015-08-03 Thread Robert in SA
Hello. I have "successfully" installed EDC v1.3 on linux ubuntu 14.04. I am running a 64bit machine with R 3.2.1 via Rstudio. I have tried "> example1 <- EDC.get(1)" after loading the ncdf and EDCR libraries, from both the R terminal and Rstudio and get the following result: Error in setwd(paste(S

Re: [R] Using R to fit a curve to a dataset using a specific equation

2015-08-03 Thread David L Carlson
Your question is more statistics than R and I’m not qualified to offer an opinion. You should be able to find someone locally to help you. The Cross Validated website is also a useful resource. David From: Michael Eisenring [mailto:michael.eisenr...@gmx.ch] Sent: Monday, August 3, 2015 10:37 AM

Re: [R] R command to open a file "browser" on Windows and Mac?

2015-08-03 Thread Barry Rowlingson
And for completeness, on linux: system(paste0("xdg-open ",getwd())) there's a function in a package somewhere that hides the system dependencies of opening things with the appropriate application, and if you pass a folder/directory to it I reckon it will open it in the Explorer/Finder/Nautilus//x

[R] Households per Census block

2015-08-03 Thread Keith S Weintraub
Folks, I am using the UScensus2010 package and I am trying to figure out the number of households per census block. There are a number of possible data downloads in the package but apparently I am not smart enough to figure out which data-set is appropriate and what functions to use. Any help

Re: [R] R command to open a file "browser" on Windows and Mac?

2015-08-03 Thread Duncan Murdoch
On 03/08/2015 11:19 AM, Jonathan Greenberg wrote: > Folks: > > Is there an easy function to open a finder window (on mac) or windows > explorer window (on windows) given an input folder? A lot of times I want > to be able to see via a file browser my working directory. Is there a good > R hack t

Re: [R] R command to open a file "browser" on Windows and Mac?

2015-08-03 Thread Mark Sharp
Set your path with setwd(“my_path”) and then use file.choose(). You could have gotten this information sooner with a simple online search. Mark R. Mark Sharp, Ph.D. Director of Primate Records Database Southwest National Primate Research Center Texas Biomedical Research Institute P.O. Box 760549

[R] R command to open a file "browser" on Windows and Mac?

2015-08-03 Thread Jonathan Greenberg
Folks: Is there an easy function to open a finder window (on mac) or windows explorer window (on windows) given an input folder? A lot of times I want to be able to see via a file browser my working directory. Is there a good R hack to do this? --j [[alternative HTML version deleted]]

Re: [R] Using R to fit a curve to a dataset using a specific equation

2015-08-03 Thread David L Carlson
Use Reply-All to keep the discussion on the list. I suggested reading about nls (not just how to do it in R) because you requested R2. It was not clear that you were aware that there are strong reasons to suspect that R2 is misleading when applied nls results. That is why nls() does not provide

Re: [R] Faster text search in document database than with grep?

2015-08-03 Thread Witold E Wolski
Dear Duncan, This is a model of the data I work with. database <- replicate(5, paste(sample(letters,rexp(1,1/500), rep=TRUE), collapse="")) words <- replicate(1,paste(sample(letters,rexp(1,1/70), rep=TRUE), collaps

Re: [R] About nls.

2015-08-03 Thread PIKAL Petr
Hi Please keep conversation on list somebody can have better idea. Other see in line. > -Original Message- > From: Jianling Fan [mailto:fanjianl...@gmail.com] > Sent: Friday, July 31, 2015 4:46 PM > To: PIKAL Petr > Subject: Re: [R] About nls. > > Hello, Petr, > > Thanks for your help.

Re: [R] Faster text search in document database than with grep?

2015-08-03 Thread Duncan Murdoch
On 03/08/2015 5:25 AM, Witold E Wolski wrote: > I have a database of text documents (letter sequences). Several thousands > of documents with approx. 1000-2000 letters each. > > I need to find exact matches of short 3-15 letters sequences in those > documents. > > Without any regexp patterns the

Re: [R] Natural Smoothing B-splines

2015-08-03 Thread Marc Lamblin
More effective search with respect to browsing or digging manually into the documentation. Almost surely I'll find what I need! Thanks very much mggl __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/list

[R] Faster text search in document database than with grep?

2015-08-03 Thread Witold E Wolski
I have a database of text documents (letter sequences). Several thousands of documents with approx. 1000-2000 letters each. I need to find exact matches of short 3-15 letters sequences in those documents. Without any regexp patterns the search of one 3-15 letter "words" takes in the order of 1s.

Re: [R] Splitting lines in R script

2015-08-03 Thread Jim Lemon
Hi Steven, In general, the command line must be incomplete (in your case, a trailing hyphen) for the interpreter to take the next line as a continuation. Jim On Sun, Aug 2, 2015 at 9:05 PM, Steven Yen wrote: > I have a line containing summation of four components. > > # This works OK: > p<-p

Re: [R] vectorized sub, gsub, grep, etc.

2015-08-03 Thread Adam Erickson
Interesting. I know of no practical use for such a function. If the first position were 'abb,' sub() would return 'aBb,' failing to replace the second 'b.' I find it hard to believe that's the desired functionality. Writing a looped regex function in Rcpp makes the most sense for speed. Using Boost

[R] NCDF_arrays

2015-08-03 Thread Sibylle Stöckli
Dear R-users I am working with ncdf data using the variables time (1-365), lon (longitude), lat (latitude) and the Temperature variable daily). After setting the parameters for the model, I am able to calculate the output for each lon-lat grid point. The model works well including one ncdf fil