Re: [R] / Operator not meaningful for factors

2010-05-04 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 04.05.2010 00:50:00: > I think that you are correct. R has the annoying habit of converting > character data to factors when you don't want it to while it is importing > data. This is because the in the option "stringsAsFactors" is set to TRUE for

Re: [R] multiple correlation coefficient R

2010-05-04 Thread Daniel Malter
Hi, type ?cor and hit ENTER. More generally, since you seem to be a newbie to R, I would suggest that you pick-up one of the many manuals to R that are available online and that you make yourself familiar with the posting guide for this list. Best, Daniel - cuncta stri

[R] How to rbind listed data frames?

2010-05-04 Thread Phil Wieland
I made a list (dataList) of data frames. The list looks like this (the first two elements): [[1]] est cond targets 1 400 exo_depth_65Hautklinik 2 300 exo_depth_65 Ostturm_UKM 3 200 exo_depth_65 Kreuzung_Ro

[R] should srt= in text()/par() recycle its parametres or not?

2010-05-04 Thread Žroutík
Dear R-users, I bumped into an unusual behaviour when a parametre is not recycled. Using text() with srt= values (turn string by an angle), srt=10*c(1:8), or even srt=c(1:2) and ploting my eight names to their values in the plot(), gives the following error: graphical parameter "srt" has the wron

[R] Odp: strange error msg from lapply and lm()

2010-05-04 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 03.05.2010 16:24:11: > > I am conducting a very simple t test for two genes using lapply (i try to > avoid loop since i will have thousands of genes later on). however, I got > strange error msg like the followings. It looks that R is complaining my >

Re: [R] / Operator not meaningful for factors

2010-05-04 Thread Petr PIKAL
Hi "Katya Mauff" napsal dne 04.05.2010 09:53:49: > another way to do it (if you are still having problems) is to use sapply > (yourdataname,data.class) after you've read it in, which will tell you the > data class of each of your variables (factor, numeric etc). You can then > change your fa

Re: [R] tracing the origin of warning messages

2010-05-04 Thread Thomas Wutzler
Thanks Mr. Ripley, Mr. Liggers, and Mr. Burns, "I can not see the forest, because trees block my sight" options(warn=2) Thanks also for the hint to the very useful R Inferno. I guess, reading it earlier, would have saved days of debugging and frustration. I also did not now about the useful brows

[R] Extract rows with non-zero elements

2010-05-04 Thread Frankvb
Dear all, In my dataset I have 12 columns and 5824 rows. The second column contains information about the height of a claim: it might be zero or positive. I would like to do an analysis on the positive part of this matrix, but I do need the other colums with this. So if there are like 1000 rows w

Re: [R] Objective: to create a Joint Probability Table

2010-05-04 Thread Roscoe
G'Day Ista, Tuesday, May 4, 2010, 3:20:37 PM, you wrote: > I couldn't make it though that excel worksheet without my eyes > glazing over... Heh, yeah, it is a bit long-winded. Essentially you take the input data and run it through those steps to produce the JPT at the end. Part of it is the odo

Re: [R] / Operator not meaningful for factors

2010-05-04 Thread Petr PIKAL
Hi Yes, it is also possible. I usually use as.numeric(as.character(some.factor.which can.be.transformed.to.numeric)) Regards Petr "Katya Mauff" napsal dne 04.05.2010 10:42:20: > apologies-try something like this: > > x<-rnorm(5) > > x > [1] 0.9128818 1.5615704 -1.2319878 -1.8689400 -1.29317

[R] Odp: Extract rows with non-zero elements

2010-05-04 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 04.05.2010 09:50:28: > > Dear all, > > In my dataset I have 12 columns and 5824 rows. The second column contains > information about the height of a claim: it might be zero or positive. I > would like to do an analysis on the positive part of this mat

[R] aregImpute (Hmisc package) : error in matxv(X, xcof)...

2010-05-04 Thread Marc Carpentier
Dear r-help list, I'm trying to use multiple imputation for my MSc thesis. Having good exemples using the Hmisc package, I tried the aregImpute function. But with my own dataset, I have the following error : Erreur dans matxv(X, xcof) : columns in a (51) must be <= length of b (50) De plus : Warn

[R] Agreement

2010-05-04 Thread HB8
Hi, Has Lawrence Lin's code been ported to R? http://tigger.uic.edu/~hedayat/sascode.html Regards, Gregoire Thomas [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://

Re: [R] How to rbind listed data frames?

