Re: [R-es] La ejecución de mi script R es muy lenta

2015-05-29 Thread MªLuz Morales
Hola Miguel Ángel, creo que Carlos Ortega me ha dado una solución a mi problema con R...voy a probarlo... No sabía que había esa limitación en el tamaño del email, lo tendré en cuenta para la próxima. Muchas gracias en cualquier caso Un saludo MªLuz Morales Dpto. Ciencias y Tecnología de la

[R] Error in CSV file

2015-05-29 Thread Shivi82
Hello All, This is an easy fix but I am not able to find the root cause of the error. I am trying to upload a csv file but it is throwing an error. Have done a lot of research on google and some tutorial but cant find a solution hence please advice:- Syntax is :- aaa-read.csv(file

Re: [R] analysis of variance test

2015-05-29 Thread Michael Dewey
Dear Nezahat In future it would be helpful if you 1 - gave us the data so we can reproduce what you are doing 2 - told us what the error was in case we cannot replicate ti 3 - did not post in HTML as it messes up everything in your post What did you think x1 - numeric was going to do? Try x1 -

[R] Help on R Functionality Histogram

2015-05-29 Thread Shivi82
Hello Experts, I have couple of questions on the analysis I am creating. 1) How does R adopt to changes. The case I have here is that the excel I have started initially had to be modified because the data I had was on hourly basis ranging from 0 to 23 hours. After Changes 0 was modified to 24 in

Re: [R] analysis of variance test

2015-05-29 Thread Jim Lemon
Hi Nezahat, First, you are storing the code of the function numeric in x1 and x2. You probably want to use: x1-numeric() x2-numeric() Second, you are then storing the output of your aov summary (a list) in x1, which requires a bit of analysis to get the information you want (i.e. p value). The

[R] How to make new predictions from a GAM with a spline forced through the origin

2015-05-29 Thread Gavan McGrath
Hi, I’m followed an example to fit a GAM with a spline forced through a point, i.e. (0,0). This works fine from one of Simon’s examples however when it comes to making a prediction from a new set of x values I’m a bit stumped. In the example below a smooth term is constructed and the basis and

[R] Help on R Functionality Histogram

2015-05-29 Thread Shivi82
Hello Experts, I have couple of questions on the analysis I am creating. 1) How does R adopt to changes. The case I have here is that the excel I have started initially had to be modified because the data I had was on hourly basis ranging from 0 to 23 hours. After Changes 0 was modified to 24 in

Re: [R] Error in CSV file

2015-05-29 Thread Rainer M Krug
Shivi82 shivibha...@ymail.com writes: Hello All, This is an easy fix but I am not able to find the root cause of the error. I am trying to upload a csv file but it is throwing an error. Have done a lot of research on google and some tutorial but cant find a solution hence please advice:-

Re: [R] Error in CSV file

2015-05-29 Thread Ivan Calandra
Hi Shivi, R is case sensitive and the error message that the argument Header is unused (because unrecognized). Try with header (lower case h) and it should work. HTH, Ivan -- Ivan Calandra, ATER University of Reims Champagne-Ardenne GEGENAA - EA 3795 CREA - 2 esplanade Roland Garros 51100

Re: [R] Error in CSV file

2015-05-29 Thread Shivi82
This ate my head like for 2 hours. God thanks for the help. -- View this message in context: http://r.789695.n4.nabble.com/Error-in-CSV-file-tp4707879p4707882.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org

Re: [R] Help on R Functionality Histogram

2015-05-29 Thread Sarah Goslee
On Fri, May 29, 2015 at 7:53 AM, Shivi82 shivibha...@ymail.com wrote: Hello Experts, I have couple of questions on the analysis I am creating. 1) How does R adopt to changes. The case I have here is that the excel I have started initially had to be modified because the data I had was on

Re: [R] Help on R Functionality Histogram

2015-05-29 Thread Shivi82
Thanks Sarah. This is magical. Thanks for explaining in such a length. -- View this message in context: http://r.789695.n4.nabble.com/Help-on-R-Functionality-Histogram-tp4707886p4707891.html Sent from the R help mailing list archive at Nabble.com.

[R] An Odd Request

