Re: [R] HOW to use the survivalROC to get optimal cut-off values?

2012-02-21 Thread David Winsemius
On Feb 21, 2012, at 12:08 AM, alexiamelissa wrote: I have a follow up question to Dr Winsemius' post. You can use the AIC criterion against all possible cut off values C to see which minimizes the AIC and then that is the ideal cut off in trying to dichotomize a continuous variable.

Re: [R] HOW to use the survivalROC to get optimal cut-off values?

2012-02-21 Thread David Winsemius
On Feb 21, 2012, at 3:21 AM, David Winsemius wrote: On Feb 21, 2012, at 12:08 AM, alexiamelissa wrote: I have a follow up question to Dr Winsemius' post. You can use the AIC criterion against all possible cut off values C to see which minimizes the AIC and then that is the ideal cut off

Re: [R] stats on transitions from one state to another

2012-02-21 Thread Murali.Menon
David: Brilliant! Thanks very much. As Berend pointed out, I was not precise in the query, sorry. Please note in the example that we have a run of three state 2 after 0, and later another run of two state 2 after 0. 0 2 2 2 0 0 2 2 Whenever the state moves from 0 to 2, I want to compute

Re: [R] Metafor: Moderator variables for each study arm

2012-02-21 Thread Viechtbauer Wolfgang (STAT)
Dear Faiz, in principle, you can include whatever moderators you want in a meta-regression model. A technical issue here is that the two follow-up variables are probably strongly correlated, so this may create issues with the model fitting and it also complicates the interpretation of the

Re: [R] Using substitute in nested function calls

2012-02-21 Thread Eik Vettorazzi
Hi Sebastian, how about this: mycurve - function (expr) { do.call(curve,list(substitute(expr),-100,100)) } mycurve(x^2) mycurve(sin(x/20)) mycurve(x+x^2-x^3) cheers Am 21.02.2012 06:28, schrieb Sebastian Kranz: Dear List members, I really, like the feature that one can call R functions

[R] add.cross.strata.test function query

2012-02-21 Thread Vijayan Padmanabhan
Dear R Group in package Deducer, how should i use the add.cross.strata.test() function to pass the chi.squared.test function as htest argument? ##Example### library(Deducer) dat-data.frame(a=rnorm(100).5,b=rnorm(100)0,c=rnorm(100)(-.5)) tables-contingency.tables( row.vars=a,

Re: [R] Using substitute in nested function calls

2012-02-21 Thread Sebastian Kranz
Thanks, that is exactly what I have been looking for! On Tue, 21 Feb 2012 11:58:01 +0100 Eik Vettorazzi e.vettora...@uke.de wrote: Hi Sebastian, how about this: mycurve - function (expr) { do.call(curve,list(substitute(expr),-100,100)) } mycurve(x^2) mycurve(sin(x/20)) mycurve(x+x^2-x^3)

Re: [R] Questions on Data reading using zoo package

2012-02-21 Thread Gabor Grothendieck
On Tue, Feb 21, 2012 at 2:25 AM, jpm miao miao...@gmail.com wrote: Hello,   I try to handle the data using read.csv , zoo and aggregate functions. The data contains NA values. After aggregating monthly data into quarterly data, all data become NA. Is it because I don't properly aggregate the

[R] Plot Many Data to same plot