2010-05-04 Thread it-r-help
assuming all data frames have the same format do.call("rbind", dataList) will concatenate all data frames contained in your list object. Phil Wieland wrote, On 05/04/10 09:51: > I made a list (dataList) of data frames. The list looks like this (the > first two elements): > > [[1]] > est

[R] All possible paths between two nodes in a flowgraph using igraphs?

2010-05-04 Thread jcano
Hi all Is there any systematic way to compute all possible paths, first-order loops and j-th order loops between two given nodes in a flowgraph (directed graph with cycles) - preferably using the igraph library in R? I have checked the igraph documentation but I can't figure out any direct and sy

[R] superscript

2010-05-04 Thread Kay Cichini
hello, i need to add legend text: "4th-root transformation", with the "th" superscripted - tried much - but nothing worked.. thanks for any hints, kay - Kay Cichini Postgraduate student Institute of Botany Univ. of Innsbruck -- View this

[R] All possible paths between two nodes in a flowgraph using igraphs?

2010-05-04 Thread jcano
Hi all Is there any systematic way to compute all possible paths, first-order loops and j-th order loops between two given nodes in a flowgraph (directed graph with cycles) - preferably using the igraph library in R? I have checked the igraph documentation but I can't figure out any direct and sy

Re: [R] superscript

2010-05-04 Thread Jorge Ivan Velez
Hi Kay, Try > plot(1:10) > legend('topleft', expression(4^th*"-root transformation")) HTH, Jorge On Tue, May 4, 2010 at 7:33 AM, Kay Cichini <> wrote: > > hello, > > i need to add legend text: "4th-root transformation", with the "th" > superscripted - > tried much - but nothing worked.. > > t

Re: [R] superscript