2015-05-29 Thread Josh Grant
Hello R-Users I apologize in advance if my post is inappropriate. I read the entire posting guide and found nothing to say so, but you never know. I am seeking a knowledgable R-user that might be interested (for whatever reason) in helping out on what I hope would be considered a worthy project.

Re: [R] An Odd Request

2015-05-29 Thread Charles Determan
If you are primarily interested in making your R analyses in to a website you should look in to the 'Shiny' package. It makes generating web pages very easy. Here is a link to the Shiny Gallery providing some examples ( http://shiny.rstudio.com/gallery/). Regards, Charles On Fri, May 29, 2015

[R] Problems with nls

2015-05-29 Thread Abolfazl Saghafi
Can some help me with a question on this bass model, please As I read some articles on this topic, I understand that 1. the bass formula is N(t) = pm + (q-p) N(t-1) - (q/m) (N(t-1))^2 2. which is a difference equation with the solution N(t) = m (1 − exp(−(p+q)t)) / (1 + (q/p)exp(−(p+q)t)) 3. So,

Re: [R] Problem with comparing multiple data sets

2015-05-29 Thread Mohammad Alimohammadi
Hi everyone. I tried the (modeest) package on my initial test data and it worked. However, it doesn't work on the entire data set. I saved one of the protions that gives error. (Not for all of the values but for some of them). For example: lines 36 and 37 and 39 correctly show the mode value but

Re: [R] best way to handle database connections from within a package

2015-05-29 Thread Mark Sharp
I would simply separate the database connect and disconnect functions from the query functions. Mark R. Mark Sharp, Ph.D. msh...@txbiomed.org On May 28, 2015, at 12:18 PM, Luca Cerone luca.cer...@gmail.com wrote: Dear all, I am writing a package that is a collection of queries to be

[R] alternatives to KS test applicable to K-samples

2015-05-29 Thread Wensui Liu
Good morning, All I have a stat question not specifically related to the the programming language. To compare distributional consistency / discrepancy between two samples, we usually use kolmogorov-smirnov test, which is implemented in R with ks.test() or in SAS with pro npar1way edf. I am

Re: [R] Why I am not able to load library(R.matlab)? Other packages are fine.

2015-05-29 Thread C W
Hi Henrik, I don't quite get what I should do here. I am not familiar with R.methodS3. Can you tell me what command exactly do I need to do? Thanks, Mike On Thu, May 28, 2015 at 3:30 PM, Henrik Bengtsson henrik.bengts...@ucsf.edu wrote: For some unknown reason, you've managed to install

Re: [R] alternatives to KS test applicable to K-samples

2015-05-29 Thread Cade, Brian
Wensui: There are the multi-response permutation procedures (MRPP) that readily test the omnibus hypothesis of no distributional differences among multiple samples for univariate or multivariate responses. There also are empirical coverage tests that test a similar hypothesis among multiple

Re: [R] Converting unique strings to unique numbers

2015-05-29 Thread Hervé Pagès
Hi Kate, I found that matching the character vector to itself is a very effective way to do this: x - c(a, bunch, of, strings, whose, exact, content, is, of, little, interest) ids - match(x, x) ids # [1] 1 2 3 4 5 6 7 8 3 10 11 By using this trick, many manipulations

Re: [R] Converting unique strings to unique numbers

2015-05-29 Thread Kate Ignatius
I found this helpful. However - the second to forth columns come out all zero - was this the intention? That is: X0001 0 0 0 2 1 BYX859 X0001 0 0 0 1 1 BYX894 X0001 0 0 0 2 2 BYX862 X0001 0 0 0 2 2 BYX863 X0001 0 0 0 2 2 BYX864 X0001 0 0 0 2 2 BYX865 On Fri, May 29, 2015 at 1:31

Re: [R] alternatives to KS test applicable to K-samples

2015-05-29 Thread Wensui Liu
Very nice, Brian Sincerely appreciate your assistance! On Friday, May 29, 2015, Cade, Brian ca...@usgs.gov wrote: Wensui: There are the multi-response permutation procedures (MRPP) that readily test the omnibus hypothesis of no distributional differences among multiple samples for

Re: [R] Converting unique strings to unique numbers

2015-05-29 Thread Jeff Newmiller
Of course, but I would not recommend it. A factor is a vector of integers with an attribute containing the labels that those integers correspond to. You seem to be asking for a factor that has lost the definitions part. But hey, newvector - as.integer(factor(oldvector)) should get you what you

Re: [R-es] Mi script R es muy lento

2015-05-29 Thread Eric
Hola MªLuz, no se si es el mas rapido de todas las opciones que existen, pero es muy muy rapido y el mas rapido que yo he usaado ... y es bastante practico para realizar operaciones complejas con tablas, aunque hay algunas cosas que no he sabido pasar de data.frames y bucles a data.table, pero la

Re: [R] Why I am not able to load library(R.matlab)? Other packages are fine.

2015-05-29 Thread Ben Bolker
C W tmrsg11 at gmail.com writes: Hi Henrik, I don't quite get what I should do here. I am not familiar with R.methodS3. Can you tell me what command exactly do I need to do? Thanks, Mike install.packages(R.methodsS3) install.packages(R.matlab) library(R.matlab) [snip snip

Re: [R] alternatives to KS test applicable to K-samples

2015-05-29 Thread David Winsemius
On May 29, 2015, at 9:31 AM, Wensui Liu wrote: Good morning, All I have a stat question not specifically related to the the programming language. To compare distributional consistency / discrepancy between two samples, we usually use kolmogorov-smirnov test, which is implemented in R with

[R] Result differences in 32-bit vs. 64-bit point.in.polygon?

2015-05-29 Thread Lensing, Shelly Y
Is anyone aware of point.in.polygon giving different results for 32-bit vs. 64-bit R? Our OS is 64-bit Windows 7 Enterprise. I'm working with someone else's extensive R program and the final results are close but not exactly matching. We're thinking it might be something with the

Re: [R] about transforming a data.frame

2015-05-29 Thread Sarah Goslee
I'm still not really clear on what you need (format, etc), but this may help you get started: with(df, table(CT, row_names)) row_names CT A1:A2:A3 B10:B11:B12 B4:B5:B6 B7:B8:B9 D10:D11:D12 D4:D5:D6 E10:E11:E12 20 001 21 1 4

Re: [R] Problem with comparing multiple data sets

2015-05-29 Thread John Kane
Hi Mohammad, I have no idea what is happening but for some reason your new data (renamed df1 since df is a reserved word in R) is outputting a list whereas dff1 (your original test data) is giving a vector as you wanted. It may be obvious but I don't see why df1 is giving us a list. As far as

Re: [R] about transforming a data.frame

2015-05-29 Thread Bogdan Tanasa
thanks a lot Sarah, very much appreciate it ! On Fri, May 29, 2015 at 3:18 PM, Sarah Goslee sarah.gos...@gmail.com wrote: LMGTFY: http://stackoverflow.com/questions/11433432/importing-multiple-csv-files-into-r On Fri, May 29, 2015 at 5:58 PM, Bogdan Tanasa tan...@gmail.com wrote: Dear

Re: [R] about transforming a data.frame

2015-05-29 Thread Jim Lemon
Hi Bogdan, If you mean How can I verify that B1:B2:B3 is paired with all of the values 2, 4 and 5 apply(table(df$col_names,df$CT),1,all) and if you mean How can I verify that B1:B2:B3 is paired with at least one of the values 2, 4 and 5 apply(table(df$col_names,df$CT),1,any) Jim Hi Jim,

Re: [R] about transforming a data.frame

2015-05-29 Thread Bogdan Tanasa
Dear Sarah, thank you very much, it is very helpful. please may I ask one more question about a quick and easy tutorial about the loading multiple files (from a folder) in R, and processing one file at a time ? thanks very much again, bogdan On Fri, May 29, 2015 at 2:55 PM, Sarah Goslee

Re: [R] Why I am not able to load library(R.matlab)? Other packages are fine.

2015-05-29 Thread C W
Hi Ben, Thanks for the fun clip. I love it. Have a wonderful day! -M On Fri, May 29, 2015 at 5:10 PM, Ben Bolker bbol...@gmail.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I think Henrik's point (which I merely clarified) was that something funky (we'll probably never know

Re: [R] Result differences in 32-bit vs. 64-bit point.in.polygon?

2015-05-29 Thread Duncan Murdoch
On 29/05/2015 2:36 PM, Lensing, Shelly Y wrote: Is anyone aware of point.in.polygon giving different results for 32-bit vs. 64-bit R? Our OS is 64-bit Windows 7 Enterprise. I'm working with someone else's extensive R program and the final results are close but not exactly matching. We're

Re: [R] about transforming a data.frame

2015-05-29 Thread Bogdan Tanasa
Hi Jim, thanks again. now I see : the answer to my previous question seems to be yes, as all functions works on logical vectors ... best wishes, -- bogdan On Fri, May 29, 2015 at 4:29 PM, Bogdan Tanasa tan...@gmail.com wrote: Thanks a lot Jim. If I may ask one more little question please,

Re: [R-es] Mi script R es muy lento

2015-05-29 Thread Carlos Ortega
Hola Mª Luz, ¿A qué tipo de cálculos complejos te refieres?. Con data.table puedes definir operaciones (con la complejidad que quieras) para un conjunto de filas, agrupándolas por columnas y más... Su sintaxis es muy compacta pero a poco que la utilizas acabas encontrando la forma de hacer las

Re: [R] about transforming a data.frame

2015-05-29 Thread Bogdan Tanasa
Hi Jim, yes, thank you, that is the desired output. one more question please : after using the dataframe : df - data.frame (row_names = c(B4:B5:B6, B7:B8:B9, D4:D5:D6, D10:D11:D12, D10:D11:D12, E10:E11:E12, A1:A2:A3, B10:B11:B12), col_names = c

Re: [R] about transforming a data.frame

2015-05-29 Thread Sarah Goslee
LMGTFY: http://stackoverflow.com/questions/11433432/importing-multiple-csv-files-into-r On Fri, May 29, 2015 at 5:58 PM, Bogdan Tanasa tan...@gmail.com wrote: Dear Sarah, thank you very much, it is very helpful. please may I ask one more question about a quick and easy tutorial about the

[R] vectorized code

2015-05-29 Thread zeynab jibril
HI I was working on online example, where virus is spread through a graph. The example is sufficient for small graph i.e. small number of edges and nodes. But I tried it on very large graph i.e. 1 nodes and 2 edges, but the below function is not sufficient for large graph because its

Re: [R] Help on R Functionality Histogram

2015-05-29 Thread Boris Steipe
Don't use Nabble when posting to the R-Help forum. Responses inline. On May 29, 2015, at 7:54 AM, Shivi82 shivibha...@ymail.com wrote: Hello Experts, I have couple of questions on the analysis I am creating. 1) How does R adopt to changes. The case I have here is that the excel I have

Re: [R] about transforming a data.frame

2015-05-29 Thread Jim Lemon
Hi Bogdan, Sarah has already suggested this, but doesn't: table(df$row_names,df$CT) table(df$col_names,df$CT) give you what you want? Jim On Sat, May 30, 2015 at 7:11 AM, John Kane jrkrid...@inbox.com wrote: Bogdan, the request was for data in dput() format. Type ?dput for more

Re: [R] TWS and R

2015-05-29 Thread Austin Trombley
Has anyone found a solution to this? I am having the same issue? thanks! On Thursday, November 15, 2012 at 10:35:48 PM UTC-8, abcd1234 wrote: Hi all, The TWS on my system is unable to connect to my R session. Here is the error that I'm getting: / tws-twsConnect() Error in

Re: [R] Converting unique strings to unique numbers

2015-05-29 Thread Hervé Pagès
Hi Bill, On 05/29/2015 01:48 PM, William Dunlap wrote: I'm not sure why which particular ID gets assigned to each string would matter but maybe I'm missing something. What really matters is that each string receives a unique ID. match(x, x) does that. I think each row of the OP's dataset

Re: [R] about transforming a data.frame

2015-05-29 Thread Bogdan Tanasa
Thanks a lot Jim. If I may ask one more little question please, shall I ask the question How can I verify that B1:B2:B3 is paired with ALL of the values 2, 4 and 5 , regardless of the pairing value (in our case, for the code below, the pairing value for B1:B2:B3 is 1, but it can be 2,3,4, etc

Re: [R] Problem with comparing multiple data sets

2015-05-29 Thread Jim Lemon
Hi Mohammad, It looks like you are still having problems with this. Given your latest data set, as below, here is something that might do what you want. From David's message, I'm not sure whether you are operating on a single data frame or a list. # this is the data set as taken from your message

Re: [R] Toronto CRAN mirror 403 error?

2015-05-29 Thread David Winsemius
On May 29, 2015, at 7:12 PM, Mark Drummond wrote: I've been getting a 403 when I try pulling from the Toronto CRAN mirror today. http://cran.utstat.utoronto.ca/ Right. It's been out for the last 2.7 days: http://cran.r-project.org/mirmon_report.html#ca Is there a contact list for

[R] Toronto CRAN mirror 403 error?

2015-05-29 Thread Mark Drummond
I've been getting a 403 when I try pulling from the Toronto CRAN mirror today. http://cran.utstat.utoronto.ca/ Is there a contact list for mirror managers? -- Cheers, Mark *Mark Drummond* m...@markdrummond.ca When I get sad, I stop being sad and be Awesome instead. TRUE STORY.

Re: [R] Toronto CRAN mirror 403 error?

2015-05-29 Thread Jeff Newmiller
This is why there are mirrors. You don't have to wait for them or tell them to do their jobs. --- Jeff NewmillerThe . . Go Live... DCN:jdnew...@dcn.davis.ca.usBasics: ##.#.

Re: [R] Toronto CRAN mirror 403 error?

2015-05-29 Thread Gabor Grothendieck
On Fri, May 29, 2015 at 10:12 PM, Mark Drummond m...@markdrummond.ca wrote: I've been getting a 403 when I try pulling from the Toronto CRAN mirror today. http://cran.utstat.utoronto.ca/ Is there a contact list for mirror managers? See the cran_mirrors.csv file in R.home(doc) of your R

Re: [R] Help on R Functionality Histogram

2015-05-29 Thread Shivi82
Thanks you Sarah. This was very impressive and really helped me out. -- View this message in context: http://r.789695.n4.nabble.com/Help-on-R-Functionality-Histogram-tp4707886p4707949.html Sent from the R help mailing list archive at Nabble.com. __

[R] Converting unique strings to unique numbers

2015-05-29 Thread Kate Ignatius
I have a pedigree file as so: X0001 BYX859 0 0 2 1 BYX859 X0001 BYX894 0 0 1 1 BYX894 X0001 BYX862 BYX894 BYX859 2 2 BYX862 X0001 BYX863 BYX894 BYX859 2 2 BYX863 X0001 BYX864 BYX894 BYX859 2 2 BYX864 X0001 BYX865 BYX894 BYX859 2 2 BYX865 And I was hoping to change

Re: [R] Converting unique strings to unique numbers

2015-05-29 Thread MacQueen, Don
Here is an example to get you started: mycol - c('b','a','d','d','b','c') as.numeric(factor(mycol)) -Don -- Don MacQueen Lawrence Livermore National Laboratory 7000 East Ave., L-627 Livermore, CA 94550 925-423-1062 On 5/29/15, 9:58 AM, Kate Ignatius kate.ignat...@gmail.com wrote: I have

Re: [R] Converting unique strings to unique numbers

2015-05-29 Thread Sarah Goslee
On Fri, May 29, 2015 at 2:16 PM, Hervé Pagès hpa...@fredhutch.org wrote: Hi Kate, I found that matching the character vector to itself is a very effective way to do this: x - c(a, bunch, of, strings, whose, exact, content, is, of, little, interest) ids - match(x, x) ids

Re: [R] Converting unique strings to unique numbers

2015-05-29 Thread William Dunlap
I'm not sure why which particular ID gets assigned to each string would matter but maybe I'm missing something. What really matters is that each string receives a unique ID. match(x, x) does that. I think each row of the OP's dataset represented an individual (column 2) followed by its mother and

Re: [R] about transforming a data.frame

2015-05-29 Thread Bogdan Tanasa
Hi Sarah, thank you for your help. I have simplified the example, by reading the elements in a data frame, eg : df - data.frame (row_names = c(B4:B5:B6, B7:B8:B9, D4:D5:D6, D10:D11:D12, D10:D11:D12, E10:E11:E12, A1:A2:A3, B10:B11:B12), col_names = c

[R] about transforming a data.frame

2015-05-29 Thread Bogdan Tanasa
Dear all, I would appreciate a suggestion on the following : I am working with a data.frame (below) : EXPCT row_names col_names 1 test -5B4:B5:B6B1:B2:B3 2 test -2B7:B8:B9B1:B2:B3 3 test -2D4:D5:D6H4:H5:H6 4 test -2D10:D11:D12 F10:F11:F12 5 test -2

Re: [R] Converting unique strings to unique numbers

2015-05-29 Thread Hervé Pagès
Hi Sarah, On 05/29/2015 12:04 PM, Sarah Goslee wrote: On Fri, May 29, 2015 at 2:16 PM, Hervé Pagès hpa...@fredhutch.org wrote: Hi Kate, I found that matching the character vector to itself is a very effective way to do this: x - c(a, bunch, of, strings, whose, exact, content,

Re: [R] about transforming a data.frame

2015-05-29 Thread Sarah Goslee
Hi, Please use dput() to provide your data, as it can get somewhat mangled by copy and pasting, especially if you post in HTML (as you are asked not to do in the posting guide). What is a unique element? is B4:B5:B6 an element, or are B4 and B5 each elements? That is, what is the result you

[R] Automatically updating a plot from a regularly updated data file

2015-05-29 Thread Sam Albers
Hi all, I have a question about using R in a way that may not be correct but I thought I would ask anyway. I have an instrument that outputs a text file with comma separated data. A new line is added to the file each time the instrument takes a new reading. Is there any way to configure R such

Re: [R] Converting unique strings to unique numbers

2015-05-29 Thread William Dunlap
match() will do what you want. E.g., run your data through the following function. f - function (data) { uniqStrings - unique(c(data[, 2], data[, 3], data[, 4])) uniqStrings - setdiff(uniqStrings, 0) for (j in 2:4) { data[[j]] - match(data[[j]], uniqStrings, nomatch = 0L)

Re: [R] Problems with nls

2015-05-29 Thread Bert Gunter
AFAICS this has essentially nothing to do with R. Please post elsewhere, e.g. on a statistics list like stats.stackexchange.com. Cheers, Bert On Fri, May 29, 2015 at 6:44 AM, Abolfazl Saghafi abolfazl.sagh...@gmail.com wrote: Can some help me with a question on this bass model, please As

Re: [R] Why I am not able to load library(R.matlab)? Other packages are fine.

2015-05-29 Thread C W
Wow, thanks Ben. That worked very well. I guess I didn't have R.methodS3? But that doesn't make sense, because I was using R.matlab few weeks ago. I believe I was on R 3.1. Maybe it's in R 3.1 folder? I am using a Mac, btw. Cheers, -M On Fri, May 29, 2015 at 1:55 PM, Ben Bolker

Re: [R] about transforming a data.frame

2015-05-29 Thread John Kane
Bogdan, the request was for data in dput() format. Type ?dput for more information. Do dput(myfile) copy the ouput and paste into the email You should get something like: structure(list(c1 = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 4L, 4L, 4L, 4L, 5L,

Re: [R] Why I am not able to load library(R.matlab)? Other packages are fine.

2015-05-29 Thread Ben Bolker
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I think Henrik's point (which I merely clarified) was that something funky (we'll probably never know what, and it's not worth figuring out unless it happens again/to other people) had gone wrong and that the easiest thing to do was just to

Re: [R] Automatically updating a plot from a regularly updated data file

2015-05-29 Thread MacQueen, Don
A lot will depend on how frequently data is added to the file, how big the file gets, and how important it is to see updated plots quickly. I have R doing exactly what you describe, and have found logic like this (which might be described as crude) to be sufficient while( {some condition} ) {

Re: [R] about transforming a data.frame

2015-05-29 Thread Bogdan Tanasa
Hi John, thanks for clarifications, yes, of course, the dput() output is the following : dput(dataframe_matches_ddCT) structure(list(FIGURE = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L), .Label = test, class = factor), ddCT = c(-5.4595, -2.7467, -2.7467, -2.7467, -2.7467, -2.7467, -4.5927,