2012-02-21 Thread Alaios
Dear all, I have a function that for a variable number of inputs plots them to the same plot I am doing this quite simply by plot(seq(from=start, to=stop, length.out=np), datalist[[1]]$dataset xlim=c(start, stop), ylim=c(0, 1),

Re: [R] bootstrap in time dependent Cox model?

2012-02-21 Thread Terry Therneau
Two comments. I've not found bootstrapping worthwhile for Cox models. If one has 10-20 events per covariate and no outrageous coefficients (risks of 10 fold) the standard asymptotics are very good. With an multiple events AG model there is the additional consideration that no one subject is

Re: [R] Plot Many Data to same plot

2012-02-21 Thread R. Michael Weylandt
What do you want to change about the lines? pch (different characters) might give the desired variety. Michael On Tue, Feb 21, 2012 at 7:56 AM, Alaios ala...@yahoo.com wrote: Dear all, I have a function that for a variable number of inputs plots them to the same plot I am doing this quite

[R] breaks display of hist

2012-02-21 Thread carol white
Hello, How can I display the xlim of the boundaries of all or specific breaks in a histogram? I generated the attached plot with hist and would like to know which values of x correspond to the frequency 329 and display these values on the x axis? Best,

Re: [R] Use probesets with highest baseline expression for differntial gene expression in LIMMA

2012-02-21 Thread Martin Morgan
On 02/20/2012 08:35 PM, ejm0091 wrote: Hello All, I am relatively new to R. I would like to know if there is a way to alter LIMMA defualt options such that the package instead of averaging signal intensities of probesets selects the probesets with highest baseline expression/highest signal

Re: [R] Debugging using RStudio or any other R editor

2012-02-21 Thread R. Michael Weylandt
?findLineNum in conjunction with ?setBreakpoint and ?traceback or options(error=recover) seems like a good strategy within R. Not sure what you can get on the IDE end. Michael On Tue, Feb 21, 2012 at 2:38 AM, jpm miao miao...@gmail.com wrote: Hello,   I am using RStudio and have trouble

Re: [R] Debugging using RStudio or any other R editor

2012-02-21 Thread Shige Song
Both ESS (with ess-tracebug) and StatET (an R plug-in for Eclipse) has debugger function. Shige On Tue, Feb 21, 2012 at 8:16 AM, R. Michael Weylandt michael.weyla...@gmail.com wrote: ?findLineNum in conjunction with ?setBreakpoint and ?traceback or options(error=recover) seems like a good

Re: [R] proto: make a parameter persist

2012-02-21 Thread Gabor Grothendieck
On Tue, Feb 21, 2012 at 12:15 AM, Ben quant ccqu...@gmail.com wrote: Thanks again for your so far on proto. I have another question. What is the best way to do stuff based on data prior to calling a function? I tried the code below without expr (and including commas after data member

Re: [R] Dataframes in PLS package

2012-02-21 Thread Bjørn-Helge Mevik
westland westl...@uic.edu writes: Here is what I have done: I read in an 1 x 8 table of data, and assign the first four columns to matrix A and the second four to matrix B pls -read.table(C:/Users/Chris/Desktop/SEM Book/SEM Stat Example/Simple Header Data for SEM.csv,

Re: [R] ggplot rank stack bar automatically.

2012-02-21 Thread vd3000
Hi Ista, I got it. I try to deselect the all packages and try to run the code again. Eventually, the console display no digest package. You are so nice. A lot of things to learn... Many thanks. Best, VD -- View this message in context:

Re: [R] sqlite create new unique id

2012-02-21 Thread Chris Campbell
Hi Alok Are you certain that you are keeping your connection open? last_insert_rowid() returns id of last inserted row from the current database connection (which invoked the function). Is it possible that every time you run the query you making a new connection? Hope this helps, Chris

Re: [R] assign same legend colors than in the grouped data plot

2012-02-21 Thread agent dunham
Dear all, Thanks all of u for your help. Now I've another similar problem. I want to plot within the same plot, different lines, each one in a different color depending on the factor level. I've been able to do it like this, but if i try with rainbow colors it doesn't work. Can anybody help me

[R] Parameter estimation of Reduced model

2012-02-21 Thread mhimanshu
Hi Everyone, I am working on Reduced model say a ODE and I want to do the Parameter estimation of the model. Could you please help me in this? Thanks in advance. -- View this message in context: http://r.789695.n4.nabble.com/Parameter-estimation-of-Reduced-model-tp4406701p4406701.html Sent

Re: [R] Error: object 'short' not found

2012-02-21 Thread kmittapalli
HI, I am trying to run this code pdf(file=Biology_2012_GOF.pdf, width=8.5, height=4.5) grid.draw(my.sgpd$Goodness_of_Fit$Biology_2012$Q1_Q2) dev.off() I get an error mesage object not found- can someone please help? Kavita -- View this message in context:

[R] help error: In dweibull(x, shape, scale, log) : NaNs produzidos

2012-02-21 Thread Vanúcia Schumacher
Guys, I'm having an error when I use the command: library(MASS) dados-read.table(inverno.txt,header=FALSE) vento50-fitdistr(dados[[1]],densfun=weibull)Mensagens de aviso perdidas:1: In dweibull(x, shape, scale, log) : NaNs produzidos2: In dweibull(x, shape, scale, log) : NaNs produzidos3: In

Re: [R] Error: object 'short' not found

2012-02-21 Thread David Winsemius
On Feb 21, 2012, at 9:21 AM, kmittapalli wrote: HI, I am trying to run this code pdf(file=Biology_2012_GOF.pdf, width=8.5, height=4.5) grid.draw(my.sgpd$Goodness_of_Fit$Biology_2012$Q1_Q2) dev.off() I get an error mesage object not found- can someone please help? What does this return:

Re: [R] help error: In dweibull(x, shape, scale, log) : NaNs produzidos

2012-02-21 Thread David Winsemius
On Feb 21, 2012, at 9:24 AM, Vanúcia Schumacher wrote: Guys, I'm having an error when I use the command: library(MASS) dados-read.table(inverno.txt,header=FALSE) vento50-fitdistr(dados[[1]],densfun=weibull)Mensagens de aviso perdidas:1: In dweibull(x, shape, scale, log) : NaNs

[R] variance explained in a cox ph model

2012-02-21 Thread Federico Calboli
Hi All, I have a left truncated, right censored cox model: coxph(Surv(start, stop, censor) ~ x + y, mydata) I would like to know how much of the observed variance (as a number between 0 and 1) is explained by each variable. How could I do that? Adding terms sequentially and then using

Re: [R] Plot Many Data to same plot

2012-02-21 Thread Petr PIKAL
Hi If you want to have more than 6 line types you had either to use colours or to follow last part of lty advice from par and go to section Line types. In that case you can not simúply use lty 1,2,...,n but you have to prespecify line types in some character vector and choose from that

Re: [R] Triangular Test

2012-02-21 Thread Marc Schwartz
On Feb 20, 2012, at 7:45 AM, kende jan wrote: Hello, I would like to perform triangular test for clinical trial with R. can you help me please ? Jan Hi, I am not aware of any specific implementations of Whitehead's Triangular Test[1] in R, though somebody else may be aware of

Re: [R] help error: In dweibull(x, shape, scale, log) : NaNs produzidos

2012-02-21 Thread peter dalgaard
On Feb 21, 2012, at 16:36 , David Winsemius wrote: It suggests you managed to send negative or infinite numbers to dweibull, a distribution which only supports values when given positive, finite numbers. Look at your data more closely. Zeros are a common cause, too. For a 1 (the shape

Re: [R] error with persp()- increasing 'x' and 'y' values expected

2012-02-21 Thread David L Carlson
You do not have your data organized in a way that persp() can use it. Here is a simple example. The function will not work with x, y, z vectors. X and Y are vectors in order with no repeated values, Z is a matrix containing one value for every combination of x and y: x - 1:10 y - 1:15 z -

Re: [R] creating series of vectors

2012-02-21 Thread Nino Pierantonio
Thanks Ilai this helped. Cheers, Nino Il 16/02/2012 23:15, ilai ha scritto: # All days in years 2006 to 2009 by month in 48 (12x4) files. days- seq(as.Date(2006/1/1), as.Date(2009/12/31),by=day) # one long vector out- paste(rep(format(days,'%d%m%y'),each=2),c('aaa','bbb'),sep='_') # reformat

[R] HELP ERROR Weibull values must be 0

2012-02-21 Thread Vanúcia Schumacher
GUYS, I NEED HELP WITH ERROR: library(MASS) dados-read.table(mediaRGinverno.txt,header=FALSE) vento50-fitdistr(dados[[1]],densfun=weibull) Erro em fitdistr(dados[[1]], densfun = weibull) : Weibull values must be 0 WHY RETURN THIS ERROR? WHAT CAN I DO? BEST REGARDS

[R] FW: help error: In dweibull(x, shape, scale, log) : NaNs produzidos

2012-02-21 Thread Vanúcia Schumacher
Vanúcia SchumacherCurso de graduação em meteorologia - UFPELBolsista do Programa de Educação Tutorial - PET From: vanucia-schumac...@hotmail.com To: r-help@r-project.org Subject: help error: In dweibull(x, shape, scale, log) : NaNs produzidos Date: Tue, 21 Feb 2012 14:24:02 +

[R] stepAIC error

2012-02-21 Thread labbig
i am trying to run stepwise regression for two models(lower,upper), family=gamma and i get the same error despite the models i use. Error in UseMethod(extractAIC) : no applicable method for 'extractAIC' applied to an object of class formula In addition: Warning message: In nobs.default(object,

Re: [R] Error: object 'short' not found

2012-02-21 Thread kmittapalli
should i keep the first line of the code like- pdf(file=Biology_2012_GOF. pdf, width=8.5, height=4.5) str( my.sgpd$Goodness_of_Fit$ Biology_2012$Q1_Q2) Or should I just have your code? str( my.sgpd$Goodness_of_Fit$ Biology_2012$Q1_Q2) thanks again. On Tue, Feb 21, 2012 at 10:32 AM, David

[R] removing particular row from matrix

2012-02-21 Thread uday
I have some data set which has some values -999.000 I would like to remove whole row of this kind of values. e.g a-matrix(c(1,2,3,4,4,5,6,6,-999.99,5,9,-999.00),nrow=4) a- [,1][,2] [,3] [1,]14 -999.99 [2,]255.00 [3,]369.00 [4,]46 -999.00

Re: [R] breaks display of hist

2012-02-21 Thread Rui Barradas
Hello, carol white wrote Hello, How can I display the xlim of the boundaries of all or specific breaks in a histogram? I generated the attached plot with hist and would like to know which values of x correspond to the frequency 329 and display these values on the x axis? Best, carol

Re: [R] removing particular row from matrix

2012-02-21 Thread Rui Barradas
Hello, Try a-matrix(c(1,2,3,4,4,5,6,6,-999.99,5,9,-999.00),nrow=4) ix - apply(a, 1, function(x) sum(trunc(x) != -999) == ncol(a)) a[ix, ] Hope this helps Rui Barradas -- View this message in context: http://r.789695.n4.nabble.com/removing-particular-row-from-matrix-tp4407401p4407490.html

Re: [R] HELP ERROR Weibull values must be 0

2012-02-21 Thread Uwe Ligges
On 21.02.2012 16:48, Vanúcia Schumacher wrote: GUYS, I NEED HELP WITH ERROR: library(MASS) dados-read.table(mediaRGinverno.txt,header=FALSE) vento50-fitdistr(dados[[1]],densfun=weibull) Erro em fitdistr(dados[[1]], densfun = weibull) : Weibull values must be 0 WHY RETURN THIS ERROR?

[R] how to merge commands

2012-02-21 Thread Nino Pierantonio
Dear all, I am using R to work on huge numbers of telemetry data divided by day. Each file (an xlsx file) contains 2 rows, the first one for sst readings and the second one for chl readings, and 72360 columns, each corresponding to the centre of a cell in my study area. The columns have no

Re: [R] removing particular row from matrix

2012-02-21 Thread Petr Savicky
On Tue, Feb 21, 2012 at 07:52:20AM -0800, uday wrote: I have some data set which has some values -999.000 I would like to remove whole row of this kind of values. e.g a-matrix(c(1,2,3,4,4,5,6,6,-999.99,5,9,-999.00),nrow=4) a- [,1][,2] [,3] [1,]14 -999.99 [2,]2

Re: [R] help error: In dweibull(x, shape, scale, log) : NaNs produzidos

2012-02-21 Thread David Winsemius
On Feb 21, 2012, at 11:43 AM, peter dalgaard wrote: On Feb 21, 2012, at 16:36 , David Winsemius wrote: It suggests you managed to send negative or infinite numbers to dweibull, a distribution which only supports values when given positive, finite numbers. Look at your data more closely.

Re: [R] stepAIC error

2012-02-21 Thread Ben Bolker
labbig lkaimaka at windowslive.com writes: i am trying to run stepwise regression for two models(lower,upper), family=gamma and i get the same error despite the models i use. Error in UseMethod(extractAIC) : no applicable method for 'extractAIC' applied to an object of class formula

Re: [R] removing particular row from matrix

2012-02-21 Thread Nordlund, Dan (DSHS/RDA)
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of uday Sent: Tuesday, February 21, 2012 7:52 AM To: r-help@r-project.org Subject: [R] removing particular row from matrix I have some data set which has some values -999.000 I

Re: [R] HELP ERROR Weibull values must be 0

2012-02-21 Thread Uwe Ligges
On 21.02.2012 18:50, Vanúcia Schumacher wrote: Yes, my data dados[[1]] have values=0, but what can I do to fix thi problem/? I replace values equal to 0 for 0.1?? If they are really 0, they are not from a weibull. If you think they are, there is something wrong with the data. If not,

Re: [R] Time taken to process a file after a socket connection was made

2012-02-21 Thread ilai
Aniruddha, Thank you, this is much more clear (and makes sense). Unfortunately I am out of my element here so I don't think I'll be much help, but see inline On Tue, Feb 21, 2012 at 4:14 AM, Aniruddha Mukherjee aniruddha.mukher...@tcs.com wrote: -- I ran the socketConnection command and the

Re: [R] Error: object 'short' not found

2012-02-21 Thread David Winsemius
On Feb 21, 2012, at 10:39 AM, kmittapalli wrote: should i keep the first line of the code like- pdf(file=Biology_2012_GOF. pdf, width=8.5, height=4.5) str( my.sgpd$Goodness_of_Fit$ Biology_2012$Q1_Q2) Or should I just have your code? str( my.sgpd$Goodness_of_Fit$ Biology_2012$Q1_Q2) You are

Re: [R] installing the package Rcplex

2012-02-21 Thread Uwe Ligges
On 21.02.2012 19:57, zheng wei wrote: Thank you both for helping. Still could not figure out. I was contacting different supporting IT departments in my university but did not get any help. For the moment, I just want to what does the instruction of the package means. You could find this

[R] Using earth.dist function

2012-02-21 Thread cmartin
Hi Everyone, I am a graduate student who will be using R to do my analysis. I need to do a spatial analysis, and the first step is to calculate the geographic distance between my study sites. I am hoping to use earth.dist because it allows for multiple pairwise distances to be calculated at one

[R] FW: HELP ERROR Weibull values must be 0

2012-02-21 Thread Vanúcia Schumacher
Vanúcia SchumacherCurso de graduação em meteorologia - UFPELBolsista do Programa de Educação Tutorial - PET From: vanucia-schumac...@hotmail.com To: r-help@r-project.org Date: Tue, 21 Feb 2012 15:48:44 + Subject: [R] HELP ERROR Weibull values must be 0 GUYS, I NEED HELP

Re: [R] help error: In dweibull(x, shape, scale, log) : NaNs produzidos

2012-02-21 Thread Vanúcia Schumacher
Hi, then, If I replace the midpoint 0.0025 average values equal to 0there won't be prejudice in the results?Would then be the best thing to do? regards, Subject: Re: [R] help error: In dweibull(x, shape, scale, log) : NaNs produzidos From: pda...@gmail.com Date: Tue, 21 Feb 2012

Re: [R] HELP ERROR Weibull values must be 0

2012-02-21 Thread Vanúcia Schumacher
Yes, my data dados[[1]] have values =0, but what can I do to fix thi problem/? I replace values equal to 0 for 0.1?? thank you Date: Tue, 21 Feb 2012 18:44:34 +0100 From: lig...@statistik.tu-dortmund.de To: vanucia-schumac...@hotmail.com CC: r-help@r-project.org Subject: Re: [R]

[R] In R 2.14.1, what does wrong sign in 'by' argument mean?

2012-02-21 Thread bioinformatics
Here is my code slidingwindowplotATGC = function(windowsize, inputseq) { starts = seq(1, length(inputseq)-windowsize, by = windowsize) n = length(starts) chunkGs = numeric(n) chunkAs = numeric(n) chunkTs = numeric(n) chunkCs = numeric(n) for (i in 1:n) {

Re: [R] installing the package Rcplex

2012-02-21 Thread zheng wei
Thank you both for helping. Still could not figure out.   I was contacting different supporting IT departments in my university but did not get any help.   For the moment, I just want to what does the instruction of the package means. You could find this instruction on page

Re: [R] Dataframes in PLS package

2012-02-21 Thread Chris Westland
Dear Bjørn-Helge Mevik: Thank you so much (!!) for your speedy help. This works perfectly, no fuss. My understanding of data.frames is still fuzzy, so I knew it was some flaw in my understanding. I enjoyed your very informative writeups on the package in JSS and R-News; they told me a lot

[R] Help with debugging message

2012-02-21 Thread Terry Therneau
Someone has given me a data set that produces a failure with all the hallmarks of a memory overrun in a C routine. I've tried running it under an instrumented version of R with valgrind and don't catch anything. I do get one error message out though: ==642== Warning: set address range perms:

Re: [R] In R 2.14.1, what does wrong sign in 'by' argument mean?

2012-02-21 Thread Richard M. Heiberger
seq(1,4,1) [1] 1 2 3 4 seq(1,4,-1) Error in seq.default(1, 4, -1) : wrong sign in 'by' argument On Tue, Feb 21, 2012 at 1:53 PM, bioinformatics uccstud...@live.ie wrote: Here is my code slidingwindowplotATGC = function(windowsize, inputseq) { starts = seq(1,

Re: [R] In R 2.14.1, what does wrong sign in 'by' argument mean?

2012-02-21 Thread bioinformatics
Thats all well and good but the number im using is a positive so that shouldn't be happening. -- View this message in context: http://r.789695.n4.nabble.com/In-R-2-14-1-what-does-wrong-sign-in-by-argument-mean-tp4407926p4408074.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] bootstrap in time dependent Cox model?

2012-02-21 Thread Ehsan Karim
Thanks Prof. Terry for the response. To answer the second comment, the weights I am considering are inverse probability of treatment weights (IPTW). To perform bootstrapping, my initial thought would be to - select patients (sampling from unique id with replacement) and - then include all the

Re: [R] In R 2.14.1, what does wrong sign in 'by' argument mean?

2012-02-21 Thread David L Carlson
Don't delete the context of the message. If you are sure that windowsize is positive, are you also sure that it is less than length(inputseq)? seq(1, -10, 1) Error in seq.default(1, -10, 1) : wrong sign in 'by' argument -- David L Carlson Associate

Re: [R] help error: In dweibull(x, shape, scale, log) : NaNs produzidos

2012-02-21 Thread R. Michael Weylandt michael.weyla...@gmail.com
I haven't quite worked it out for the Wiebull but that will certainly (down-) bias your variance estimates for, e.g., the normal. I think the right thing to do is to use the correct distribution rather than forcing an incorrect distribution to fit incorrectly. Michael On Feb 21, 2012, at

Re: [R] Using earth.dist function

2012-02-21 Thread Rolf Turner
Please do the following: install.packages(fortunes) require(fortunes) fortune(brain surgery) cheers, Rolf Turner On 22/02/12 07:42, cmartin wrote: Hi Everyone, I am a graduate student who will be using R to do my analysis. I need to do a spatial analysis, and the

[R] R package built with Fortran code

2012-02-21 Thread Xia.Li
Hi R users, I'm trying to build an R package and most of the work have been done in Fortran programming. I looked for help for a while and seems like R can only call Fortran subroutines. Now my fortran code has modules, subroutines and main program. Is there anyway that R can call such fortran

Re: [R] In R 2.14.1, what does wrong sign in 'by' argument mean?

2012-02-21 Thread Petr Savicky
On Tue, Feb 21, 2012 at 10:53:44AM -0800, bioinformatics wrote: Here is my code slidingwindowplotATGC = function(windowsize, inputseq) { starts = seq(1, length(inputseq)-windowsize, by = windowsize) n = length(starts) chunkGs = numeric(n) chunkAs = numeric(n)

[R] CV for log normal data

2012-02-21 Thread array chip
Hi, I have a microarray dataset from Agilent chips. The data were really log ratio between test samples and a universal reference RNA. Because of the nature of log ratios, coefficient of variation (CV) doesn't really apply to this kind of data due to the fact that mean of log ratio is very

Re: [R] CV for log normal data

2012-02-21 Thread Peter Langfelder
On Tue, Feb 21, 2012 at 1:44 PM, array chip arrayprof...@yahoo.com wrote: Hi, I have a microarray dataset from Agilent chips. The data were really log ratio between test samples and a universal reference RNA. Because of the nature of log ratios, coefficient of variation (CV) doesn't really

Re: [R] HELP ERROR Weibull values must be 0

2012-02-21 Thread Vanúcia Schumacher
Tura, meus dados possuem mais de 700 elementos, fica muito inviavel passa-los aqui por summarya questão e que nesses dados eu tenho valores ausentes e valores 0, li algumas sugestões em que deve-se mensurar os valores em 0 para 0.1,sendo assim ele roda tranquilo , mas retorna um aviso de

[R] Transformation of variables in double integral in order to evaluate it in R

2012-02-21 Thread hahania
I am wondering if i got this thing right I have a function of two variables ( lambda and nu) and three hyperparameters(a,b,c) library(compoisson) # function for finding inverse of k invk - function(x,a=1,b=1,c=1){ if (b/c=log(factorial(floor(a/c)))+(a/c-floor(a/c))*log(floor(a/c)+1))

[R] Running Amelia with parallel processors in Windows

2012-02-21 Thread dadrivr
Hi, I want to impute a data set multiple times with Amelia, but the data set is large so it takes a long time. As a result, I'm trying to run the multiple imputation with parallel processors in Windows, but am having trouble. Here is a quick example: ## library(foreach) library(doSNOW)

[R] barplot with both color and shading

2012-02-21 Thread Shi, Tao
Hi list, I want to draw a bar plot with color indicating one grouping and different shading on top of the color indicating another grouping.  How should I proceed? Thanks! ...Tao __ R-help@r-project.org mailing list

Re: [R] CV for log normal data

2012-02-21 Thread Bert Gunter
Inline below. On Tue, Feb 21, 2012 at 2:07 PM, Peter Langfelder peter.langfel...@gmail.com wrote: On Tue, Feb 21, 2012 at 1:44 PM, array chip arrayprof...@yahoo.com wrote: Hi, I have a microarray dataset from Agilent chips. The data were really log ratio between test samples and a universal

Re: [R] CV for log normal data

2012-02-21 Thread Peter Langfelder
Good advice. But perhaps ?mad or some other perhaps robust plain old measure of spread? The problem is not (lack of) robustness to outliers, the problem is to find genes whose expression variation is small compared to (mean) expression. Trouble is, Agilent throws the mean expression

[R] tapply for enormous (2^31 row) matrices

2012-02-21 Thread Matthew Keller
Hi all, SETUP: I have pairwise data on 22 chromosomes. Data matrix X for a given chromosome looks like this: 1 13 58 1.12 6 142 56 1.11 18 307 64 3.13 22 320 58 0.72 Where column 1 is person ID 1, column 2 is person ID 2, column 3 can be ignored, and column 4 is how much chromosomal sharing

Re: [R] CV for log normal data

2012-02-21 Thread peter dalgaard
On Feb 21, 2012, at 22:44 , array chip wrote: Hi, I have a microarray dataset from Agilent chips. The data were really log ratio between test samples and a universal reference RNA. Because of the nature of log ratios, coefficient of variation (CV) doesn't really apply to this kind of data

[R] Counting

2012-02-21 Thread Valerie Moore
Hi, Is there a short way of doing this? I have the following table in R: 12.0        0.5       0.6      0.2  0  0 12.3    1.2   0.8   0    0      0 13.1 0 1.2       0    0      0 10.1         0    0   0   1.3 0 10.2    1.3 

Re: [R] Counting

2012-02-21 Thread Sarah Goslee
There's almost always a better way than a loop (although sometimes it isn't worth the effort to figure it out). This time it's straightforward: apply(c5[, 2:4], 1, function(x)sum(x 0)) [1] 3 2 1 0 3 Sarah On Tue, Feb 21, 2012 at 6:04 PM, Valerie Moore vmoore2...@yahoo.com wrote: Hi, Is

Re: [R] Counting

2012-02-21 Thread Jorge I Velez
Valerie, In additio to Sarah's suggestion, you could also use rowSums(c5[, 2:4] 0) HTH, Jorge.- On Tue, Feb 21, 2012 at 7:45 PM, Sarah Goslee wrote: There's almost always a better way than a loop (although sometimes it isn't worth the effort to figure it out). This time it's

Re: [R] Using earth.dist function

2012-02-21 Thread R. Michael Weylandt
Your problem isn't in earth.dist but one step earlier in the call to data(). As the warning message says, it can't find your data...most of the time, data() is only used for built-in data sets; if you are bringing your own data to R you need to get it in another way: this might help

Re: [R] How can I tabulate time series data (in RStudio or any other R editor)?

2012-02-21 Thread jpm miao
Hello, I have built a zoo object. I try to see it in a tabular form. Is there any way to view the date and the data in the excel format? If I use as.matrix, I can only see the data but not the date. x2zooq CPI CPIZF UNRUNRSA 1978 Q1 NaN NaN 1.87

Re: [R] proto: make a parameter persist

2012-02-21 Thread Ben quant
Thank you very much! I'll follow-up with more questions as I dabble...if I have any. Thank you ben On Tue, Feb 21, 2012 at 7:01 AM, Gabor Grothendieck ggrothendi...@gmail.com wrote: On Tue, Feb 21, 2012 at 12:15 AM, Ben quant ccqu...@gmail.com wrote: Thanks again for your so far on proto.

Re: [R] How can I tabulate time series data (in RStudio or any other R editor)?

2012-02-21 Thread R. Michael Weylandt
What is the excel format in R? From what you put below, it sure looks like the date is visible...perhaps you want time()? Michael On Tue, Feb 21, 2012 at 9:01 PM, jpm miao miao...@gmail.com wrote: Hello,   I have built a zoo object. I try to see it in a tabular form. Is there any way to view

Re: [R] How can I tabulate time series data (in RStudio or any other R editor)?

2012-02-21 Thread R. Michael Weylandt
Please cc the list on all correspondence. The easiest way to get data in/out of Excel will likely be to use read.zoo and write.zoo: see the accompanying vignette for details. For more information, see the R Import/Export manual M On Tue, Feb 21, 2012 at 9:35 PM, jpm miao miao...@gmail.com

[R] johnson distributions

2012-02-21 Thread Ryan Murphy
hello, I am using johnson distributions to make distributions. I want to recover statistics from these distributions, but all I can see how to do is plot them. How would I get, say, the gini on a johson distribution i create? thanks, Ryan -- Ryan Murphy 2012 B.A. Economics and Mathematics

Re: [R] barplot with both color and shading

2012-02-21 Thread R. Michael Weylandt
This seems like a natural fit for ggplot2 graphics, but I'm not aware of shading as a widely implemented graphical element: this might have some useful information -- http://had.co.nz/ggplot2/geom_histogram.html Can you find an example of shading in R? (perhaps in the R Graphics Gallery) If you

[R] Huge difference btw system time and elapsed time

2012-02-21 Thread Libo Sun
Hi all, I got this time for my code, proc.time()-pt user systemelapsed 132541.743 0.004 132533.526 As you can see, there is huge difference btw elapsed time and system time. Does that mean lots of I/O? Or some bad coding? Thanks, Libo [[alternative HTML version

Re: [R] Huge difference btw system time and elapsed time

2012-02-21 Thread R. Michael Weylandt
The time relationships aren't strictly linear between any of the three measures, but *very generally* I've interpreted them as something like: User: stuff you do (i.e., doing all the commands) System: stuff at the OS level (memory allocations and whatnot) Elapsed: Clock time None is a great

Re: [R] sqlite create new unique id

2012-02-21 Thread Jadhav, Alok
Hi Chris, Apologies for getting back late. In my case I am creating a new connection everytime I insert a new trade. I thought last_insert_rowid() would insert max(rowid) for given table? I can try to insert bunch of rows in a data frame, but whenever I create a new connection, I will get

Re: [R] installing the package Rcplex

2012-02-21 Thread zheng wei
Thanks.   I was just reminded by the tech support in my university that cplex is an independent software owned by ILOG, which in turn is now owned by IBM. I suceeded in installing the software cplex under the directory of C:/Program Files/IBM/ILOG/CPLEX_Studio_Academic124/cplex I guess Rcplex

Re: [R] Huge difference btw system time and elapsed time

2012-02-21 Thread Libo Sun
Thanks. Shall I sum the user time and system time, which roughly equals to the elapsed time? I also tried to improve the code by using 'cmpfun(myfunction)' in 'compiler' package, however, it doesn't help too much. Libo On Tue, Feb 21, 2012 at 8:11 PM, R. Michael Weylandt

[R] good packages in R for data-fitting including cross validation?

2012-02-21 Thread Michael
Hi all, I am looking for good packages in R for data-fitting including cross validation... so that I don't have to write my own cross-validation programs... For your information, I have also posted more detailed description of my problem including a few plots here:

Re: [R] CV for log normal data

2012-02-21 Thread array chip
Thank you Peter. John From: Peter Langfelder peter.langfel...@gmail.com To: Bert Gunter gunter.ber...@gene.com Sent: Tuesday, February 21, 2012 2:51 PM Subject: Re: [R] CV for log normal data Good advice. But perhaps ?mad or some other perhaps robust

Re: [R] stepwise selection for conditional logistic regression

2012-02-21 Thread Subha P. T.
Thanks Weidong  for your help.I had earlier tried Step AIC also but no use. Trying other options as suggested by the R-group.    Subha [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] stepwise selection for conditional logistic regression

2012-02-21 Thread Subha P. T.
 Thanks Steve.  From: Steve Lianoglou mailinglist.honey...@gmail.com To: David Winsemius dwinsem...@comcast.net ject.org Sent: Friday, February 17, 2012 9:27 PM Subject: Re: [R] stepwise selection for conditional logistic regression Also, when you're

[R] How can i generate correlated poisson longitudinal data with working correlation matrix R?

2012-02-21 Thread sarahzhu
Suppose i have a working correlation matrix R, and i want to generate a longitudinal poisson data with n clusters. the cluster size is assumed to be t and the marginal mu for response variable is lambda. thanks for help! -- View this message in context:

Re: [R] stepwise selection for conditional logistic regression

2012-02-21 Thread Subha P. T.
Hi David My data set has about 20 significant variables and  step function with logistic regression is working fine( in R-commander). I tried to get conditional logistic by introducing the stratum variable and clogit. The clogit is not converging but is giving the summary of the model. When

Re: [R] Generating repeated measures data

2012-02-21 Thread sarahzhu
hi i checked the package corcounts, but it seems to be used for generating high dimensional correlated count data. is it also proper for generating data with N=50 for instance? thanks -- View this message in context:

Re: [R] barplot with both color and shading

2012-02-21 Thread Shi, Tao
Hi Michael, Thanks for your reply!  I'm not sure if I was clear.  I was really thinking about shading lines.  I have just came up with a solution on my own: barplot(1:10, col=rep(0:1, each=5)) barplot(1:10, angle=20, density=c(0,20), col=2, add=T) Here is my initial failed attempt:

Re: [R] Plot Many Data to same plot

2012-02-21 Thread Jim Lemon
On 02/21/2012 11:56 PM, Alaios wrote: Dear all, I have a function that for a variable number of inputs plots them to the same plot I am doing this quite simply by plot(seq(from=start, to=stop, length.out=np), datalist[[1]]$dataset xlim=c(start, stop), ylim=c(0, 1), type=l)

[R] testing two data sets

2012-02-21 Thread Mohammed Ouassou
Hi everyone, I have 2 data sets and I like to carry out a test to find out if they come from the same distribution. Any suggestions ? thanks in advance. M.O __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] barplot with both color and shading

2012-02-21 Thread Jim Lemon
On 02/22/2012 09:24 AM, Shi, Tao wrote: Hi list, I want to draw a bar plot with color indicating one grouping and different shading on top of the color indicating another grouping. How should I proceed? Hi Tao, You can build a barplot with the rectFill function (plotrix), but it is not a

  1   2   >