2010-05-04 Thread Duncan Murdoch
Kay Cichini wrote: hello, i need to add legend text: "4th-root transformation", with the "th" superscripted - tried much - but nothing worked.. This puts it in the title for the plot: plot(1, main=expression(paste("4"^"th"," root transformation"))) This puts it in a legend: legend("toplef

Re: [R] aregImpute (Hmisc package) : error in matxv(X, xcof)...

2010-05-04 Thread Uwe Ligges
Having reproducible examples including data and the actual call that lead to the error would be really helpful to be able to help. Uwe Ligges On 04.05.2010 12:23, Marc Carpentier wrote: Dear r-help list, I'm trying to use multiple imputation for my MSc thesis. Having good exemples using the Hm

Re: [R] superscript

2010-05-04 Thread Kay Cichini
thanks a lot! - Kay Cichini Postgraduate student Institute of Botany Univ. of Innsbruck -- View this message in context: http://r.789695.n4.nabble.com/superscript-tp2125341p2125384.html Sent from the R help mailing list archive at Nabble.co

Re: [R] superscript

2010-05-04 Thread Kay Cichini
thanks a lot! - Kay Cichini Postgraduate student Institute of Botany Univ. of Innsbruck -- View this message in context: http://r.789695.n4.nabble.com/superscript-tp2125341p2125386.html Sent from the R help mailing list archive at Nabble.co

Re: [R] All possible paths between two nodes in a flowgraph using igraphs?

2010-05-04 Thread Nikhil Kaza
Finding all paths between two nodes in a general graph is very hard. If your graph is sparse you may be able to construct the list of paths provided of course you take care not to get stuck in a cycle. But for most practical purposes you may just need edge disjoint path or vertex disjoint pat

[R] How to replace all values in a data.frame with another ( not 0) value

2010-05-04 Thread Nevil Amos
I need to replace occurrences in multiple columns in a data.frame with "000/000" how do I achieve this? Thanks Nevil Amos __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www

[R] Show number at each bar in barchart?

2010-05-04 Thread someone
when i plot a barchart with 5 bars there is one bar pretty long and the others get smaller like (20, 80, 20, 5, 2) is there a way of displaying the number accoirding to each bar next to it? like in a bwplot the panel option N? -- View this message in context: http://r.789695.n4.nabble.com/Show-

[R] Agreement

2010-05-04 Thread HB8
Hi, Has Lawrence Lin's code been ported to R? http://tigger.uic.edu/~hedayat/sascode.html Regards, Gregoire Thomas [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do r

Re: [R] How to replace all values in a data.frame with another ( not 0) value

2010-05-04 Thread Lanna Jin
Try: "x[which(is.na(x)),] <- 000/000", where is x is your data frame - Lanna Jin lanna...@gmail.com 510-898-8525 -- View this message in context: http://r.789695.n4.nabble.com/How-to-replace-all-NA-values-in-a-data-frame-with-another-not-0-value-tp2125458p2125464.html Sent from the R help

Re: [R] aregImpute (Hmisc package) : error in matxv(X, xcof)...

2010-05-04 Thread Frank E Harrell Jr
On 05/04/2010 06:52 AM, Uwe Ligges wrote: Having reproducible examples including data and the actual call that lead to the error would be really helpful to be able to help. Uwe Ligges In addition to that, this kind of message usually means that you have a singularity somewhere, e.g., you are

Re: [R] Need help on having multiple distributions in one graph

2010-05-04 Thread Frank E Harrell Jr
On 05/03/2010 11:14 PM, Jorge Ivan Velez wrote: Hi Joseph, How about this? matplot(cbind(m0, m1, m3, m4), type = 'l', lty = 1) legend('topright', paste('m', c(0, 1, 3, 4), sep = ""), lty = 1, col = 1:4) See ?matplot and ?legend for details. HTH, Jorge Also see the labcurve function in the H

Re: [R] Problem with vignette compilation during R CMD check

2010-05-04 Thread pomchip
Thanks Uwe __ 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 commented, minimal, self-contained, reproducible code.

Re: [R] How to replace all values in a data.frame with another ( not 0) value

2010-05-04 Thread Lanna Jin
Whoops, my bad. Maybe try using "gsub" - Lanna Jin lanna...@gmail.com 510-898-8525 -- View this message in context: http://r.789695.n4.nabble.com/How-to-replace-all-NA-values-in-a-data-frame-with-another-not-0-value-tp2125458p2125471.html Sent from the R help mailing list archive at Nabbl

Re: [R] How to replace all values in a data.frame with another ( not 0) value

2010-05-04 Thread Muhammad Rahiz
000/000 returns NaN, which is no different than NA unless you want it as string i.e. "000/000" Muhammad Lanna Jin wrote: Try: "x[which(is.na(x)),] <- 000/000", where is x is your data frame - Lanna Jin lanna...@gmail.com 510-898-8525 __

Re: [R] How to replace all values in a data.frame with another ( not 0) value

2010-05-04 Thread Muhammad Rahiz
Hi Nevil, You can try a method like this x <- c(rnorm(5),rep(NA,3),rnorm(5)) # sample data dat <- data.frame(x,x) # make sample dataframe dat2 <- as.matrix(dat) # conver to matrix y <- which(is.na(dat)==TRUE) # get index of NA values dat2[y] <- "

Re: [R] How to replace all values in a data.frame with another ( not 0) value

2010-05-04 Thread John Kane
?replace Something like this should work replace(df1, is.na(df1), "000/000") --- On Tue, 5/4/10, Nevil Amos wrote: > From: Nevil Amos > Subject: [R] How to replace all values in a data.frame with another ( > not 0) value > To: r-h...@stat.math.ethz.ch > Received: Tuesday, May 4, 2010, 8:54

Re: [R] How to replace all values in a data.frame with another ( not 0) value

2010-05-04 Thread Bart Joosen
try x[is.na(x)] <- "000/000" Bart -- View this message in context: http://r.789695.n4.nabble.com/How-to-replace-all-NA-values-in-a-data-frame-with-another-not-0-value-tp2125458p2125509.html Sent from the R help mailing list archive at Nabble.com. __

Re: [R] Show number at each bar in barchart?

2010-05-04 Thread John Kane
Try this. My appologies for not giving the attribution but I forget who wrote it. my.values=10:15 x <- barplot(my.values, ylim=c(0,11)) text(x, my.values, my.values, pos=3) text(x, my.values, "wibble", pos=3) --- On Tue, 5/4/10, someone wrote: > From: someone > Subject: [R]

Re: [R] error in La.svd Lapack routine 'dgesdd'

2010-05-04 Thread Douglas Bates
Google the name dgesdd to get the documentation where you will find that the error code indicates that the SVD algorithm failed to converge. Evaluation of the singular values and vectors is done via an iterative optimization and on some occasions will fail to converge. Frequently this is related

[R] make a column from the row names

2010-05-04 Thread Mohan L
Dear All, > avglog 01/11/09 02/11/09 03/11/09 04/11/09 9.75 4.50 4.50 8.67 > avglog1 <- data.frame(avglog) > avglog1 avglog 01/11/09 9.75 02/11/09 4.50 03/11/09 4.50 04/11/09 8.67 The first column isnt a column, It's the row names. I makeing a column fro

Re: [R] Plotting legend outside of multiple panels

2010-05-04 Thread Patrick Lenon
Another solution I've used is to set up an additional layout space and put the legend in there with no graph. You print a blank dummy graph and then add the legend to the "blank" layout panel like so: if (floatLegend) { # We want to float the legend independently # so we have to add

[R] Using R with screenreading software

2010-05-04 Thread Rainer Scheuchenpflug
Dear R-Experts, a student of mine tries to use the Windows-Rconsole with screen reading software (she is blind), and cannot access the command line (Menus are ok). The company which produces her screen reader tells her that this is due to the cursor used in Rconsole, which is static, not blinking.

Re: [R] Show number at each bar in barchart?

2010-05-04 Thread Jorge Ivan Velez
Hi someone, Try this: x <- c(20, 80, 20, 5, 2) b <- barplot(x, ylim = c(0, 85), las = 1) text(b, x+2, pch = x) HTH, Jorge On Tue, May 4, 2010 at 8:41 AM, someone <> wrote: > > when i plot a barchart with 5 bars there is one bar pretty long and the > others get smaller > like (20, 80, 20, 5, 2

Re: [R] make a column from the row names

2010-05-04 Thread John Kane
Have a look at ?substring --- On Tue, 5/4/10, Mohan L wrote: > From: Mohan L > Subject: [R] make a column from the row names > To: r-help@r-project.org > Received: Tuesday, May 4, 2010, 9:06 AM > Dear All, > > > avglog > 01/11/09 02/11/09 03/11/09 04/11/09 > 9.75 4.50 4.50 8.67

[R] R for web browser

2010-05-04 Thread Lanna Jin
Hi Everyone, Does anyone know of any projects for running an interactive R session within a web browser? I'm looking for something similar to the one on the Ruby website (http://tryruby.org), except for R. Thanks for your responses in advance! Lanna - Lanna Jin lanna...@gmail.com 510-898-

Re: [R] Using R with screenreading software

2010-05-04 Thread Duncan Murdoch
On 04/05/2010 9:41 AM, Rainer Scheuchenpflug wrote: Dear R-Experts, a student of mine tries to use the Windows-Rconsole with screen reading software (she is blind), and cannot access the command line (Menus are ok). The company which produces her screen reader tells her that this is due to the c

[R] Odp: How to replace all values in a data.frame with another ( not 0) value

2010-05-04 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 04.05.2010 14:54:14: > I need to replace occurrences in multiple columns in a data.frame > with "000/000" Be careful if you replace NA in numeric columns. > str(test) 'data.frame': 10 obs. of 3 variables: $ mp: num 20.9 19.9 20.1 20.2 18.9 ...

[R] Idiomatic looping over list name, value pairs in R

2010-05-04 Thread Luis N
Considering the python code: for k, v in d.items(): do_something(k); do_something_else(v) I have the following for R: for (i in c(1:length(d))) { do_something(names(d[i])); do_something_else(d[[i]]) } This does not seem seems idiomatic. What is the best way of doing the same with R? Thanks. L

[R] Memory issues using R withing Eclipse-StatET

2010-05-04 Thread Harsh
Hi useRs, I use R within Eclipse via StatET, and it seems to me that some memory intensive tasks fail due to this environment. For example: I was trying to find the distance matrix of a matrix with (1 rows and 500 columns), and it failed in StatET, whereas it worked in vanilla R. I'm using R

Re: [R] Show number at each bar in barchart?

2010-05-04 Thread David Winsemius
On May 4, 2010, at 9:40 AM, Jorge Ivan Velez wrote: Hi someone, Try this: x <- c(20, 80, 20, 5, 2) b <- barplot(x, ylim = c(0, 85), las = 1) text(b, x+2, pch = x) I suspect he wanted the "counts" in the label: x <- c(20, 80, 20, 5, 2) b <- barplot(x, ylim = c(0, 85), las = 1) text(b, x+

[R] Kernel density estimate plot for 3-dimensional data

2010-05-04 Thread Pascal Martin
Hi! I have a problem with Kernel density estimate plot for 3-dimensional data in ks-package. Here the example: # load ks, spatstat # three-dimensional kernel density of B B <- pp3(runif(300), runif(300), runif(300), box3(c(0,1))) x <- unclass(B$data)$df H <- Hpi(x) fhat <- kde(x, H=H) plot(fhat)

Re: [R] Idiomatic looping over list name, value pairs in R

2010-05-04 Thread Christos Argyropoulos
Can you give an example of what the python code is supposed to do? Some of us are not familiar with python, and the R code is not particularly informative. You seem to encode information on both the values and the names of the elements of the vector "d". If this is the case, why don't you creat

Re: [R] Idiomatic looping over list name, value pairs in R

2010-05-04 Thread Duncan Murdoch
On 04/05/2010 10:24 AM, Luis N wrote: Considering the python code: for k, v in d.items(): do_something(k); do_something_else(v) I have the following for R: for (i in c(1:length(d))) { do_something(names(d[i])); do_something_else(d[[i]]) } This does not seem seems idiomatic. What is the best w

[R] Lazy evaluation in function call

2010-05-04 Thread Thorn
Hi everybody, how is it possible to refer to an argument passed to a function in the function call? What I like to do, is something like f <- function(x,y) x+y f(2, x) # should give 4 The problem is of course that x is only known inside the function. Of course I could specify something like f

[R] fit printed output onto a single page

2010-05-04 Thread Abiel X Reinhart
Is there a way to force a certain block of captured output to fit onto a single printed page, where one can specify the properties of the page (dimensions, margins, etc)? For example, I might want to generate 10 different cuts of a data table and then capture all the output into a PDF, ensuring

Re: [R] Kernel density estimate plot for 3-dimensional data

2010-05-04 Thread Duncan Murdoch
On 04/05/2010 10:33 AM, Pascal Martin wrote: Hi! I have a problem with Kernel density estimate plot for 3-dimensional data in ks-package. Here the example: # load ks, spatstat # three-dimensional kernel density of B B <- pp3(runif(300), runif(300), runif(300), box3(c(0,1))) x <- unclass(B$data

[R] strange behavior of RODBC and/or ssconvert

2010-05-04 Thread stefan.d...@gmail.com
Dear All, I have the following problem when reading files (a lot of them) in the spreadsheetML format into R. The spreadsheetML format is an xml format to allow easy import of multisheet data in Excel. As far as I can see, a direct import into R (using the XML package) is not feasible. I use the s

Re: [R] Idiomatic looping over list name, value pairs in R

2010-05-04 Thread Luis N
Thank you. Your response was enlightening. On Tue, May 4, 2010 at 11:38 PM, Duncan Murdoch wrote: > On 04/05/2010 10:24 AM, Luis N wrote: >> >> Considering the python code: >> >> for k, v in d.items(): do_something(k); do_something_else(v) >> >> I have the following for R: >> >> for (i in c(1:len

Re: [R] 3D version of triax.plot (package plotrix)

2010-05-04 Thread Gabriele Esposito
Hi Jim, thanks! With just the rgl package I cannot do that. For the moment, I merged two values into one and use triax.plot in the package plotrix, but that's not fully satisfactory. If you find something, let me know, thank you a lot! Gabriele On Mon, May 3, 2010 at 2:29 PM, Jim Lemon wrote:

Re: [R] Kernel density estimate plot for 3-dimensional data

2010-05-04 Thread Pascal Martin
An: Duncan Murdoch Gesendet: Dienstag, den 4. Mai 2010, 17:03:46 Uhr Betreff: AW: [R] Kernel density estimate plot for 3-dimensional data #B <- pp3(runif(300), runif(300), runif(300), box3(c(0,1))) creates a 3d pattern with random points. But I want it to

Re: [R] Kernel density estimate plot for 3-dimensional data

2010-05-04 Thread Duncan Murdoch
On 04/05/2010 11:03 AM, Pascal Martin wrote: #B <- pp3(runif(300), runif(300), runif(300), box3(c(0,1))) creates a 3d pattern with random points. But I want it to create a Kernel density estimate plot with my coordinates. I show it in an example: > x<- scan() 1: 1 2 3 4 5 6 7 8 9 10 11: Read 10

[R] Avoiding for-loop for splitting vector into subvectors based on positions

2010-05-04 Thread Joris Meys
Dear all, I'm trying to optimize code and want to avoid for-loops as much as possible. I'm applying a calculation on subvectors from a big one, and I get the subvectors by using a vector of starting positions: x <- 1:10 pos <- c(1,4,7) n <- length(x) I try to do something like this : pos2 <- c(p

Re: [R] Avoiding for-loop for splitting vector into subvectors based on positions

2010-05-04 Thread jim holtman
Try this: > x <- 1:10 > pos <- c(1,4,7) > pat <- rep(seq_along(pos), times=diff(c(pos, length(x) + 1))) > split(x, pat) $`1` [1] 1 2 3 $`2` [1] 4 5 6 $`3` [1] 7 8 9 10 On Tue, May 4, 2010 at 11:29 AM, Joris Meys wrote: > Dear all, > > I'm trying to optimize code and want to avoid for-loops

Re: [R] R for web browser

2010-05-04 Thread Tal Galili
I wrote about R-Node last month, it offers what you are talking about: http://www.r-statistics.com/2010/04/r-node-a-web-front-end-to-r-with-protovis/ Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read

Re: [R] / Operator not meaningful for factors

2010-05-04 Thread John Kane
--- On Tue, 5/4/10, Petr PIKAL wrote: > From: Petr PIKAL > Subject: Re: [R] / Operator not meaningful for factors > To: "John Kane" > Cc: r-help@r-project.org, "vincent.deluard" > Received: Tuesday, May 4, 2010, 3:38 AM > Hi > > r-help-boun...@r-project.org > napsal dne 04.05.2010 00:50:00:

Re: [R] ISO Eric Kort (rtiff)

2010-05-04 Thread cgw
Thanks, Brian. I can see where to mod readTiff to return the original data ranges; and where to mod writeTiff so it writes files with something better than the current 0:255 resolution range. I have found an additional problem with readTiff, so is there someone I can write to about it? What

[R] read.table: skipping trailing delimiters

2010-05-04 Thread Marshall Feldman
Hi, I am trying to read a tab-delimited file that has trailing tab delimiters. It's a simple file with two legitimate fields. I'm using the first as row.names, and the second should be the only column in the resulting data frame. Initially, R was filling the last column with NA's, but I was

Re: [R] strange behavior of RODBC and/or ssconvert

2010-05-04 Thread Gabor Grothendieck
The original seems not to have gotten through. Here it is again. On Tue, May 4, 2010 at 11:14 AM, Gabor Grothendieck wrote: > Try a few of the solutions here: > http://rwiki.sciviews.org/doku.php?id=tips:data-io:ms_windows > and see if they all give you the same result. > __

[R] Flushing print buffer

2010-05-04 Thread Marshall Feldman
Hello, I have a function with these lines: test <- function(object,...){ cat("object: has ",nrow(object),"labels\n") cat("Head:\n") head(object,...) cat("\nTail:\n") tail(object,...) } If I feed it a data frame object, it only prints ou

Re: [R] read.table: skipping trailing delimiters

2010-05-04 Thread Marc Schwartz
On May 4, 2010, at 11:11 AM, Marshall Feldman wrote: > Hi, > > I am trying to read a tab-delimited file that has trailing tab delimiters. > It's a simple file with two legitimate fields. I'm using the first as > row.names, and the second should be the only column in the resulting data > frame.

Re: [R] read.table: skipping trailing delimiters

2010-05-04 Thread Gabor Grothendieck
Re-read the colClasses section of ?read.table. Use "NULL", not NULL. On Tue, May 4, 2010 at 12:11 PM, Marshall Feldman wrote: > Hi, > > I am trying to read a tab-delimited file that has trailing tab delimiters. > It's a simple file with two legitimate fields. I'm using the first as > row.names,

Re: [R] Flushing print buffer

2010-05-04 Thread jim holtman
explicitly print your data: print(head(object,...)) On Tue, May 4, 2010 at 12:23 PM, Marshall Feldman wrote: > Hello, > > I have a function with these lines: > >test <- function(object,...){ > cat("object: has ",nrow(object),"labels\n") > cat("Head:\n") > head(obje

Re: [R] Flushing print buffer

2010-05-04 Thread jim holtman
I should have also had you read FAQ 7.16 On Tue, May 4, 2010 at 12:43 PM, jim holtman wrote: > explicitly print your data: > > print(head(object,...)) > On Tue, May 4, 2010 at 12:23 PM, Marshall Feldman wrote: > >> Hello, >> >> I have a function with these lines: >> >>test <- function(objec

[R] Package Rsafd

2010-05-04 Thread Bo Li
Dear R community, I am looking for the package "Rsafd". It is not listed on the CRAN directory. I am wondering anyone has idea with this package. Thans a lot! Bo _ The New Busy is not t

[R] legend with lines and points

2010-05-04 Thread threshold
Hi, say there are x and y given as: level x y 3 0.112 0.012 2 0.432 0.111 1 0.415 0.053 3 0.380.005 2 0.607 0.01 1 NA NA 3 0.572 0.01 2 0.697 0.039 1 0.377 0.006 3 NA NA 2 0.571 0.003 1 0

Re: [R] Package Rsafd

2010-05-04 Thread David Winsemius
Try R-Forge On May 4, 2010, at 12:58 PM, Bo Li wrote: Dear R community, I am looking for the package "Rsafd". It is not listed on the CRAN directory. I am wondering anyone has idea with this package. Thans a lot! David Winsemius, MD West Hartford, CT ___

Re: [R] Package Rsafd

2010-05-04 Thread David Winsemius
On May 4, 2010, at 1:12 PM, David Winsemius wrote: Try R-Forge I made that suggestion based on finding links to R-Forge searching for "rsafd" with RSeek but that was misleading. Try instead: http://orfe.princeton.edu/~rcarmona/SVbook/svbook.html On May 4, 2010, at 12:58 PM, Bo Li wrote

Re: [R] R for web browser

2010-05-04 Thread j verzani
Lanna Jin gmail.com> writes: > > > Hi Everyone, > > Does anyone know of any projects for running an interactive R session within > a web browser? > I'm looking for something similar to the one on the Ruby website > (http://tryruby.org), except for R. > > Thanks for your responses in advance!

[R] help overlay scatterplot to effects plot

2010-05-04 Thread Anderson, Chris
I have a process where I am creating a effects plot similar to the cowles effect example. I would like to add the point estimates to the effects plot, can someone show me the correct syntax. I have included the "R" effects example, so you can show me the correct syntax. Thanks mod.cowles <- g

[R] How to make predictions with the predict() method on an arimax object using arimax() from TSA library

2010-05-04 Thread a a
Hi R Users, I'm fairly new to R (about 3 months use thus far.) I wanting to use the arimax function from the TSA library to incorporate some exogenous inputs into the basic underllying arima model.Then with that newly model of type arimax, I would like to make a prediction. To avoid be

[R] Re : aregImpute (Hmisc package) : error in matxv(X, xcof)...

2010-05-04 Thread Marc Carpentier
Ok. I was afraid to refer to a known and obvious error. Here is a testing dataset (pb1.csv) and commented code (pb1.R) with the problems. Thanks for any help. Marc De : Uwe Ligges À : Marc Carpentier Cc : r-help@r-project.org Envoyé le : Mar 4 mai 2010, 13 h 52

[R] unsubcribe

2010-05-04 Thread Galois Theory
[[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 http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained,

Re: [R] Re : aregImpute (Hmisc package) : error in matxv(X, xcof)...

2010-05-04 Thread David Winsemius
On May 4, 2010, at 2:13 PM, Marc Carpentier wrote: Ok. I was afraid to refer to a known and obvious error. Here is a testing dataset (pb1.csv) and commented code (pb1.R) with the problems. Thanks for any help. Nothing attached. In all likelihood had you given these file names with extens

Re: [R] unsubcribe

2010-05-04 Thread Cedrick W. Johnson
https://stat.ethz.ch/mailman/listinfo/r-help On 5/4/2010 2:25 PM, Galois Theory wrote: [[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 ht

[R] randomforests - how to classify

2010-05-04 Thread pdb
Hi, I'm experimenting with random forests and want to perform a binary classification task. I've tried some of the sample codes in the help files and things run, but I get a message to the effect 'you don't have very many unique values in the target - are you sure you want to do regression?' (so

[R] installing a package in linux

2010-05-04 Thread Fahim Md
I recently started using ubuntu 9.10 and I am using gedit editor and R plugin for writing R code. To install any package I need to do: $ install.packages() //window pop-up for mirror selection //then another window pop up for package selection. After this as long as I am not exiting, the function

Re: [R] randomforests - how to classify

2010-05-04 Thread Changbin Du
use (as.factor(target) ~., data =your data, ...) On Tue, May 4, 2010 at 12:07 PM, pdb wrote: > > Hi, > > I'm experimenting with random forests and want to perform a binary > classification task. > I've tried some of the sample codes in the help files and things run, but I > get a message to

[R] R formula language---a min and max function?

2010-05-04 Thread ivo welch
Dear R experts---I would like to estimate a non-linear least squares expression that looks something like y ~ a+b*min(c,x) where a, b, and c are the three parameters. how do I define a min function in the formula language of R? advice appreciated. sincerely, /iaw _

Re: [R] R formula language---a min and max function?

2010-05-04 Thread David Winsemius
On May 4, 2010, at 3:33 PM, ivo welch wrote: Dear R experts---I would like to estimate a non-linear least squares expression that looks something like y ~ a+b*min(c,x) where a, b, and c are the three parameters. how do I define a min function in the formula language of R? advice appreciat

Re: [R] R formula language---a min and max function?

2010-05-04 Thread ivo welch
thank you, david. indeed. works great (almost). an example for anyone else googling this in the future: > x=1:20 > y= 2+3*ifelse(x>10, 10, x)+rnorm(20,0,0.01) > r1= nls( y~ a+b*pmin(c,x), start=list(a=2, b=3, c=10), trace=TRUE ) 0.002142 : 2 3 10 0.002115 : 2.004 3.000 10.000 0.002114 :

Re: [R] R formula language---a min and max function?

2010-05-04 Thread Gabor Grothendieck
You need to use set.seed first so that your example is reproducible. Using set.seed(1) there is no error: > set.seed(1) > x=1:20 > y= 2+3*ifelse(x>10, 10, x)+rnorm(20,0,0.01) > r1= nls( y~ a+b*pmin(c,x), start=list(a=2, b=3, c=10), trace=TRUE ) 0.001657260 : 2 3 10 0.00153709 : 1.998312 3.0005

Re: [R] R formula language---a min and max function?

2010-05-04 Thread David Winsemius
On May 4, 2010, at 3:52 PM, ivo welch wrote: thank you, david. indeed. works great (almost). an example for anyone else googling this in the future: x=1:20 y= 2+3*ifelse(x>10, 10, x)+rnorm(20,0,0.01) r1= nls( y~ a+b*pmin(c,x), start=list(a=2, b=3, c=10), trace=TRUE ) 0.002142 : 2 3 10

[R] rgl: plane3d or abline() analog

2010-05-04 Thread Michael Friendly
For use with rgl, I'm looking for a function to draw a plane in an rgl scene that would function sort of like abline(a, b) does in base graphics, where abline(0, 1) draws a line of unit slope through the origin. Analogously, I'd like to have a plane3d function, so that plane3d(0, 1, 1) draws a p

Re: [R] rgl: plane3d or abline() analog

2010-05-04 Thread David Winsemius
On May 4, 2010, at 4:09 PM, Michael Friendly wrote: For use with rgl, I'm looking for a function to draw a plane in an rgl scene that would function sort of like abline(a, b) does in base graphics, where abline(0, 1) draws a line of unit slope through the origin. Analogously, I'd like to hav

Re: [R] generating correlated random variables from different distributions

2010-05-04 Thread Greg Snow
Transforming variables will generally change the correlation, so your method will give you correlated variables, but not exactly at the correlations you specify (though with some trial and error you may be able to get close). If you are happy with those results, then your problem is solved, if

Re: [R] Agreement

2010-05-04 Thread Tobias Verbeke
Hi Grégoire, HB8 wrote: Has Lawrence Lin's code been ported to R? http://tigger.uic.edu/~hedayat/sascode.html One of Lin's methods (CCC) is available in function epi.ccc of the epiR package. Best, Tobias _

[R] Error when invoking x11()

2010-05-04 Thread Alex Chelminsky
I'm running an instance of R under Solaris 10.(sun4u sparc). When I invoke the x11() interface, I get the following error: > x11() Error in x11() : X11 module cannot be loaded In addition: Warning message: In x11() : unable to load shared library '/usr/local/lib/R/modules//R_X11.so': ld.so.1:

Re: [R] Avoiding for-loop for splitting vector into subvectors based on positions

2010-05-04 Thread Joris Meys
Thanks, works nicely. I have to do some clocking to see how much the improvement is, but I surely learnt again. Attentive readers might have noticed my initial code contains an error. tmp <- x[pos2[i]:pos2[i+1]] should be: tmp <- x[pos2[i]:(pos2[i+1]-1)] off course... On Tue, May 4, 2010 at 5:50

[R] Two Questions on R (call by reference and pre-compilation)

2010-05-04 Thread Ruihong Huang
Hi All, I have two questions on R. Could you please explain them to me? Thank you! 1) When call a function, R typically copys the values to formal arguments (call by value). This is very cost, if I would like to pass a huge data set to a function. Is there any situations that R doesn't copy t

[R] timing a function

2010-05-04 Thread pdb
Hi, I want to time how long a function takes to execute. Any clues on what to search for to achieve this? Thanks in advance. -- View this message in context: http://r.789695.n4.nabble.com/timing-a-function-tp2126319p2126319.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] timing a function

2010-05-04 Thread mohamed . lajnef
Hi, ? proc.time() for more help regards Ml pdb a écrit : Hi, I want to time how long a function takes to execute. Any clues on what to search for to achieve this? Thanks in advance. -- View this message in context: http://r.789695.n4.nabble.com/timing-a-function-tp2126319p2126319.html

Re: [R] R formula language---a min and max function?

2010-05-04 Thread ivo welch
thank you, david and gabor. very much appreciated. I should have thought of setting the seed. this was only an example, of course. alas, such intermittent errors could still be of concern to me, because I need to simulate this nls() to find out its properties under the NULL, so I can't easily to

  1   2   >