Re: [R] Best way to merge 300+ .5MB dataframes?

2014-08-12 Thread David Winsemius
On Aug 11, 2014, at 8:01 PM, John McKown wrote: On Mon, Aug 11, 2014 at 9:43 PM, Thomas Adams tea...@gmail.com wrote: Grant, Assuming all your filenames are something like file1.txt, file2.txt,file3.txt... And using the Mac OSX terminal app (after you cd to the directory where your files

Re: [R] Best way to merge 300+ .5MB dataframes?

2014-08-12 Thread Prof Brian Ripley
On 12/08/2014 07:07, David Winsemius wrote: On Aug 11, 2014, at 8:01 PM, John McKown wrote: On Mon, Aug 11, 2014 at 9:43 PM, Thomas Adams tea...@gmail.com wrote: Grant, Assuming all your filenames are something like file1.txt, file2.txt,file3.txt... And using the Mac OSX terminal app (after

[R] Prediction intervals (i.e. not CI of the fit) for monotonic loess curve using bootstrapping

2014-08-12 Thread Jan Stanstrup
Hi, I am trying to find a way to estimate prediction intervals (PI) for a monotonic loess curve using bootstrapping. At the moment my approach is to use the boot function from the boot package to bootstrap my loess model, which consist of loess + monoproc from the monoproc package (to force

[R] script to data clear

2014-08-12 Thread Maicel Monzón Pérez
Hello List, I did this script to clear data after import (I don’t know is ok ). After its execution levels and label values got lost. Could some explain me to reassign levels again in the script (new depurate value)? Best regard Maicel Monzon MD, PHD Center of Cybernetic Apply to Medicine #

[R] Multivariate tobit regression

2014-08-12 Thread Vera Miguéis
Dear R-users, I would like to run a multivariate tobit model in R. Is there any package available to perform this task? Best regards, Printil [[alternative HTML version deleted]] __

Re: [R] Superimposing graphs

2014-08-12 Thread Naser Jamil
Dear Richard and Duncan, your suggestions are absolutely serving what I need. But I would like to see x-axis to be up to 30 instead of 20. Do you have any suggestion on that? Many thanks for your kind help. Regards, Jamil. On 12 August 2014 01:22, Duncan Mackay dulca...@bigpond.com wrote:

Re: [R] bugs and misfeatures in polr(MASS).... fixed!

2014-08-12 Thread tjb
The official maintainers were dismissive when I suggested there were some problems I could fix with the then implementation of polr. I haven't looked at it since, sorry. On Tue, Aug 12, 2014 at 7:44 PM, Guido Biele [via R] ml-node+s789695n4695392...@n4.nabble.com wrote: I modified (where

Re: [R] Superimposing graphs

2014-08-12 Thread Richard M. Heiberger
Yes, use xlim=c(0, 30) in your definition of P1 On Tue, Aug 12, 2014 at 7:26 AM, Naser Jamil jamilnase...@gmail.com wrote: Dear Richard and Duncan, your suggestions are absolutely serving what I need. But I would like to see x-axis to be up to 30 instead of 20. Do you have any suggestion on

Re: [R] Best way to merge 300+ .5MB dataframes?

2014-08-12 Thread Grant Rettke
Thank you all kindly. Grant Rettke | ACM, AMA, COG, IEEE gret...@acm.org | http://www.wisdomandwonder.com/ “Wisdom begins in wonder.” --Socrates ((λ (x) (x x)) (λ (x) (x x))) “Life has become immeasurably better since I have been forced to stop taking it seriously.” --Thompson On Tue, Aug 12,

Re: [R] Superimposing graphs

2014-08-12 Thread Naser Jamil
That's perfect! Many thanks. On 12 August 2014 14:32, Richard M. Heiberger r...@temple.edu wrote: Yes, use xlim=c(0, 30) in your definition of P1 On Tue, Aug 12, 2014 at 7:26 AM, Naser Jamil jamilnase...@gmail.com wrote: Dear Richard and Duncan, your suggestions are absolutely serving

Re: [R] script to data clear

2014-08-12 Thread Jeff Newmiller
Without a representative sample of data, it is very hard to understand your question or to be specific about suggestions. See [1] for some ideas about how to communicate questions online. Not that clearing data would usually mean deleting it, as in rm(data). From context I assume you mean

Re: [R] Prediction intervals (i.e. not CI of the fit) for monotonic loess curve using bootstrapping

2014-08-12 Thread David Winsemius
On Aug 12, 2014, at 12:23 AM, Jan Stanstrup wrote: Hi, I am trying to find a way to estimate prediction intervals (PI) for a monotonic loess curve using bootstrapping. At the moment my approach is to use the boot function from the boot package to bootstrap my loess model, which

Re: [R] Prediction intervals (i.e. not CI of the fit) for monotonic loess curve using bootstrapping

2014-08-12 Thread Bert Gunter
PI's of what? -- future individual values or mean values? I assume quantreg provides quantiles for the latter, not the former. (See ?predict.lm for a terse explanation of the difference). Both are obtainable from bootstrapping but the details depend on what you are prepared to assume. Consult

[R] pass vector binding to DBI parameter (rsqlite)

2014-08-12 Thread Dan Muresan
Hi, is there a way to bind vectors to DBI query parameters? The following tells me that vectors are sent as separate values: library(RSQLite) c - dbConnect (SQLite()) dbGetQuery(c, create table tst (x int, y int)) dbGetQuery(c, insert into tst values (?, ?), data.frame(x=c (1,2,1,2), y=c(3,

Re: [R] how to process multiple data files using R loop

2014-08-12 Thread Fix Ace
Thank you very much for all replies:) Here is my working code: for(i in ls(pattern=P_)){print(head(get(i),2))} On Monday, August 11, 2014 11:04 AM, Greg Snow 538...@gmail.com wrote: In addition to the solution and comments that you have already received, here are a couple of additional

Re: [R] pass vector binding to DBI parameter (rsqlite)

2014-08-12 Thread John McKown
On Tue, Aug 12, 2014 at 10:55 AM, Dan Muresan danm...@gmail.com wrote: Hi, is there a way to bind vectors to DBI query parameters? The following tells me that vectors are sent as separate values: library(RSQLite) c - dbConnect (SQLite()) dbGetQuery(c, create table tst (x int, y int))

[R] generating a sequence of seconds

2014-08-12 Thread Erin Hodgess
Hello! If I would like to generate a sequence of seconds for a date, I would do the following: x - seq(from=as.POSIXct(2014-08-12 00:00:00),to=as.POSIXct(2014-08-12 23:59:59),by=secs) What if I just want the seconds vector without the date, please? Is there a convenient way to create such a

[R] Validation of the Markov chain assumption

2014-08-12 Thread Kaptue Tchuente, Armel
Hi, I 'm modelling the occurrence of daily rainfall with a first order Markov chain. I would like to know if there is a statistic test implemented in R that could allow me to asses that the observed rainfall time series verifies the Markov assumption. Thanks P.S. My apologies for cross-posting

[R] t.test of matching columns from two datasets using plyr

2014-08-12 Thread Felipe Carrillo
Hi, I Have two datasets df1 and df2 with 3 matching columns. I need to do a t.test of sp1, sp2 and sp3� and var1, var2 and var3 where the year, month and location match. I can do it with sapply or mapply but I want the end result to be a data.frame. I prefer to do it with plyr or dplyr as I

Re: [R] generating a sequence of seconds

2014-08-12 Thread Marc Schwartz
On Aug 12, 2014, at 1:51 PM, Erin Hodgess erinm.hodg...@gmail.com wrote: Hello! If I would like to generate a sequence of seconds for a date, I would do the following: x - seq(from=as.POSIXct(2014-08-12 00:00:00),to=as.POSIXct(2014-08-12 23:59:59),by=secs) What if I just want the

Re: [R] generating a sequence of seconds

2014-08-12 Thread William Dunlap
What if I just want the seconds vector without the date, please? Is there a convenient way to create such a vector, please? Why do you want such a thing? E.g., do you want it to print the time of day without the date? Or are you trying to avoid numeric problems when you do regressions with

Re: [R] generating a sequence of seconds

2014-08-12 Thread Erin Hodgess
What I would like to do is to look at several days and determine activities that happened at times on those days. I don't really care which days, I just care about what time. Thank you! On Tue, Aug 12, 2014 at 3:14 PM, William Dunlap wdun...@tibco.com wrote: What if I just want the

Re: [R] generating a sequence of seconds

2014-08-12 Thread William Dunlap
If your activities of interest are mainly during the workday then seconds-since-3am might give good results, avoiding most daylight savings time issues. If they are more biologically oriented then something like seconds before or after sunrise or sunset might be better. Both can be expressed as

Re: [R] generating a sequence of seconds

2014-08-12 Thread John McKown
On Tue, Aug 12, 2014 at 1:51 PM, Erin Hodgess erinm.hodg...@gmail.com wrote: Hello! If I would like to generate a sequence of seconds for a date, I would do the following: x - seq(from=as.POSIXct(2014-08-12 00:00:00),to=as.POSIXct(2014-08-12 23:59:59),by=secs) What if I just want the

Re: [R] generating a sequence of seconds

2014-08-12 Thread Marc Schwartz
Erin, Is a sequential resolution of seconds required, as per your original post? If so, then using my approach and specifying the start and end dates and times will work, with the coercion of the resultant vector to numeric as I included. The method I used (subtracting the first value) will

Re: [R] generating a sequence of seconds

2014-08-12 Thread John McKown
On Tue, Aug 12, 2014 at 2:40 PM, John McKown john.archie.mck...@gmail.com wrote: snip You can simply make that a function getTimePortion - function(POSIXct_value) { value_in_seconds=as.integer(POSIXct_value); sprintf(%02d:%02d:%02d, #

Re: [R] pass vector binding to DBI parameter (rsqlite)

2014-08-12 Thread Dan Muresan
Yes, of course, that's an obvious work-around, thanks. Another one is to use temporary tables. But I'd like to know if binding a vector to an SQL parameter is possible in rsqlite (or even in the DBI API or with other drivers -- it seems to me it isn't). This seems like a nasty shortcoming

Re: [R] generating a sequence of seconds

2014-08-12 Thread John McKown
And some people wonder why I absolutely abhor daylight saving time. I'm not really fond of leap years and leap seconds either. Somebody needs to fix the Earth's rotation and orbit! On Tue, Aug 12, 2014 at 2:14 PM, William Dunlap wdun...@tibco.com wrote: What if I just want the seconds vector

Re: [R] generating a sequence of seconds

2014-08-12 Thread Marc Schwartz
On Aug 12, 2014, at 2:49 PM, John McKown john.archie.mck...@gmail.com wrote: And some people wonder why I absolutely abhor daylight saving time. I'm not really fond of leap years and leap seconds either. Somebody needs to fix the Earth's rotation and orbit! I have been a longtime proponent

Re: [R] generating a sequence of seconds

2014-08-12 Thread John McKown
On Tue, Aug 12, 2014 at 2:26 PM, Erin Hodgess erinm.hodg...@gmail.com wrote: What I would like to do is to look at several days and determine activities that happened at times on those days. I don't really care which days, I just care about what time. Thank you! Ah! A light dawns. You want

Re: [R] generating a sequence of seconds

2014-08-12 Thread Bert Gunter
Marc: You just need to be more patient -- this is already happening: http://en.wikipedia.org/wiki/Tidal_acceleration Cheers, Bert Bert Gunter Genentech Nonclinical Biostatistics (650) 467-7374 Data is not information. Information is not knowledge. And knowledge is certainly not wisdom.

Re: [R] generating a sequence of seconds

2014-08-12 Thread William Dunlap
Again, in my opinion, all time date should be recorded in GMT. It depends on context. If you are studying traffic flow or electricity usage, then you want local time with all its warts (perhaps stated as time since 3am so any daylight savings time problems are confined to a small portion of

Re: [R] generating a sequence of seconds

2014-08-12 Thread John McKown
On Tue, Aug 12, 2014 at 3:23 PM, William Dunlap wdun...@tibco.com wrote: Again, in my opinion, all time date should be recorded in GMT. It depends on context. If you are studying traffic flow or electricity usage, then you want local time with all its warts (perhaps stated as time since

Re: [R] pass vector binding to DBI parameter (rsqlite)

2014-08-12 Thread John McKown
On Tue, Aug 12, 2014 at 2:46 PM, Dan Muresan danm...@gmail.com wrote: Yes, of course, that's an obvious work-around, thanks. Another one is to use temporary tables. But I'd like to know if binding a vector to an SQL parameter is possible in rsqlite (or even in the DBI API or with other

[R] A basic statistics question

2014-08-12 Thread Ron Michael
Hi, I would need to get a clarification on a quite fundamental statistics property, hope expeRts here would not mind if I post that here. I leant that variance-covariance matrix of the standardized data is equal to the correlation matrix for the unstandardized data. So I used following data.

Re: [R] generating a sequence of seconds

2014-08-12 Thread Erin Hodgess
Great! Thank you! I think the function with the C-like function should do the trick. On Tue, Aug 12, 2014 at 4:31 PM, John McKown john.archie.mck...@gmail.com wrote: On Tue, Aug 12, 2014 at 3:23 PM, William Dunlap wdun...@tibco.com wrote: Again, in my opinion, all time date should be

Re: [R] A basic statistics question

2014-08-12 Thread Ted Harding
On 12-Aug-2014 19:57:29 Ron Michael wrote: Hi, I would need to get a clarification on a quite fundamental statistics property, hope expeRts here would not mind if I post that here. I leant that variance-covariance matrix of the standardized data is equal to the correlation matrix for the

Re: [R] A basic statistics question

2014-08-12 Thread Rolf Turner
On 13/08/14 07:57, Ron Michael wrote: Hi, I would need to get a clarification on a quite fundamental statistics property, hope expeRts here would not mind if I post that here. I leant that variance-covariance matrix of the standardized data is equal to the correlation matrix for the

Re: [R] A basic statistics question

2014-08-12 Thread Ted Harding
On 12-Aug-2014 21:41:52 Rolf Turner wrote: On 13/08/14 07:57, Ron Michael wrote: Hi, I would need to get a clarification on a quite fundamental statistics property, hope expeRts here would not mind if I post that here. I leant that variance-covariance matrix of the standardized data is

Re: [R] pass vector binding to DBI parameter (rsqlite)

2014-08-12 Thread Jeff Newmiller
I am not quite sure what you are complaining about. The ODBC interface definition is not vectorized, and that has nothing to do with R... that applies across all platforms I have seen. The DBI API is consistent with that. There are some proprietary APIs that implement bulk data transfers, but

[R] populating matrix with binary variable after matching data from data frame

2014-08-12 Thread Adrian Johnson
Hi: sorry I have a basic question. I have a data frame with two columns: x1 V1 V2 1 AKT3TCL1A 2 AKTIPVPS41 3 AKTIPPDPK1 4 AKTIP GTF3C1 5 AKTIPHOOK2 6 AKTIPPOLA2 7 AKTIP KIAA1377 8 AKTIP FAM160A2 9 AKTIPVPS16 10 AKTIPVPS18 I have a matrix

Re: [R] populating matrix with binary variable after matching data from data frame

2014-08-12 Thread arun
You could try: x1$V2[1] - TCLA1   x[outer(rownames(x), colnames(x), FUN=paste) %in% as.character(interaction(x1, sep= ))] - 1 x    TCLA1 VPS41 ABCA13 ABCA4 AKT3   1 0  0 0 AKTIP  0 1  0 0 ABCA13 0 0  0 0 ABCA4  0 0  0 0 A.K.

Re: [R] Cox regression model for matched data with replacement

2014-08-12 Thread John Pura
I am curious about this problem as well. How do you go about creating the weights for each pair, and are you suggesting that we can just incorporate a weight statement in the model as opposed to the strata statement? And Dr. Therneau, let's say I have 140 cases matched with replacement to 2