Re: [R] R help on loops

2013-06-07 Thread Berend Hasselman
Please, please do not use html formatted mail. It is clearly requested by the mailing list The code of your last mail is a mess and when replying it becomes even more of a mess. I told you to do siml[g,] - optm(perm=20) See the comma after g. and not what you are now doing with

[R] R help on loops

2013-05-31 Thread Laz
Dear R Users, I created a function which returns a value every time it's run (A simplified toy example is attached on this mail). For example spat(a,b,c,d) # run the first time and it gives you ans1= 10, perm=1 ; run the second time and gives you ans2= 7, perm=2 etc I store both the

Re: [R] R help on loops

2013-05-31 Thread jim holtman
Is this what you want? I was not clear on your algorithm, but is looks like you wanted descending values: testx - + function(n, verbose = FALSE) + { + mat - cbind(optA = sample(n, n, TRUE), perm = seq(n)) + if (verbose){ + cat(***starting matrix\n) + print(mat) + } +

Re: [R] R-help Digest, Vol 123, Issue 30

2013-05-27 Thread Neotropical bat risk assessments
Hi all are there any R packages that include circular stats similar to Oriana (http://www.kovcomp.co.uk/oriana/newver4.html)? I am interested in looking at annual patterns of bat activity where data will have date/times and relative abundance values for each Date. I would like to have a

Re: [R] R-help Digest, Vol 123, Issue 30

2013-05-27 Thread Jim Lemon
On 05/27/2013 10:28 AM, Neotropical bat risk assessments wrote: Hi all are there any R packages that include circular stats similar to Oriana (http://www.kovcomp.co.uk/oriana/newver4.html)? I am interested in looking at annual patterns of bat activity where data will have date/times and

Re: [R] R-Help: nparLD Package Non-parametric Repeated Measures

2013-05-16 Thread Gerrit Eichner
Hello, James, see my comments inline. ... Main issue/question: In R the nparLD ANOVA-type Test showed a significant p-value for diel period, no effect of season, and no interaction between diel period and season. But a post-hoc Wilcoxon Signed-Rank Test did NOT find a significant difference

Re: [R] R help: Batch read files based on names in a list

2013-05-15 Thread arun
1:51 PM Subject: [R] R help: Batch read files based on names in a list * I am currently reading in a series of files, applying the same functions to them one at a time, and then merging the resulting data frames e.g.: MyRows - c(RowA, RowB, RowC)File1_DF - read.delim(DirectoryToFiles

[R] R help: Batch read files based on names in a list

2013-05-15 Thread Jonathan Dry
* I am currently reading in a series of files, applying the same functions to them one at a time, and then merging the resulting data frames e.g.: MyRows - c(RowA, RowB, RowC)File1_DF - read.delim(DirectoryToFiles\\File1_Folder\\File1.txt, stringsAsFactors=FALSE, check.names=FALSE)File1_DF

Re: [R] R help: Batch read files based on names in a list

2013-05-15 Thread Enrico Schumann
On Wed, 15 May 2013, Jonathan Dry dry...@gmail.com writes: * I am currently reading in a series of files, applying the same functions to them one at a time, and then merging the resulting data frames e.g.: MyRows - c(RowA, RowB, RowC)File1_DF -

[R] R-Help: nparLD Package Non-parametric Repeated Measures

2013-05-14 Thread James Casey
Hi, I'm trying to analyze repeated measurements of body temperature data collected from 7 randomly chosen subjects (e.g. turtles). I am using R, along with the nparLD package to test for an effect of diel period (fixed factor: day or night) and season (sub-plot fixed factor: spring, summer, fall)

Re: [R] R help for creating expression data of Differentially expressed genes

2013-05-08 Thread Vivek Das
Hi Arun, I am still facing trouble as I can see the data output is identical for all rows when I am using this merge function. It seems that since in my data2 which I have provided I have not given you the exact genes I have. There are likely to be repeatations of ID in both the files but the

Re: [R] R help for creating expression data of Differentially expressed genes

2013-05-07 Thread arun
Hi Vivek, May be this helps: set.seed(35)  dat1- cbind(ID=1:8, as.data.frame(matrix(sample(1:50,8*7,replace=TRUE),ncol=7))) set.seed(38) dat2- cbind(ID= sample(1:20,8,replace=FALSE), as.data.frame(matrix(sample(1:50,8*33,replace=TRUE),ncol=33))) colnames(dat2)[-1]-gsub(V,X,colnames(dat2)[-1])  

Re: [R] R help for creating expression data of Differentially expressed genes

2013-05-07 Thread Vivek Das
HI Arun, My data sets are as in the provided files. I am providing the sample files. I guess this will give a better idea to the type of working I want to do with the two files and the kind or script am trying to write. Hope you can give me some suggestions regarding this. I am new to R so having

Re: [R] R help for creating expression data of Differentially expressed genes

2013-05-07 Thread arun
HI, Assuming that out_dat.txt is the output you expected.  dat1- read.table(data1.txt,header=TRUE,stringsAsFactors=FALSE) dat2- read.table(data2.txt,header=TRUE,stringsAsFactors=FALSE) out_dat- read.table(out_data.txt,header=TRUE,stringsAsFactors=FALSE)  out_dat2-merge(dat1[,1:4],dat2,by=ID)  

Re: [R] R help - bootstrap with survival analysis

2013-04-30 Thread Terry Therneau
This comes up regularly. Type ?print.survfit and look at the comments there under value. Terry T. - begin included message Hi, I'm not sure if this is the proper way to ask questions, sorry if not. But here's my problem: I'm trying to do a bootstrap estimate of the

[R] R help - bootstrap with survival analysis

2013-04-29 Thread Fayaaz Khatri
Hi, I'm not sure if this is the proper way to ask questions, sorry if not. But here's my problem: I'm trying to do a bootstrap estimate of the mean for some survival data. Is there a way to specifically call upon the rmean value, in order to store it in an object? I've used

Re: [R] R-help Digest, Vol 121, Issue 5

2013-03-26 Thread Kerry
Thank you Jason!  actually, there have been two solutions and one is yours setting row.names=F works great, additionally what Ive been having problems with is the European version of Word 2010.  Apparently it sets delimiters of ; instead of , as in the English/USA version.  This is something

Re: [R] R-help Digest, Vol 121, Issue 5

2013-03-26 Thread Robert Baer
On 3/26/2013 7:21 AM, Kerry wrote: Thank you Jason! actually, there have been two solutions and one is yours setting row.names=F works great, additionally what Ive been having problems with is the European version of Word 2010. Apparently it sets delimiters of ; instead of , as in the

Re: [R] R-help Digest, Vol 121, Issue 5

2013-03-05 Thread Law, Jason
On R 2.15.2 and ArcGIS 9.3.1, it works for me in ArcCatalog but you have to follow the particulars here: http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=Accessing_delimited_text_file_data For example: write.table(test, '***.tab', sep = '\t', row.names = F) The extension .tab and

[R] R -HELP REQUEST

2013-02-05 Thread Mahmoud Coker
Good morning to you all, Sorry for taking your time from your research and teaching schedules.   If you have a non-stationary univariate time Series data that has the transformation: Say; l.dat-log (series) d.ldat-diff (l.dat, differences=1) and you fit say arima model. predit.arima-predict

Re: [R] R -HELP REQUEST

2013-02-05 Thread Rolf Turner
If you just want point forecasts, it's simple: Let your original series be X_t, t=1, ..., N. Let Y_t = log(X_t). Let Z_t = Y_t - Y_{t-1}, t = 2, ..., N. Fit your model and forecast, obtaining Z-hat__1, ..., Z-hat_10. Then Y-hat_{N+1} = Y_N + Z-hat_1, Y-hat_{N+2} = Y-hat_{N+1} + Z-hat_2, .,

[R] R-help archives --- are they up-to-date?

2013-01-29 Thread Rolf Turner
I just saw a message from David Winsemius, responding to an inquiry from Carol White: On Jan 28, 2013, at 9:06 PM, carol white wrote: Should I understand that this message was received? It's always possible to check the Archives for this question. This prompted me to ask about a problem

Re: [R] R-help archives --- are they up-to-date?

2013-01-29 Thread Sarah Goslee
The searchable archives may lag, and apparently do. The main list archive is here: https://stat.ethz.ch/pipermail/r-help/ and is complete. That's the one to check if you wish to know whether something made it to the list. If you go to the r-help listinfo link in the mailing list footer, you are

Re: [R] R-help archives --- are they up-to-date?

2013-01-29 Thread Rolf Turner
On 01/30/2013 10:28 AM, Sarah Goslee wrote: The searchable archives may lag, and apparently do. The main list archive is here: https://stat.ethz.ch/pipermail/r-help/ and is complete. That's the one to check if you wish to know whether something made it to the list. If you go to the r-help

[R] r-help

2013-01-10 Thread Paul Musingila
-- ___ Paul K. Musingila University of Hasselt, I-Biostat, Diepenbeek, Belgium Mobile: +254-724-423532, +32-48-637-4558 E-mail: paul.musing...@student.uhasselt.be, pmusing...@gmail.com Skype: pmusingila When darkness overtakes the godly, light will come bursting

[R] R-help post Bayesian CART

2013-01-07 Thread Rachel Plewes
Hi, I have explored many of the R packages that construct Bayesian trees including the tgp, bart, BMA and maptree packages. I have also searched through some other packages but they do not seem to be suitable for the type of analysis I need to do. I need to construct Bayesian CART that have

Re: [R] R-help Digest, Vol 118, Issue 20

2012-12-20 Thread Terry Therneau
I don't know of one. If building your own you could use rpart with the maxdepth=1 as the tool to find the best split at each node. Terry Therneau On 12/20/2012 05:00 AM, r-help-requ...@r-project.org wrote: Hi, I've searched R-help and haven't found an answer. I have a set of data from

[R] R help..subsetting data frame that meeting multiple criteria

2012-11-23 Thread prasmas
Hi, I am new to R. I am trying to regroup data frame using multiple constrains. for example data frame: data value class percent 15526 36 4.6875 15527 62 85.9375 15527 82 32.4564 15528 36 70.3125 15528 62 9.375 15528 82 74.6875 I need to regroup

Re: [R] R help..subsetting data frame that meeting multiple criteria

2012-11-23 Thread David Winsemius
On Nov 23, 2012, at 1:14 PM, prasmas wrote: Hi, I am new to R. I am trying to regroup data frame using multiple constrains. for example data frame: data value class percent 15526 36 4.6875 15527 62 85.9375 15527 82 32.4564 15528 36 70.3125 15528 62

Re: [R] R help..subsetting data frame that meeting multiple criteria

2012-11-23 Thread Rui Barradas
Hello, Like the following? dat - read.table(text= value class percent 15526 36 4.6875 15527 62 85.9375 15527 82 32.4564 15528 36 70.3125 15528 62 9.375 15528 82 74.6875 , header = TRUE) per70 - dat$percent 70 split(dat, list(dat$class, per70)) Hope this helps, Rui Barradas Em 23-11-2012

Re: [R] R help..subsetting data frame that meeting multiple criteria

2012-11-23 Thread David Winsemius
, 2012 7:40 PM Subject: Re: [R] R help..subsetting data frame that meeting multiple criteria On Nov 23, 2012, at 1:14 PM, prasmas wrote: Hi, I am new to R. I am trying to regroup data frame using multiple constrains. for example data frame: data valueclasspercent 1552636

Re: [R] R help..subsetting data frame that meeting multiple criteria

2012-11-23 Thread arun
and 1 to a and b. row.names(mat1)-gsub(1,b,gsub(0,a,row.names(mat1)))  row.names(mat1) #[1] 36_a 62_b 82_a 36_b 62_a 82_b 72_a 72_a Hope it helps. A.K. - Original Message - From: prasmas prasad...@gmail.com To: r-help@r-project.org Cc: Sent: Friday, November 23, 2012 4:14 PM Subject: [R] R

Re: [R] R help..subsetting data frame that meeting multiple criteria

2012-11-23 Thread arun
74.6875 A.K. - Original Message - From: David Winsemius dwinsem...@comcast.net To: prasmas prasad...@gmail.com Cc: r-help@r-project.org Sent: Friday, November 23, 2012 7:40 PM Subject: Re: [R] R help..subsetting data frame that meeting multiple criteria On Nov 23, 2012, at 1:14 PM

[R] r-help or r-devel ?

2012-11-05 Thread Christophe Genolini
Hi the list, I have some basic questions about writing a package. On which list shall I post them? Theoretically, I am supposed to post them on r-devel, but all the questions on this list are very advance questions, not basic ones... So I don't know what to do. Christophe -- Christophe

Re: [R] r-help or r-devel ?

2012-11-05 Thread Marc Schwartz
On Nov 5, 2012, at 11:24 AM, Christophe Genolini cgeno...@u-paris10.fr wrote: Hi the list, I have some basic questions about writing a package. On which list shall I post them? Theoretically, I am supposed to post them on r-devel, but all the questions on this list are very advance

[R] R help - Adding a column in a data frame with multiple conditions

2012-10-04 Thread Libby M Gertken
Hi, I am trying to add a column of numbers to a data frame in R with multiple conditions. Here is a simplified example df: [A] [B] [C] [D] [E] [1] 1 X 90 88 [2] 1 Y 72 70 [3] 1 Z 67 41 [4] 2 X 74 49 [5] 2 Y 42 50 [6] 2 Z 81 56 [7] 3 X 92 59 [8] 3 Y 94 80 [9] 3 Z 80 82 I would like column [E]

Re: [R] R help - Adding a column in a data frame with multiple conditions

2012-10-04 Thread Sarah Goslee
Hi Libby, You had an accumulation of small errors, from an extra ) to an unclear understanding of how indexing works in R. Also, you shouldn't call your dataframe df, or use square brackets in column names. That said, what about: sampledata - structure(list(A = c(1L, 1L, 1L, 2L, 2L, 2L, 3L,

Re: [R] R help - Adding a column in a data frame with multiple conditions

2012-10-04 Thread arun
Gertken libb...@utexas.edu Cc: r-help@r-project.org Sent: Thursday, October 4, 2012 4:03 PM Subject: Re: [R] R help - Adding a column in a data frame with multiple conditions Hi Libby, You had an accumulation of small errors, from an extra ) to an unclear understanding of how indexing works in R

Re: [R] R-help Digest, Vol 115, Issue 12

2012-09-12 Thread Stephen Politzer-Ahles
Hello Amelie, I don't have an answer to your question, but I just wanted to point out this page I noticed recently ( http://hlplab.wordpress.com/2009/05/07/multinomial-random-effects-models-in-r/), which might be helpful. I'm also interested in figuring out how to do a multinomial glmm, so if

[R] R-help question

2012-08-13 Thread Louise Cowpertwait
Hi there, I have subscribed to R-help but am not sure how to view or post questions? I think this is the right way. I am planning on doing a multivariate regression investigating the relationship between depression (a continuous variable) and social support variables (mostly continuous, some

Re: [R] R-help question

2012-08-13 Thread R. Michael Weylandt
On Sun, Aug 12, 2012 at 10:58 PM, Louise Cowpertwait louisecowpertw...@gmail.com wrote: Hi there, I have subscribed to R-help but am not sure how to view or post questions? I think this is the right way. Indeed! I am planning on doing a multivariate regression investigating the

[R] R help

2012-08-08 Thread chong hui qi
Hi I'm trying to increase the memory limit but Im facing this problem Error: unexpected symbol in C:\\Program Files\\R\\R-2.15.0\\bin\\i386\\Rgui.exe --max-mem-size=500M Hope you can help me out Thank You [[alternative HTML version deleted]]

Re: [R] R help

2012-08-08 Thread Jeff Newmiller
There seem to be too many quotes in your error message... the path and name of the program should be quoted, the argument should not (or should be separately quoted). 500M isn't especially large these days... be sure to check your existing (default) value using the memory.limit() function

Re: [R] R help

2012-08-08 Thread Jeff Newmiller
Please continue to include the r-help list in the conversation... you will most likely get your solution quicker. Why do you have double backslashes? That is needed within R, but not at the command line or in a shortcut.

Re: [R] R: Help xts object Subset Date by Day of the Week

2012-08-06 Thread R. Michael Weylandt
On Sun, Aug 5, 2012 at 4:49 PM, Douglas Karabasz doug...@sigmamonster.com wrote: I have a xts object made of daily closing prices I have acquired using quantmod. Here is my code: library(xts) library(quantmod) library(lubridate) # Gets SPY data getSymbols(SPY) # Subset Prices

Re: [R] R: Help xts object Subset Date by Day of the Week

2012-08-06 Thread R. Michael Weylandt
On Mon, Aug 6, 2012 at 4:30 PM, R. Michael Weylandt michael.weyla...@gmail.com wrote: On Sun, Aug 5, 2012 at 4:49 PM, Douglas Karabasz doug...@sigmamonster.com wrote: I have a xts object made of daily closing prices I have acquired using quantmod. Here is my code: library(xts)

[R] R: Help xts object Subset Date by Day of the Week

2012-08-05 Thread Douglas Karabasz
I have a xts object made of daily closing prices I have acquired using quantmod. Here is my code: library(xts) library(quantmod) library(lubridate) # Gets SPY data getSymbols(SPY) # Subset Prices to just closing price SP500 - Cl(SPY) # Show day of the week for each date using 2-6

Re: [R] R- Help (looping)

2012-07-31 Thread Rui Barradas
Hello, Inline Em 31-07-2012 02:59, Wellington Silva escreveu: Ok, This really helped. You've probably noticed, I'm a begginer using R. And when you said that you tried with rnorm and the counts were not zero, where did you use the rnorm? Where the runif is, in its stead use matrix(

Re: [R] R- Help (looping)

2012-07-31 Thread Rui Barradas
Hello, Glad it helped. E fico à espera do relatório. Rui Barradas Em 31-07-2012 14:40, Wellington Silva escreveu: Rui, This is a cientific initiation program. The idea is to develop a code which can simulate data and calculate the ARL later. *So, a little bit later yesterday night, after

[R] R- Help (looping)

2012-07-30 Thread Wellington G. Silva
Hi, I'm Wellington from Brazil and I have the following issue: I've been working on a project a for a while, and I'm having trouble in using the loop (for) I need to read a column (c1), and for each value of this column, I need to check if it's within the control limits So, I was

Re: [R] R- Help (looping)

2012-07-30 Thread Rui Barradas
Hello, Your code example doesn't make much sense, it needs decrypting. Let's see, for(k in 1:length(c1)){ if(c1[k] lcl | c1[k] ucl) {do something} } If this is it, then you can completely avoid the loop: i1 - c1 lcl | c1 ucl # create an index vector out.of.control - c1[ i1 ]

Re: [R] R- Help (looping)

2012-07-30 Thread Rui Barradas
Hello, Try the following. # make up some data dds - 1e3 nc - 10 xss - data.frame(matrix(runif(nc*dds, min=-1, max=1), ncol=nc)) names(xss) - paste0(xs, 1:10) # two functions with descriptive names getControlLimits - function(x, L = 3){ mu - mean(x) sigma - sd(x) c(lcl = mu -

Re: [R] R-help Digest, Vol 113, Issue 20

2012-07-17 Thread Francois Maurice
Hi,   I'm using write.table() to export dataframe to Excel. All works fine except that I want to export the variable labels instead of variable names.    I can see the labels in the R consol using attr(), but I just don't know how to use the labels instead of the names.   Thanks,   François

[R] R help

2012-07-16 Thread Sébastien Morant
hi would you please remove my email from the mailing list. thanks in advance Sebastien [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] R help

2012-07-16 Thread Jessica Streicher
https://stat.ethz.ch/mailman/listinfo/r-help at the bottom… On 16.07.2012, at 10:52, Sébastien Morant wrote: hi would you please remove my email from the mailing list. thanks in advance Sebastien [[alternative HTML version deleted]] __

Re: [R] R-help Digest, Vol 113, Issue 19

2012-07-16 Thread e-letter
On 16/07/2012, r-help-requ...@r-project.org r-help-requ...@r-project.org wrote: -- Message: 77 Date: Mon, 16 Jul 2012 10:48:39 +0100 From: Rui Barradas ruipbarra...@sapo.pt To: e-letter inp...@gmail.com Cc: r-help@r-project.org Subject: Re: [R] histogram of

Re: [R] R-help Digest, Vol 113, Issue 13

2012-07-10 Thread Terry Therneau
http://www.ncbi.nlm.nih.gov/pubmed/21418051 for the full reference. I don't have an electronic copy, but I do have that issue of Biometrics in my office. I'll have a copy sent over. Terry On 07/10/2012 04:08 PM, r-help-requ...@r-project.org wrote: Send R-help mailing list submissions to

[R] R help, using R to build choropleth

2012-06-28 Thread iverson
Hi guys i need some help to build choropleth. Basically i am trying to colour regions on the map by population. I possess the shape file of the country, and also the population data, however, i am having trouble to create the plot, below is my code: population=read.csv(nz2.csv) population

Re: [R] R help, using R to build choropleth

2012-06-28 Thread Pascal Oettli
Hello, You can find some hints there: http://geography.uoregon.edu/geogr/topics/index.html Regards Le 12/06/28 14:26, iverson a écrit : Hi guys i need some help to build choropleth. Basically i am trying to colour regions on the map by population. I possess the shape file of the country,

Re: [R] R help, using R to build choropleth

2012-06-28 Thread Jim Lemon
On 06/28/2012 03:26 PM, iverson wrote: Hi guys i need some help to build choropleth. Basically i am trying to colour regions on the map by population. I possess the shape file of the country, and also the population data, however, i am having trouble to create the plot, below is my code:

Re: [R] R-help Digest, Vol 112, Issue 25

2012-06-25 Thread John C Nash
While lm() is a linear modeling, the constraints make it easier to solve with a nonlinear tool. Both my packages Rvmmin and Rcgmin (I recommend the R-forge versions as more up-to-date) have bounds constraints and masks i.e., fixed parameters. I am actually looking for example problems of this

Re: [R] R-help Digest, Vol 112, Issue 6

2012-06-06 Thread David L Lorenz
Rich, The documentation for cenboxplot states that the second argument must be logical and not integer. the function cenboxplot substitutes synthetic values for censored values using ros, hence the error message from the ros method. I also do not understand how you expect group = 'SO4' to

Re: [R] R help!

2012-05-03 Thread Nutter, Benjamin
] On Behalf Of Alex Roth Sent: Wednesday, May 02, 2012 4:01 PM To: r-help@r-project.org Subject: [R] R help! Hello there, I was wondering if you could help me with a quick R issue. I have a data set where one of the columns has both date and time in it, e.g. 12/31/11 23:45 in one cell. I want

Re: [R] R help!

2012-05-03 Thread peter dalgaard
On May 3, 2012, at 14:05 , Nutter, Benjamin wrote: So long as x is a character vector, I tend to use the following for this problem. x - c(12/31/11 23:45, 1/1/12 2:15) x.split - strsplit(x, ) x.date - sapply(x.split, function(y) return(y[1])) x.time - sapply(x.split, function(y) if

Re: [R] R help!

2012-05-03 Thread Petr PIKAL
Hi I would convert it to propper date format and then you can extract anything. dat-strptime(12/31/11 23:45, format=%m/%d/%y %H:%M) as.Date(dat) [1] 2011-12-31 format(dat, %H:%M) [1] 23:45 Regards Petr Hello there, I was wondering if you could help me with a quick R issue. I have a

[R] R help!

2012-05-02 Thread Alex Roth
Hello there, I was wondering if you could help me with a quick R issue. I have a data set where one of the columns has both date and time in it, e.g. 12/31/11 23:45 in one cell. I want to use R to split this column into two new columns: date and time. One of the problems with splitting here is

Re: [R] R help!

2012-05-02 Thread Jorge I Velez
Hi Alex, Here is one way: s - 12/31/11 23:45 strsplit(s, )[[1]] # [1] 12/31/11 23:45 * HTH, Jorge.- * On Wed, May 2, 2012 at 4:00 PM, Alex Roth wrote: Hello there, I was wondering if you could help me with a quick R issue. I have a data set where one of the columns has both date and

Re: [R] R help!

2012-05-02 Thread Berend Hasselman
On 02-05-2012, at 22:00, Alex Roth wrote: Hello there, I was wondering if you could help me with a quick R issue. I have a data set where one of the columns has both date and time in it, e.g. 12/31/11 23:45 in one cell. I want to use R to split this column into two new columns: date and

Re: [R] R help!

2012-05-02 Thread Jeff Newmiller
Hard to say.. your example is not reproducible. (Study the Posting Guide mentioned at the end of every message on this list.) A stab in the dark might be that z$dt is a factor and needs to be converted to character first. Use the str function to study your data.

Re: [R] R-help Digest, Vol 110, Issue 28

2012-04-26 Thread Richard Valliant
I will be out of the office Apr 26-27, 2012 with limited or no email access. For immediate help, please call the JPSM main number, 301-314-7911. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

Re: [R] R-help Digest, Vol 110, Issue 23

2012-04-23 Thread Terry Therneau
Yes, the (start, stop] formalism is the easiest way to deal with time dependent data. Each individual only needs to have sufficient data to describe them, so for if id number 4 is in house 1, their housemate #1 was eaten at time 2, and the were eaten at time 10, the following is sufficient

[R] R: Help; error in optim

2012-04-15 Thread Christopher Kelvin
Hello, When i run the code below from Weibull distribution with 30% censoring by using optim i get an error form R, which states that Error in optim(start, fn = z, data = q, hessian = T) :    objective function in optim evaluates to length 25 not 1 can somebody help me remove this error. Is my

Re: [R] R: Help; error in optim

2012-04-15 Thread Berend Hasselman
On 16-04-2012, at 07:04, Christopher Kelvin wrote: Hello, When i run the code below from Weibull distribution with 30% censoring by using optim i get an error form R, which states that Error in optim(start, fn = z, data = q, hessian = T) : objective function in optim evaluates to

Re: [R] R-help: Censoring data (actually an optim issue

2012-04-14 Thread John C Nash
-project.org r-help@r-project.org Subject: [R] R-Help: Censoring data Message-ID: 1334314483.27693.yahoomail...@web65408.mail.ac4.yahoo.com Content-Type: text/plain; charset=iso-8859-1 Hello, ?I want to estimate weibull parameters with 30% censored data. I have below the code

[R] R-Help: Censoring data

2012-04-13 Thread Christopher Kelvin
Hello,  I want to estimate weibull parameters with 30% censored data. I have below the code for the censoring  but how it must be put into the likelihood equation to obtain the desire estimate is where i have a problem with,  can some body help?  My likelihood equation is for a random type-I

[R] R-help; generating censored data

2012-04-11 Thread Christopher Kelvin
Hello,  can i implement this as 10% censored data where t gives me failure and x censored. Thank you p=2;b=120 n=50 set.seed(132); r-sample(1:50,45) t-rweibull(r,shape=p,scale=b) t set.seed(123);  cens - sample(1:50, 5)  x-runif(cens,shape=p,scale=b)  x Chris Guure Researcher, Institute for

Re: [R] R-help; generating censored data

2012-04-11 Thread Ted Harding
On 11-Apr-2012 16:28:31 Christopher Kelvin wrote: Hello, can i implement this as 10% censored data where t gives me failure and x censored. Thank you p=2;b=120 n=50 set.seed(132); r-sample(1:50,45) t-rweibull(r,shape=p,scale=b) t set.seed(123);_ cens - sample(1:50, 5)_

[R] R-help; Censoring

2012-04-10 Thread Christopher Kelvin
Hello, I wish to censor 10% of my sample units of 50 from a Weibull distribution. Below is the code for it. I will need to know whether what i have done is correct and if not, can i have any suggestion to improve it? Thank you  p=2;b=120 n=50 r=45 t-rweibull(r,shape=p,scale=b)

Re: [R] R-help; Censoring

2012-04-10 Thread David Winsemius
On Apr 10, 2012, at 11:48 PM, Christopher Kelvin wrote: Hello, I wish to censor 10% of my sample units of 50 from a Weibull distribution. Below is the code for it. I will need to know whether what i have done is correct and if not, can i have any suggestion to improve it? Thank you

[R] R help

2012-04-07 Thread kebrab67
I have a 11*1562 set of data. I want to regress using ols all combination of the ten variables on the eleventh. Store the results of the t test of each regression and the r2 to compare which combination is better. the combination can use any amount o variables. How can I do that in R? -- View

Re: [R] R help

2012-04-07 Thread R. Michael Weylandt
This is, more often that not, statistically speaking a bad idea: you're likely to get a false positive (https://xkcd.com/882/) But it sounds like something along these lines should work for you to get the models : x - data.frame(rnorm(50), rnorm(50), rnorm(50), rnorm(50)) m - vector(list,

Re: [R] R help

2012-04-07 Thread Peter Ehlers
On 2012-04-07 08:27, kebrab67 wrote: I have a 11*1562 set of data. I want to regress using ols all combination of the ten variables on the eleventh. Store the results of the t test of each regression and the r2 to compare which combination is better. the combination can use any amount o

[R] R Help

2012-03-31 Thread Jaymin Shah
Hi, I have a polynomial of 2n^2-5n+3 and I have my n values going up in powers of 2 i.e. n=2,4,8,16….. I wanted to fit this curve to the function A*n*log2(n) +B*n where A and B are to be found. How would i do this? Thank you Jaymin __

Re: [R] R Help

2012-03-31 Thread R. Michael Weylandt
This sounds a little bit like homework (since you know the actual model), so I'll just point you in the right direction: I'd do something like: n - 2^(1:10) y - 2*n^2 - 5*n + 3 dtf - data.frame(y = y, n=n) lm( **, data = dtf) The * should be replaced by a formula object: to find

Re: [R] R-help Digest, Vol 109, Issue 16

2012-03-16 Thread Gerald Lindsly
Q #1: yesterday: A: 1. Restructure your database with NoSQL.  See MongoDB.org.     2. Choose application language with which to work (and get Driver) and write your code.     3. R package - rmongodb. __ R-help@r-project.org mailing list

[R] R-help-es have reached 500 members!

2012-03-13 Thread Kjetil Halvorsen
This posting is only to celebrate that R-help-es (R-help for Spanish Speakers) have reached 500 members! (and to thank Patricia for doing the bulk of admin work). Kjetil __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] R-help-es have reached 500 members!

2012-03-13 Thread Igor Sosa Mayor
:) congratulations! On Tue, Mar 13, 2012 at 08:59:56AM -0600, Kjetil Halvorsen wrote: This posting is only to celebrate that R-help-es (R-help for Spanish Speakers) have reached 500 members! (and to thank Patricia for doing the bulk of admin work). Kjetil

Re: [R] R-help Digest, Vol 109, Issue 9

2012-03-09 Thread Terry Therneau
On Fri, 2012-03-09 at 12:00 +0100, r-help-requ...@r-project.org wrote: A note on standard errors: ?S(t) +- std is a terrible confidence interval. ?You will be much more accurate if you use log scale. ?(Some argue for logit or log-log, in truth they all work well.) ? If n is large

Re: [R] R help

2012-02-19 Thread Petr Savicky
On Sat, Feb 18, 2012 at 06:00:53PM -0500, li li wrote: Dear all, I need to generate numbers from multivariate normal with large dimensions (5,000,000). Below is my code and the error I got from R. Sigma in the code is the covariance matrix. Can anyone give some idea on how to take care of

Re: [R] R help

2012-02-19 Thread li li
Petr, Thanks for the help. That certainly makes sense and solves my current problem. But, in general, for arbitrary covariance matrix (instead of the special equi-correlation case), it there a way to generate numbers from multivariate normal when the dimension is very high? Thanks.

Re: [R] R help

2012-02-19 Thread li li
Actually I still get an error for the case of equal correlation. Below is the code m - 10 n - 500 m1 - 0.5*m mu - c(rep(2, m1), rep(0, m-m1)) rho - 0.5 x.mod1 - matrix(rnorm(n*m, sd=sqrt(1-rho)), nrow=n, ncol=m)+rnorm(n, sd=sqrt(rho))+t(replicate(n,mu)) Error: cannot allocate vector of

Re: [R] R help

2012-02-19 Thread peter dalgaard
On Feb 19, 2012, at 16:53 , li li wrote: Petr, Thanks for the help. That certainly makes sense and solves my current problem. But, in general, for arbitrary covariance matrix (instead of the special equi-correlation case), it there a way to generate numbers from multivariate normal when

Re: [R] R help

2012-02-19 Thread David Winsemius
On Feb 19, 2012, at 11:46 AM, li li wrote: Actually I still get an error for the case of equal correlation. No. You need to read the error message for meaning. Below is the code m - 10 n - 500 m1 - 0.5*m mu - c(rep(2, m1), rep(0, m-m1)) rho - 0.5 x.mod1 - matrix(rnorm(n*m,

Re: [R] R help

2012-02-19 Thread Petr Savicky
On Sat, Feb 18, 2012 at 06:00:53PM -0500, li li wrote: Dear all, I need to generate numbers from multivariate normal with large dimensions (5,000,000). Hi. I am replying to your first email, since the other did not arrive to my folder, possibly filtered out by a spam filter. I see them at

Re: [R] R help

2012-02-19 Thread Bert Gunter
Folks: Perhaps I am naive, ignorant, or foolish, but this whole discussion seems rather ridiculous. What possible relation to reality could a multivariate normal of the size requested have? Even for simulation, it seems like nonsense. Cheers, Bert On Sun, Feb 19, 2012 at 11:35 AM, Petr Savicky

Re: [R] R help

2012-02-19 Thread Rolf Turner
On 20/02/12 09:55, Bert Gunter wrote: Folks: Perhaps I am naive, ignorant, or foolish, but this whole discussion seems rather ridiculous. What possible relation to reality could a multivariate normal of the size requested have? Even for simulation, it seems like nonsense. Right on, bro'!!!

[R] R help

2012-02-18 Thread li li
Dear all, I need to generate numbers from multivariate normal with large dimensions (5,000,000). Below is my code and the error I got from R. Sigma in the code is the covariance matrix. Can anyone give some idea on how to take care of this error. Thank you. Hannah m - 500

Re: [R] R-help Digest, Vol 108, Issue 16

2012-02-16 Thread Gian Maria Niccolò Benucci
Hi Petr, You advice options(scipen=20) gave me the expected result and fix the problem. Thanks a lot! Gian [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] R-help Digest, Vol 108, Issue 13

2012-02-13 Thread 丁飞
dear: i want to know how to get a survival curve of the Cox proportional risk regression, thank you. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] R-help Digest, Vol 108, Issue 13

2012-02-13 Thread Milan Bouchet-Valat
Le lundi 13 février 2012 à 19:48 +0800, 丁飞 a écrit : dear: i want to know how to get a survival curve of the Cox proportional risk regression, thank you. See the relevant part of the Survival Task View here: http://cran.r-project.org/web/views/Survival.html And more specifically, see the

<    1   2   3   4   5   6   7   >