[R] RGL and Windows 7

2010-10-01 Thread Sven Wagner
Hi! For saving 3d plots I make use of the rgl.snapshot command provided within the rgl-Package. So far there was no problem using Windows XP, but under Windows 7 the result is a black image, however in the png-format (see attachment http://r.789695.n4.nabble.com/file/n2844487/Koll_perf.png ).

[R] R-Square for Robust Regression Model

2010-10-01 Thread Hock Ann Lim
May I know how to find the R-squared for robust regression model?   Thank you.   Hock Ann [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

[R] Converting a dataframe column from string to datetime

2010-10-01 Thread raje...@cse.iitm.ac.in
Hi, I have a dataframe column of the form v-c(Fri Feb 05 20:00:01.43000 2010,Fri Feb 05 20:00:02.274000 2010,Fri Feb 05 20:00:02.274000 2010,Fri Feb 05 20:00:06.34000 2010) I need to convert this to datetime form. I did the following.. lapply(v,function(x){strptime(x, %a %b %d %H:%M:%OS %Y)})

Re: [R] [Help]:How to use loop to achieve this aim?

2010-10-01 Thread karena
try:ch -- for(i in 1:22) { chrn - paste(chr,i,sep=) chrn=MEDIPS.readAlignedSeqences(BSgenome=hg19, file=chrn,numrows= ) chrn=MEDIPS.genomeVector(data=chrn, bin_size=50,extend=250) ... ... write.table(frameschrn.frame500.step250, file=frames.chrn.meth.txt, sep=\T, quote=F,

Re: [R] R 2.11.1 crashes

2010-10-01 Thread Tal Galili
Hello Steve, You'll need to give more information for people to help you. 1) Is this the first time you installed R? Or was it a working R version that suddenly started having this problem? 2) Did you try uninstalling this version, downloading a new version, installing it - and seeing what

Re: [R] Converting a dataframe column from string to datetime

2010-10-01 Thread Arun.stat
Is it okay with you? Reduce(rbind, lapply(lapply(v,function(x){strptime(x, %a %b %d %H:%M:%OS %Y)}), as.character)) -- View this message in context: http://r.789695.n4.nabble.com/Converting-a-dataframe-column-from-string-to-datetime-tp2853709p2869793.html Sent from the R help mailing list

Re: [R] barplots with 2 different scales

2010-10-01 Thread Jim Lemon
On 10/01/2010 09:19 AM, Jeremy Claisse wrote: Is there a way to create barplots with pairs of bars plotted on 2 different scales (i.e some bars would be plotted according to the scale on the y-axis on the left and other bars plotted according to a different scale on the right axis)? Hi Jeremy,

Re: [R] Converting a dataframe column from string to datetime

2010-10-01 Thread jim holtman
I think you want to use as.POSIXct to get the date value: v-c(Fri Feb 05 20:00:01.43000 2010,Fri Feb 05 20:00:02.274000 2010,Fri Feb 05 20:00:02.274000 2010,Fri Feb 05 20:00:06.34000 2010) x - as.POSIXct(v, format= %a %b %d %H:%M:%OS %Y) x [1] 2010-02-05 20:00:01 EST 2010-02-05 20:00:02 EST

Re: [R] Inserting a plot into another

2010-10-01 Thread Jim Lemon
On 10/01/2010 01:01 AM, Filoche wrote: Hi everyone. I would like to know if it was possible to insert a plot into another one. For example I have a plot and I would like to add a smaller plot in the top right corner. Hi Phil, Take a look at the subplot function in TeachingDemos. Jim

[R] Issues loading rtiff 1.4.1 with R 2.6.2 on Windows

2010-10-01 Thread Oderbolz Daniel
Dear R-users, I successfully installed rtiff on by R installation, but when I tried to load it, I got: local({pkg - select.list(sort(.packages(all.available = TRUE))) + if(nchar(pkg)) library(pkg, character.only=TRUE)}) Error in dyn.load(file, ...) : unable to load shared library

[R] Irregular time series plot

2010-10-01 Thread Vasanth Singan
Hi, I am new to R and trying to plot a time series data with irregular interval. I was wondering how to read a data of the following format and plot it ? Time 00:00:00 00:05:00 00:10:00 00:15:00 00:20:00 00:30:00 01:00:00

[R] Interpreting the example given by Frank Harrell in the predict.lrm {Design} help

2010-10-01 Thread John Haart
Dear list, I am relatively new to ordinal models and have been working through the example given by Frank Harrell in the predict.lrm {Design} help All of this makes sense to me, except for the responses, i,e how do i interpret them? i would be extremely grateful if someone could explain the

Re: [R] Irregular time series plot

2010-10-01 Thread David Potts
Hi List, I am some what new to R-world. I am trying to plot some vector data, each vector has a direction and magnitude, the data is taken from an array of points, some of the coverage area overlap, some do not. Due nature of the grid there are some points that lack data. Can any body

Re: [R] Format of Output of Residuals

2010-10-01 Thread Dennis Murphy
Hi: CW.lm - lm(weight ~ Diet, ChickWeight) resid.CW.lm - resid(CW.lm) as.data.frame(resid(CW.lm))[1:10, ] # (nope) [1] -60.645455 -51.645455 -43.645455 -38.645455 -26.645455 -9.645455 [7] 3.354545 22.354545 46.354545 68.354545 # convert residuals to one column matrix, then convert to

Re: [R] Irregular time series plot

2010-10-01 Thread David Potts
Sorry about this, I used your item as prototype to get the email address. Dave. Hi List, I am some what new to R-world. I am trying to plot some vector data, each vector has a direction and magnitude, the data is taken from an array of points, some of the coverage area overlap, some do

[R] function which can apply a function by a grouping variable and also hand over an additional variable, e.g. a weight

2010-10-01 Thread Werner W.
Hi, I was wondering if there is an easy way to accomplish the following in R: Often I want to apply a function, e.g. weighted.quantile from the Hmisc package to grouped subsets of a data.frame (grouping variable) but then I also need to hand over the weights which seems not possible with

Re: [R] Interpreting the example given by Frank Harrell in the predict.lrm {Design} help

2010-10-01 Thread Frank Harrell
John, Don't conclude that one category is the most probable when its probability of being equaled or exceeded is a maximum. The first category would always be the winner if that were the case. When you say y=best remember that you are dealing with a probability model. Nothing is forcing you

Re: [R] Interpreting the example given by Frank Harrell in the predict.lrm {Design} help

2010-10-01 Thread John Haart
Frank, Thats great thanks for the advice, i appreciate that brier score, AUC etc are a better method of validation and discrimination but when it comes to predictions of new data d - data.frame(x1=c(.1,.5),x2=c(.5,.15)) predict(f, d, type=fitted.ind) y=good y=bettery=best

Re: [R] Issues loading rtiff 1.4.1 with R 2.6.2 on Windows

2010-10-01 Thread Uwe Ligges
Probably there are not many people on this list left with such an ancient installation. Please try R-2.12.0 alpha. Uwe Ligges On 01.10.2010 11:49, Oderbolz Daniel wrote: Dear R-users, I successfully installed rtiff on by R installation, but when I tried to load it, I got: local({pkg-

Re: [R] RGL and Windows 7

2010-10-01 Thread Duncan Murdoch
On 01/10/2010 2:12 AM, Sven Wagner wrote: Hi! For saving 3d plots I make use of the rgl.snapshot command provided within the rgl-Package. So far there was no problem using Windows XP, but under Windows 7 the result is a black image, however in the png-format (see attachment

Re: [R] function which can apply a function by a grouping variable and also hand over an additional variable, e.g. a weight

2010-10-01 Thread Hadley Wickham
You might want to check out the plyr package. Hadley On Fri, Oct 1, 2010 at 6:05 AM, Werner W. pensterfuz...@yahoo.de wrote: Hi, I was wondering if there is an easy way to accomplish the following in R: Often I want to apply a function, e.g. weighted.quantile from the Hmisc package to

Re: [R] Fitting with error on data

2010-10-01 Thread Ted Harding
On 27-Sep-10 08:55:13, Maayt wrote: As this forum proved to be very helpful, I got another question... I'd like to fit data points on which I have an error, dx and dy, on each x and y. What would be the common procedure to fit this data by a linear model taking into account uncertainty on each

[R] Accessing Element of a Table

2010-10-01 Thread Gundala Viswanath
I have the following structure: str(propn) table [1:2(1d)] 0.674 0.326 - attr(*, dimnames)=List of 1 ..$ label: chr [1:2] o x print(propn) label o x 0.6738347 0.3261653 How can I access the value of o and x I tried this but fail print(propn$label[,o]; - G.V.

Re: [R] Interpreting the example given by Frank Harrell in the predict.lrm {Design} help

2010-10-01 Thread Frank Harrell
Why assign them at all? Is this a forced choice at gunpoint problem? Remember what probabilities mean. Frank - Frank Harrell Department of Biostatistics, Vanderbilt University -- View this message in context:

Re: [R] RGL and Windows 7

2010-10-01 Thread Sven Wagner
Thanks, but your suggestions don't solve the problem. Though, the plot is storable via the rgl.postscript command, but this increases computation time and memory requirements. -- View this message in context: http://r.789695.n4.nabble.com/RGL-and-Windows-7-tp2844487p2910131.html Sent from the

Re: [R] RGL and Windows 7

2010-10-01 Thread Duncan Murdoch
On 01/10/2010 9:53 AM, Sven Wagner wrote: Thanks, but your suggestions don't solve the problem. Though, the plot is storable via the rgl.postscript command, but this increases computation time and memory requirements. rgl.postscript is limited in the kinds of scenes it can render, so check

Re: [R] Accessing Element of a Table

2010-10-01 Thread Peter Ehlers
On 2010-10-01 7:43, Gundala Viswanath wrote: I have the following structure: str(propn) table [1:2(1d)] 0.674 0.326 - attr(*, dimnames)=List of 1 ..$ label: chr [1:2] o x print(propn) label o x 0.6738347 0.3261653 How can I access the value of o and x I tried

Re: [R] Fitting with error on data

2010-10-01 Thread Michael Bedward
There is the lmodel2 package... http://cran.r-project.org/web/packages/lmodel2/vignettes/mod2user.pdf Geometric mean regression has been discussed on this list in the past, for example: https://stat.ethz.ch/pipermail/r-help/2005-June/072927.html I've used that approach with nls (rightly or

[R] Fwd: Interpreting the example given by Frank Harrell in the predict.lrm {Design} help

2010-10-01 Thread John Haart
Frank and list, The reason I am trying to assign them is because I have a data set where i have arrived at the most likely model that describes the data and now I have another dataset where I know the factors but not the response. Therefore, surely I need to assign the predicted values to a

Re: [R] plotting wind rose data (Karl Ropkins)

2010-10-01 Thread Karl Ropkins
David, Following on from Jim Lemon's suggest that polar plots might be more what you need, there are both wind rose and polar plot functions in the openair package that might be of use (particularly windRose and polarFreq). They will not do everthing you are after without some careful

[R] Question about Reduce

2010-10-01 Thread Dimitri Liakhovitski
Hello! In the example below the Reduce() function by default assigns a to be the last accumulated value and b to be the current value in x. I could not find this documented anywhere as the default settings for the Reduce() function. Does any sort of documentation for this behavior exist? x -

Re: [R] Scatterplot matrix - Pearson linear correlation and Density Ellipse

2010-10-01 Thread Peter Ehlers
On 2010-09-30 15:42, ashz wrote: Hi, I have modified a known script to generate a scatterplot matrix: panel.cor = function(x, y, digits=2, prefix=Rho=, cex.cor) { usr = par(usr); on.exit(par(usr)) par(usr = c(0, 1, 0, 1)) r = abs(cor(x, y, use=pairwise.complete.obs, method =

[R] Need to incorporate the use of na.rm into custom function

2010-10-01 Thread Ochsner, Scott A
Hi, Take a matrix with missing values: X = matrix(rnorm(10), ncol = 5) X[2,4]=NA X [,1] [,2] [,3] [,4] [,5] [1,] -0.1566427 -0.7382232 -1.0564624 -0.8412139 0.9370319 [2,] -1.0289865 -0.8452054 -0.1349459 NA -0.1749113 I want to apply a custom

Re: [R] Need to incorporate the use of na.rm into custom function

2010-10-01 Thread Jeffrey Spies
You can use na.omit on x after it is passed into your apply function if na.rm == T, or simply pass your na.rm to functions that use it, such as sum. Hope that helps, Jeff. On Fri, Oct 1, 2010 at 11:07 AM, Ochsner, Scott A sochs...@bcm.edu wrote: Hi, Take a matrix with missing values: X =

[R] Creating R objects in Java

2010-10-01 Thread lord12
How do you call R methods from Java? I want to create a GUI using Swing in Jaa that calls R methods in Java. -- View this message in context: http://r.789695.n4.nabble.com/Creating-R-objects-in-Java-tp2904497p2904497.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] colored rasterImage()

2010-10-01 Thread Ben Tupper
Doh! Of course! Thanks for this. I convinced myself that the input image to rasterImage() had to be scaled 0-1. I think I started down that path by trying the following with as.raster() ... m - matrix(data = rep(seq(0,3, length = nx), ny), ncol = nx, nrow = ny, byrow = TRUE) r -

[R] Small p-value good or bad?

2010-10-01 Thread T. Smithson
Dear R-community, I have a short question: How do I interpret the result of a likelihood ratio test correctly? I am fitting a parametric survival model (with aftreg {eha}) and the output tells me the overall p-value of my model is 0.001. My simple question is: Does the result mean my model fits

[R] help regarding the package installation

2010-10-01 Thread Neeti
hii everyone! Recently i have started working with R and it would be nice if anyone can help me with this. I am vista user (32 bit). I wanted to install package in my parent directory i.e .Library. whenever I try to install nnet (package) it is showing me the following error:

Re: [R] Inserting a plot into another

2010-10-01 Thread jamec9869
hi I'll take a look at it. - [url=http://moviesonlineworld.com]watch free movies online[/url] -- View this message in context: http://r.789695.n4.nabble.com/Inserting-a-plot-into-another-tp2720936p2877931.html Sent from the R help mailing list archive at Nabble.com.

[R] help regarding the package installation

2010-10-01 Thread Neeti
hii everyone! Recently i have started working with R and it would be nice if anyone can help me with this. I am vista user (32 bit). I wanted to install package in my parent directory i.e .Library. whenever I try to install nnet (package) it is showing me the following error:

[R] Looping through different arguments

2010-10-01 Thread lord12
If for example I have garchFit(~garch(1,1) but I want to loop through all the different combinations of ARMA/GARCH/APARCH. Another model could be ~arma(2,1)+apaarch(1,1). How do I transition between garch(1,1) and arma(2,1)+apaarch(1,1) using a for loop. -- View this message in context:

Re: [R] Interpreting the example given by Frank Harrell in the predict.lrm {Design} help

2010-10-01 Thread peterfrancis
The reason I am trying to assign them is because I have a data set where i have arrived at the most likely model that describes the data and now I have another dataset where I know the factors but not the response. Therefore, surely I need to assign the predicted values to a response in order

[R] 'all subsets' fitting algorithm for Bayesian approach

2010-10-01 Thread Michael Hopkins
Hi R experts I am just wondering if something is already available (or easily adaptable) to do the following. I am planning to build linear models for all possible combinations of terms, so for example if the terms are sent into a function as this string X1 + X2 + X3 + X4 + X1:X2 I would

Re: [R] Converting a dataframe column from string to datetime

2010-10-01 Thread MacQueen, Don
You’re working too hard. Use this: tms - as.POSIXct(strptime(v, %a %b %d %H:%M:%OS %Y)) Take note of the fact that there are two types of datetime objects: POSIXct and POSIXlt. Your unlist() gave what seemed a strange result because you used on an “lt” object. Had you given it a “ct”

Re: [R] R 2.11.1 crashes

2010-10-01 Thread Ben Bolker
Tal Galili tal.galili at gmail.com writes: You'll need to give more information for people to help you. 1) Is this the first time you installed R? Or was it a working R version that suddenly started having this problem? 2) Did you try uninstalling this version, downloading a new version,

Re: [R] help regarding the package installation

2010-10-01 Thread Duncan Murdoch
On 01/10/2010 7:39 AM, Neeti wrote: hii everyone! Recently i have started working with R and it would be nice if anyone can help me with this. I am vista user (32 bit). I wanted to install package in my parent directory i.e .Library. whenever I try to install nnet (package) it is showing me

Re: [R] Need to incorporate the use of na.rm into custom function

2010-10-01 Thread Ochsner, Scott A
Jeff, Thanks for the help. I should have thought of passing na.rm to sum. This worked nicely. Scott Scott A. Ochsner, PhD One Baylor Plaza BCM130, Houston, TX 77030 Voice: (713) 798-6227 Fax: (713) 790-1275 -Original Message- From: jsp...@gmail.com [mailto:jsp...@gmail.com] On

Re: [R] Creating R objects in Java

2010-10-01 Thread Abhijit Dasgupta, PhD
On 10/1/10 9:18 AM, lord12 wrote: How do you call R methods from Java? I want to create a GUI using Swing in Jaa that calls R methods in Java. Look in the documentation for the rJava package -- Abhijit Dasgupta, PhD Director and Principal Statistician ARAASTAT Ph: 301.385.3067 E:

Re: [R] help regarding the package installation

2010-10-01 Thread Neeti
Thank you so much... it is working fine -- View this message in context: http://r.789695.n4.nabble.com/help-regarding-the-package-installation-tp2894726p2925020.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org

Re: [R] R-Square for Robust Regression Model

2010-10-01 Thread Bert Gunter
The usual way, I suppose: (1 - RSS (model with only a constant)/RSS(full model)). However, it's not particularly meaningful to do this, because points are weighted differently depending on the model. This means that the usual interpretation as the proportion of unexplained variation is wrong; and

[R] mhtplot?

2010-10-01 Thread Mohsen Jafarikia
Hello All: I was wondering why many plot options are not working with mhtplot. I could not find much info about this function on the web too. Any comments, any detailed manual ... Thanks, MJK [[alternative HTML version deleted]] __

Re: [R] Question about Reduce

2010-10-01 Thread Charles C. Berry
On Fri, 1 Oct 2010, Dimitri Liakhovitski wrote: Hello! In the example below the Reduce() function by default assigns a to be the last accumulated value and b to be the current value in x. I could not find this documented anywhere as the default settings for the Reduce() function. Does any

[R] add a new column to data frame

2010-10-01 Thread array chip
Hi, I am wondering if anyone can propose a simple/best way to do the following: Let's say I have a data frame dat - cbind(expand.grid(mode=c('right','left'),time=0:3,id=c('p1','p2','p3')),y=c(3,5,rep(4,6),6,2,rep(3,6),4,4,rep(2,6))) dat mode time id y 1 right0 p1 3 2 left0 p1

Re: [R] 'all subsets' fitting algorithm for Bayesian approach

2010-10-01 Thread Bert Gunter
u... You are reinventing the wheel. In fact, several wheels: the statistical literature already has several different approaches worked out for this. For example, George Box and David Steinberg did one about 20 years ago, and it has been incorporated as one of the options in the JMP DOE model

[R] Facets in ggplot2

2010-10-01 Thread Prew, Paul
Hello, I'm trying to introduce myself to ggplot2. I'm using syntax from the help file, but pasting in my own data. I don't understand the error message I'm getting. Can anyone clue me in? A Google search of this error statement didn't return anything I could recognize as useful.

[R] How to Install R Commander?

2010-10-01 Thread kreamysaverz
Hi, I am trying to install R commander. I used the command: install.packages(Rcmdr, dependencies = TRUE) It gives me this: Warning in install.packages(Rcmdr, dependencies = TRUE) : argument 'lib' is missing: using 'C:\Users\Karimi\Documents/R/win-library/2.11' trying URL

Re: [R] Facets in ggplot2

2010-10-01 Thread baptiste auguie
Try this, qplot(outcome, counts, data=d.AD, facets=.~ treatment) HTH, baptiste __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide

[R] cleaning up a vector

2010-10-01 Thread mlarkin
I calculated a large vector. Unfortunately, I have some measurement error in my data and some of the values in the vector are erroneous. I ended up wih some Infs and NaNs in the vector. I would like to filter out the Inf and NaN values and only keep the values in my vector that range from 1 to

Re: [R] cleaning up a vector

2010-10-01 Thread Henrique Dallazuanna
Try this: x[is.finite(x)] On Fri, Oct 1, 2010 at 2:51 PM, mlar...@rsmas.miami.edu wrote: I calculated a large vector. Unfortunately, I have some measurement error in my data and some of the values in the vector are erroneous. I ended up wih some Infs and NaNs in the vector. I would like

Re: [R] add a new column to data frame

2010-10-01 Thread Phil Spector
Here are two ways: dat0 = subset(dat,time==0) one = as.data.frame(as.table(by(dat0,dat0$id, function(x)as.character(x$mode)[which.max(x$y)]))) names(one) = c('id','type') merge(dat,one) two = sapply(split(dat0,dat0$id),

Re: [R] cleaning up a vector

2010-10-01 Thread Erik Iverson
Mike, Small, reproducible examples are always useful for the rest of the us. x - c(0, NA, NaN, 1 , 10, 20, 21, Inf) x[!is.na(x) x =1 x= 20] Is that what you're looking for? mlar...@rsmas.miami.edu wrote: I calculated a large vector. Unfortunately, I have some measurement error in my data

Re: [R] cleaning up a vector

2010-10-01 Thread Peter Langfelder
On Fri, Oct 1, 2010 at 10:51 AM, mlar...@rsmas.miami.edu wrote: I calculated a large vector.  Unfortunately, I have some measurement error in my data and some of the values in the vector are erroneous.  I ended up wih some Infs and NaNs in the vector.  I would like to filter out the Inf and

Re: [R] How to Install R Commander?

2010-10-01 Thread Uwe Ligges
Reinstall R and select the option for tcltk support in the installer. Uwe Ligges On 01.10.2010 19:42, kreamysaverz wrote: Hi, I am trying to install R commander. I used the command: install.packages(Rcmdr, dependencies = TRUE) It gives me this: Warning in install.packages(Rcmdr,

Re: [R] cleaning up a vector

2010-10-01 Thread Marc Schwartz
On Oct 1, 2010, at 12:51 PM, mlar...@rsmas.miami.edu wrote: I calculated a large vector. Unfortunately, I have some measurement error in my data and some of the values in the vector are erroneous. I ended up wih some Infs and NaNs in the vector. I would like to filter out the Inf and NaN

Re: [R] cleaning up a vector

2010-10-01 Thread Henrique Dallazuanna
Complementing: findInterval(x[is.finite(x)], 1:20) On Fri, Oct 1, 2010 at 2:55 PM, Henrique Dallazuanna www...@gmail.comwrote: Try this: x[is.finite(x)] On Fri, Oct 1, 2010 at 2:51 PM, mlar...@rsmas.miami.edu wrote: I calculated a large vector. Unfortunately, I have some measurement

Re: [R] add a new column to data frame

2010-10-01 Thread array chip
Thank you Phil. The only problem with the code is when the 2 y values are equal, it should default to right. Your code would default to the first maximum. But it's ok, I see the logic here and can figure it out. I wondered whether there is some one-line thing that can do this, I guess not

[R] [Fwd: Re: cleaning up a vector]

2010-10-01 Thread mlarkin
It turns out I didn't have to filter out the 1-20 values. The code of x[is.finite(x)] did the trick. Thanks!!! Mike Original Message Subject: Re: [R] cleaning up a vector From:Henrique Dallazuanna www...@gmail.com Date:Fri,

Re: [R] how to avoid NaN in optim()

2010-10-01 Thread Ravi Varadhan
You do not have to worry about re-defining your function to handle the constraints on parameters. You can let the optimizer worry about it. lik - function(nO, nA, nB, nAB){ loglik - function(par) { p=par[1] q=par[2] r - 1 - p - q -(2 * nO * log

Re: [R] add a new column to data frame

2010-10-01 Thread Henrique Dallazuanna
Try this: merge(dat, factor(with(dat[!dat$time,], tapply(y, id, function(x)ifelse(all(mean(x) == x), 1, which.max(x, labels = c('right', 'left')), by.x = 'id', by.y = 0) On Fri, Oct 1, 2010 at 3:15 PM, array chip arrayprof...@yahoo.com wrote: Thank you Phil. The only problem with the code

Re: [R] Small p-value good or bad?

2010-10-01 Thread Ben Bolker
T. Smithson pillepop2003 at yahoo.de writes: Dear R-community, I have a short question: How do I interpret the result of a likelihood ratio test correctly? I am fitting a parametric survival model (with aftreg {eha}) and the output tells me the overall p-value of my model is 0.001. My

[R] Pass Arguments to R with an LSF submit

2010-10-01 Thread Thomas Stewart
I'm trying to run R in batch mode on an LSF managed cluster. In simple settings, I can do it just fine. The trouble I'm having is when I try to pass arguments to the batch job. For example, bsub R CMD BATCH --args 1 3 commandfile.R LSF doesn't like the , and it doesn't run. I'm hoping one

[R] gridExtra question

2010-10-01 Thread Felipe Carrillo
  Hi: I get a couple of warnings  when trying to download gridExtra: install.packages(gridExtra,repos=http://R-Forge.R-project.org)  Warning: unable to access index for repository http://R-Forge.R-project.org/bin/windows/contrib/2.10 Warning message: In getDependencies(pkgs, dependencies,

Re: [R] gridExtra question

2010-10-01 Thread Erik Iverson
Well, a quick check of http://r-forge.r-project.org/bin/windows/contrib/ shows that there is no 2.10 directory, possibly because it's not very new, 2.12 is scheduled for release in 2 weeks. Felipe Carrillo wrote: Hi: I get a couple of warnings when trying to download gridExtra:

Re: [R] gridExtra question

2010-10-01 Thread Erik Iverson
Forgot to mention you should be able to install from a CRAN mirror. Felipe Carrillo wrote: Hi: I get a couple of warnings when trying to download gridExtra: install.packages(gridExtra,repos=http://R-Forge.R-project.org) Warning: unable to access index for repository

Re: [R] gridExtra question

2010-10-01 Thread Ista Zahn
Is there some reason you don't want the CRAN version? -Ista On Fri, Oct 1, 2010 at 3:08 PM, Felipe Carrillo mazatlanmex...@yahoo.comwrote: Hi: I get a couple of warnings when trying to download gridExtra: install.packages(gridExtra,repos=http://R-Forge.R-project.org) Warning: unable to

Re: [R] gridExtra question

2010-10-01 Thread Felipe Carrillo
I must be blind, CRAN was  my first try and didn't see it there. It is Friday and time to take a break I guess :-)   Felipe D. Carrillo Supervisory Fishery Biologist Department of the Interior US Fish Wildlife Service California, USA From: Ista Zahn iz...@psych.rochester.edu To: Felipe

Re: [R] mhtplot?

2010-10-01 Thread Ben Bolker
Mohsen Jafarikia jafarikia at gmail.com writes: I was wondering why many plot options are not working with mhtplot. I could not find much info about this function on the web too. Any comments, any detailed manual ... I'm afraid this one gets the usual answers: 1. what does not work mean?

[R] Contrasts for MANOVA

2010-10-01 Thread Ali S
Can anyone tell me how to run contrasts for MANOVA?  Thanks! [[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] Interpreting the example given by Frank Harrell in the predict.lrm {Design} help

2010-10-01 Thread Greg Snow
I have this discussion fairly often with doctors that I work with. The issue is that you can certainly predict from a model, but you can predict on different scales. Let's consider the simpler case of just 2 outcomes (disease yes/no): Let's say you have 4 patients that you want to predict

Re: [R] gridExtra question

2010-10-01 Thread Felipe Carrillo
It looks like the list of packages is not refreshing on my pc because If I go to packages install packages I don't see it there next to 'gridBase' but I went to the CRAN website and there it is right next to 'gridBase'.  I had to manually download the Windows binary from there, saved it to my

[R] How to apply vector value function to a multidimensional array indexed by the remaining dimensions?

2010-10-01 Thread yunjiangster
Hi, I am looking for some generalization of colSums and rowSums for general vector valued functions, and for arrays of more than 2 dimensions. So as a concrete example, suppose I have a 3 dimensional array, given by x = array(1:100,c(3,4,5)). and I want to sum the 3rd index of x to obain a 3

[R] How to generate scatterplot - with a twist

2010-10-01 Thread thernubblet
Hi. I would like to make a scatterplot where all of the points are evenly spaced from each other - however, they are all the same size and occupy the entire graph. For example: x = rep(c(1:10), 10) y = rep(c(10:1), each = 10) plot(x, y, pch = 0) Gives me a scatter plot with 100 square points

Re: [R] [Help]:How to use loop to achieve this aim?

2010-10-01 Thread qcshare
It doesn't work... where should change? Thanks. -- View this message in context: http://r.789695.n4.nabble.com/Help-How-to-use-loop-to-achieve-this-aim-tp2819894p2922193.html Sent from the R help mailing list archive at Nabble.com. __

[R] writing an R code for a given model

2010-10-01 Thread abderrahim youssef
Dear R help list, I am desperately looking for any reference explaining by examples how to write R codes in order to fit the parameters of a given model using maximum likelihood or any other criteria function. I know the general structure: First write a code for the maximum likelihood function

Re: [R] writing an R code for a given model

2010-10-01 Thread Shige Song
Hi Abderrahim, I find this book particularly helpful: http://www.meb.ki.se/~yudpaw/likelihood/likelihood-index.htm Shige On Fri, Oct 1, 2010 at 12:15 PM, abderrahim youssef abderrahim1...@googlemail.com wrote: Dear R help list, I am desperately looking for any reference explaining by

Re: [R] [Help]:How to use loop to achieve this aim?

2010-10-01 Thread Jeffrey Spies
Correcting Karena's solution: for(i in 1:22) { chrn - paste(chr,i,sep=) chrn=MEDIPS.readAlignedSeqences(BSgenome=hg19, file=chrn,numrows= ?) # no quotes around chrn chrn=MEDIPS.genomeVector(data=chrn, bin_size=50,extend=250) frames=? # I don't know how you get this variable ... out_file

Re: [R] How to generate scatterplot - with a twist

2010-10-01 Thread Marc Schwartz
On Oct 1, 2010, at 10:41 AM, thernubblet wrote: Hi. I would like to make a scatterplot where all of the points are evenly spaced from each other - however, they are all the same size and occupy the entire graph. For example: x = rep(c(1:10), 10) y = rep(c(10:1), each = 10) plot(x, y,

Re: [R] can I add line breaks to the paste() function?

2010-10-01 Thread David LeBauer
Thanks for the help. This solves my problem - I wanted to print out errors and warnings on separate lines with a single call. Thanks, David On Thu, Sep 30, 2010 at 3:42 PM, Jeremy Miles jeremy.mi...@gmail.com wrote: Try using cat instead.  Then \n is the new line character. E.g.  cat(1st

[R] maximum likelihood problem

2010-10-01 Thread mlarkin
I am trying to figure out how to run maximum likelihood in R. Here is my situation: I have the following equation: equation-(1/LR-(exp(-k*T)*LM)*(1-exp(-k))) LR, T, and LM are vectors of data. I want to R to change the value of k to maximize the value of equation. My attempts at optim and

Re: [R] How to generate scatterplot - with a twist

2010-10-01 Thread Greg Snow
If it is important to have points rather than just create the grid, then you could do something using the my.symbols function in the TeachingDemos package. One of the examples on the help page fills the plot with hexagons, the calculations for squares should be simpler. -- Gregory (Greg) L.

Re: [R] maximum likelihood problem

2010-10-01 Thread Ravi Varadhan
Do you want to do a nonlinear least-squares estimation (which is MLE if the errors are Gaussian)? If so, you have to define a function that takes the parameter (k) and data matrix (LR, T, LM), as arguments, and returns a scalar, which is the residual sum of squares. Then you can optimize

[R] [R-pkgs] ff version 2.2.0

2010-10-01 Thread Jens Oehlschlägel
Dear R community, The next release of package ff is available on CRAN. With kind help of Brian Ripley it now supports the Win64 and Sun versions of R. It has three major functional enhancements: a) new fast in-memory sorting and ordering functions (single-threaded) b) ff now supports on-disk

Re: [R] writing an R code for a given model

2010-10-01 Thread Ben Bolker
Shige Song shigesong at gmail.com writes: Hi Abderrahim, I find this book particularly helpful: http://www.meb.ki.se/~yudpaw/likelihood/likelihood-index.htm Shige On Fri, Oct 1, 2010 at 12:15 PM, abderrahim youssef abderrahim1302 at googlemail.com wrote: Dear R help list, I am

[R] plm: lag() and diff() do not (always) recognize a gap in the time dimension

2010-10-01 Thread Christian Schoder
Hello! I came accross a strange behavior of the plm package. When using an unbalanced panel with years lag() and diff() do not recognize a break in the time dimension. It does, however, if there is only one more year after the break. This is strange, right? Consider the following example:

Re: [R] How to apply vector value function to a multidimensional array indexed by the remaining dimensions?

2010-10-01 Thread Charles C. Berry
On Fri, 1 Oct 2010, yunjiangster wrote: Hi, I am looking for some generalization of colSums and rowSums for general vector valued functions, and for arrays of more than 2 dimensions. So as a concrete example, suppose I have a 3 dimensional array, given by x = array(1:100,c(3,4,5)). and I

Re: [R] Interpreting the example given by Frank Harrell in the predict.lrm {Design} help

2010-10-01 Thread Frank Harrell
Well put Greg. The job of the statistician is to produce good estimates (probabilities in this case). Those cannot be translated into action without subject-specific utility functions. Classification during the analysis or publication stage is not necessary. Frank - Frank Harrell

[R] How many R packages are not free?

2010-10-01 Thread Paul Miller
Hello Everyone,   Just finished reading A Handbook of Statistical Analyses using R by Everitt and Hothorn. I'll begin by saying that I quite liked the book. It's both little and mighty in the sense that it's very compact but contains a tremendous amount of useful material.   The last chapter of

[R] element wise conditional assignment in r

2010-10-01 Thread yunjiangster
Hi, I am looking for a one-liner code for the following situation say I have a vector r of 0 and 1's, and another vector v of equal length. I want to assign v[i]-1 to v[i] if r[i]=1, for all i. How would I do that using mapply or any other batch processing keywords? thanks. John -- View

[R] Suppressing printing in the function

2010-10-01 Thread Dimitri Liakhovitski
Hello! I wrote a function that returns a data frame. Nowhere in the function do I say print(my.data.frame), but when I run the function - the data frame is printed on the console. Is there any way to suppress it? Thank you! -- Dimitri Liakhovitski Ninah Consulting www.ninah.com

Re: [R] Suppressing printing in the function

2010-10-01 Thread Phil Spector
?invisible - Phil Spector Statistical Computing Facility Department of Statistics UC Berkeley

  1   2   >