Re: [R] how to store lme/lmer fit result

2008-10-09 Thread Dieter Menne
liujb yahoo.com> writes: > I am building a hierarchical model on a large data set. It can take quite > some time to finish one fit, I was just wondering whether it is possible to > store the fit object (the result) to a file for later (offline) analysis. Like with any other R object, you can u

[R] Credit Scoring Model - SPEC (specificity) and SENS (sensitivity)

2008-10-09 Thread Maithili Shiva
Dear R helpers, Hi I am working on credit scoring model using logistic regression. I have main sample of 42500 clentes and based on their status as regards to defaulted / non - defaulted, I have genereted the probability of default. I have a hold out sample of 5000 clients. I have calculated (1

Re: [R] Spatstat - Several density plots using the same scale

2008-10-09 Thread Adrian Baddeley
Arthur Weiss wrote: Hi everyone, I am using the package "spatstat" for ploting kernel maps of my data. It is a marked point pattern, the result of mosquito surveillance in a area in a week. For each trap, the number of individuals captured is the mark of the point. plot(density(X, weights=

[R] how to store lme/lmer fit result

2008-10-09 Thread liujb
Dear R users, I am building a hierarchical model on a large data set. It can take quite some time to finish one fit, I was just wondering whether it is possible to store the fit object (the result) to a file for later (offline) analysis. thanks Julia -- View this message in context: http://w

[R] Installing ROracle in windows.. Pls help

2008-10-09 Thread Rita. A
I have installed R 2.7.2 in windows, now i am trying to install R oracle... I am using Oracle 10g. i have downloaded the Roracle 0.5-9 sources, and i am trying to compile it using Vc++, i found from readme files and forum that, we need to use the makefile.win in the \src folder and nmake utility

[R] Logistic regresion - Interpreting (SENS) and (SPEC)

2008-10-09 Thread Maithili Shiva
Hi Hi I am working on credit scoring model using logistic regression. I havd main sample of 42500 clentes and based on their status as regards to defaulted / non - defaulted, I have genereted the probability of default. I have a hold out sample of 5000 clients. I have calculated (1) No of corre

Re: [R] Write multiple objects / data frames into a single .csv -- write.csv

2008-10-09 Thread Michael Just
Yihui, append=true Is what I needed. Thanks, Michael On Fri, Oct 10, 2008 at 12:47 AM, Yihui Xie <[EMAIL PROTECTED]> wrote: > use "append = TRUE" or rbind() your data.frames together before > writing the csv file. > > Regards, > Yihui > -- > Yihui Xie <[EMAIL PROTECTED]> > Phone: +86-(0)10-825

Re: [R] Write multiple objects / data frames into a single .csv -- write.csv

2008-10-09 Thread Yihui Xie
use "append = TRUE" or rbind() your data.frames together before writing the csv file. Regards, Yihui -- Yihui Xie <[EMAIL PROTECTED]> Phone: +86-(0)10-82509086 Fax: +86-(0)10-82509086 Mobile: +86-15810805877 Homepage: http://www.yihui.name School of Statistics, Room 1037, Mingde Main Building, Ren

[R] Questions on code compilation of R by Luke

2008-10-09 Thread Imanpreet
Hello All, I came across following docs/links on the current work by Luke for code compilation/byte code for R. http://www.stat.uiowa.edu/~luke/R/bytecode.html and http://www.ci.tuwien.ac.at/Conferences/DSC-2001/Proceedings/Tierney.pdf Also a usage guide http://www.stat.cmu.edu/~hse

Re: [R] R2.7.2 graph printing issue: incomplete printing

2008-10-09 Thread Prof Brian Ripley
Assuming this is Windows (you did not say, despite the posting guide), 2.7.2 patched has the following in the CHANGES file: o The clip region was sometimes wrong when printing from the menu on a windows() graphics device (in 2.7.2 only). So simply update to R 2.8.0 beta or R 2.7.2 p

Re: [R] R seven years ago

2008-10-09 Thread John Maindonald
So what is the answer to the question: "Can success continue"? I suspect that R is now so firmly entrenched that it will inevitably continue, in one or other incarnation, for a long time to come. The negative factors that John Fox lists will surely, in time, make some changes inevitable. Will th

Re: [R] NA's in multiple choice summary table in Hmisc

2008-10-09 Thread Frank E Harrell Jr
Erich Studerus wrote: Thank you so much. I have yet another problem that I could not resolve from the documentation. I want to get line breaks for long variable names. Here's an example: Gender<-sample(c("m","f"),20,replace=TRUE) Education<-rnorm(20,13) label(Education)<-"Years of\nEducation" su

Re: [R] runs of heads when flipping a coin

2008-10-09 Thread Moshe Olshansky
First of all, we must define what is a run of length r: is it a tail, then EXACTLY r heads and a tail again or is it AT LEAST r heads. Let's assume that we are looking for a run of EXACTLY r heads (and we toss the coin n times). Let X[1],X[2],...,X[n-r+1] be random variables such that Xi = 1 if t

[R] R2.7.2 graph printing issue: incomplete printing

2008-10-09 Thread Songer
Hi, I have encountered a problem with R2.7.2 printing. I used the following code to generate a graph: a <- 1:50 b <- a plot(a~b) In the pop-up windows with the graph, I try to print the graph by using "File" -> "Print". The graph was printed, but it was incomplete. Some area was missing in the l

Re: [R] Singular information matrix in lrm.fit

2008-10-09 Thread Charles C. Berry
On Thu, 9 Oct 2008, useR wrote: Hi R helpers, I'm fitting large number of single factor logistic regression models as a way to immediatly discard factor which are insignificant. Everything works fine expect that for some factors I get error message "Singular information matrix in lrm.fit" whi

Re: [R] Biplot connecting consecutive dates (ggplot?)

2008-10-09 Thread stephen sefick
qplot(V1, V2, data=f, colour=site) + geom_path() works thanks for the help On Thu, Oct 9, 2008 at 6:48 PM, hadley wickham <[EMAIL PROTECTED]> wrote: > On Thu, Oct 9, 2008 at 5:04 PM, stephen sefick <[EMAIL PROTECTED]> wrote: >> I would like to connect the dots based on when they occur in time. I

Re: [R] Creating GUIs for R

2008-10-09 Thread John Fox
Dear Greg and Ricardo, The Rcmdr works on Windows, Macs, and Unix/Linux systems since it's based on the tcltk package, which is available on all of these platforms. Regards, John -- John Fox, Professor Department of Sociology McMaster University Hamilton, Ontario, Ca

[R] user prompts/interactivity in Sweave documents

2008-10-09 Thread Ben Bryant
Greetings - I'm documenting a package and would like make a package vignette with Sweave, but the primary functions in my package are highly interactive, routinely using both readline() and identify(). I could not determine whether it was somehow possible to encode example user responses into the

Re: [R] Biplot connecting consecutive dates (ggplot?)

2008-10-09 Thread hadley wickham
On Thu, Oct 9, 2008 at 5:04 PM, stephen sefick <[EMAIL PROTECTED]> wrote: > I would like to connect the dots based on when they occur in time. Is > there an easy way to do this? How exactly do you want to connect them? One approach is: qplot(V1, V2, data=f, colour=date) + geom_path() # or maybe

[R] help

2008-10-09 Thread Bing Shen
Hello, I'm not sure this is doable but I'm having trouble running my R script with multithreaded capability. With 16x2.93Ghz CPUs available, only one is running with 100%. Any suggestions? Thanks, Bing My system configuration is: egenera virtual machine running Linux Red Hat Enterprise Linux

Re: [R] ggplot 2 - editing in the "panel_1_1" viewport

2008-10-09 Thread Paul Murrell
Hi Pedro Barros wrote: > Hi Paul, > Thanks for the tips. I am using ggplot indeed, but I am trying to "drill > down", and extract several grobs, most of which are gTrees or frames. Until > now, I have more or less managed, but I am having difficulties because I > would like to get at the gTrees t

[R] Singular information matrix in lrm.fit

2008-10-09 Thread useR
Hi R helpers, I'm fitting large number of single factor logistic regression models as a way to immediatly discard factor which are insignificant. Everything works fine expect that for some factors I get error message "Singular information matrix in lrm.fit" which breaks whole execution loop... h

Re: [R] Creating GUIs for R

2008-10-09 Thread Greg Snow
Have you looked at Rcmdr & JGR? I have not tried them on Mac, but as far as I know, they work. -Original Message- From: "[Ricardo Rodriguez] Your XEN ICT Team" <[EMAIL PROTECTED]> To: "Greg Snow" <[EMAIL PROTECTED]> Cc: "Antonio Martinez Cortizas" <[EMAIL PROTECTED]>; "[EMAIL PROTECTED]"

Re: [R] Help MLE

2008-10-09 Thread Ben Bolker
LFRC yahoo.com.br> writes: > > > Dear, > > I'm starting on R language. I would like some help to implement a MLE > function. > > I wish to obtain the variables values (alpha12, w_g12, w_u12) that maximize > the function LL = Y*ln(alpha12 + g*w_g12 + u*w_u12). > You're running into a pro

[R] Biplot connecting consecutive dates (ggplot?)

2008-10-09 Thread stephen sefick
I would like to connect the dots based on when they occur in time. Is there an easy way to do this? thanks f <- (structure(list(date = structure(c(1L, 2L, 3L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 4L, 5L, 6L, 7L, 8L, 9L, 2L, 3L, 10L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 4L, 5L, 6L, 7L,

[R] Write multiple objects / data frames into a single .csv -- write.csv

2008-10-09 Thread Michael Just
Hello, Is there a way to put multiple data.frames or objects into a single .csv ? I know I can use sink() to do this for a text file. Is there way to do it for a .csv? e.g. for sink() sink("c5.k.s.p.92.LN.sl.vs.mean.txt") symnum(c5.k.92.LN.sl.vs.mean) symnum(c5.s.92.LN.sl.vs.mean) symnum(c5.p.92.

Re: [R] Bug in ifelse

2008-10-09 Thread Daniel Malter
I just gave up a second too early: It does not work with ifelse(...) as ifelse(...) assigns only a singley value (the first in the vector). A regular if(...) else ... condition works, however. Daniel Malter wrote: > > Hi all, I am quite sure it's not a bug, but I am going nuts about this. I >

Re: [R] Bug in ifelse

2008-10-09 Thread Rolf Turner
On 10/10/2008, at 10:33 AM, Daniel Malter wrote: Hi all, I am quite sure it's not a bug, but I am going nuts about this. I do not possibly understand why I get different results for b1 and b2 as shown below. x=c (183,191,192,193,195,206,207,209,210,211,212,213,214,217,218,221,222,2 23,

Re: [R] Exporting symnum() result from cor()

2008-10-09 Thread Michael Just
Richard, Thanks this works well. -Michael Just On Thu, Oct 9, 2008 at 2:43 PM, Michael Just <[EMAIL PROTECTED]> wrote: > Hello John, > Is it possible to write more than one data frame to a single write.csv or > write.table? > > Thanks, > Michael > > > On Thu, Oct 9, 2008 at 8:38 AM, John Kane <

Re: [R] runs of heads when flipping a coin

2008-10-09 Thread Carl Witthoft
IIRC this is a standard problem in digital communications theory, so you might want to look for literature in that arena. Carl > Can someone recommend a method to answer the following type of > question: > > Suppose I have a coin with a probability hhh of coming up heads > (and 1-hhh > of comi

[R] Bug in ifelse

2008-10-09 Thread Daniel Malter
Hi all, I am quite sure it's not a bug, but I am going nuts about this. I do not possibly understand why I get different results for b1 and b2 as shown below. x=c(183,191,192,193,195,206,207,209,210,211,212,213,214,217,218,221,222,223, 224,225,227,228,229,230) y=c(221,225,228,241,242) z=y[ya],x)

Re: [R] Dump decision trees of randomForest object

2008-10-09 Thread Pedro.Rodriguez
Hi Chris, Maybe it is easier if you try the following C++ library http://mtv.ece.ucsb.edu/benlee/librf.html Regards, Pedro -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Christian Sturz Sent: Thursday, October 09, 2008 4:30 PM To: Liaw, Andy; r-he

Re: [R] Creating GUIs for R

2008-10-09 Thread Prof Brian Ripley
On Thu, 9 Oct 2008, Greg Snow wrote: I am not involved in the RExcel project. I have just had some discussions with the people that are, so you should contact them for specific questions. I believe that this currently only works on windows, there was some mention of possibly expanding it to

Re: [R] Creating GUIs for R

2008-10-09 Thread [Ricardo Rodriguez] Your XEN ICT Team
Thanks Greg, Greg Snow wrote: I am not involved in the RExcel project. I have just had some discussions with the people that are, so you should contact them for specific questions. I believe that this currently only works on windows, there was some mention of possibly expanding it to OpenOff

Re: [R] Creating GUIs for R

2008-10-09 Thread [Ricardo Rodriguez] Your XEN ICT Team
Hi, eugene dalt wrote: Check out R-PLUS 3.3 from XLSolutions Corp. They have a GUI that you can easily expand. www.Experience-Rplus.com Windows only? We are trying to moved out of Windows. The objective is to promote an environment that support us much environments as possible. Linux,

[R] nlme Random Effects Specification

2008-10-09 Thread Denney, William S.
Hello, I'm having trouble correctly specifying the random effects for a nlme model. The general summary of what I'm trying to do is that I've got a data set that has multiple individuals and multiple machines that took measurements from those individuals. At least one of the machines has drift d

Re: [R] Dump decision trees of randomForest object

2008-10-09 Thread Christian Sturz
I've tried the getTree() function and printed a decision tree with print(). However, it seems to me that it's hard to parse this representation and translate it into equivalent if-then-else C constructs. Are there no other ways to dump the trees into a more hierarchical form? What do you exactly m

Re: [R] Interpretation in cor()

2008-10-09 Thread Michael Just
>From ?cor() ## Two simple vectors cor(1:10,2:11)# == 1 ## Correlation Matrix of Multivariate sample: (Cl <- cor(longley)) ## Graphical Correlation Matrix: symnum(Cl) # highly correlated ## Spearman's rho and Kendall's tau symnum(clS <- cor(longley, method = "spearman")) symnum(clK <- cor(longley,

[R] GPL and adds-on

2008-10-09 Thread robert-mcfadden
I'm wondering is it in accordance with the law, taking into account GNU GPL on which R is based, that SPSS have adds-on module that allow you to do a analysis in R. I mean commercial software use R. I guess that nobody can create R-GUI (e.g. in JAVA) on commercial rules (licensing, pricing, sell

Re: [R] Plot grouped histograms

2008-10-09 Thread Peter Dalgaard
[EMAIL PROTECTED] wrote: r11 -- r16 are variables showing a reason for usage of a product in 6 different situations. Each variable is a factor with 4 levels imported from a SPSS sav file with labels ranging from "not important" to "very important", and NA's for a sample of N = 276. (1) I need

Re: [R] Spatstat - Several density plots using the same scale

2008-10-09 Thread Rolf Turner
On 10/10/2008, at 4:48 AM, Arthur Weiss wrote: Hi everyone, I am using the package "spatstat" for ploting kernel maps of my data. It is a marked point pattern, the result of mosquito surveillance in a area in a week. For each trap, the number of individuals captured is the mark of the point.

[R] YALAQ - Yet Another LApply Question

2008-10-09 Thread Thompson, David (MNR)
Hello, Two lapply questions (system info and sample data below): 1) Why does the first form of command1 add the name of y _after_ the str() output rather than before as does the second (preferred) form? # command1 version1 invisible(lapply(ls(pattern='bn'), function(y) cat(y, "\n", str(get(

Re: [R] number format in plots

2008-10-09 Thread Peter Dalgaard
Jarek Jasiewicz wrote: Hi It is probably simple but how to force in plot command number format: 2, 3, 4 etc. instead of 2e+04, 3e+04 etc. Not all that simple! It's one of those cases where you need to regain some control that you normally leave to the automatics. What you can do i

Re: [R] nls, lattice, and conversion over to ggplot

2008-10-09 Thread stephen sefick
Error in `[.data.frame`(df, , var) : undefined columns selected I got this error in a fresh R session after rerunning all of the commands On Thu, Oct 9, 2008 at 3:45 PM, hadley wickham <[EMAIL PROTECTED]> wrote: > On Thu, Oct 9, 2008 at 2:29 PM, stephen sefick <[EMAIL PROTECTED]> wrote: > > I am

Re: [R] runs of heads when flipping a coin

2008-10-09 Thread Rolf Turner
On 10/10/2008, at 6:16 AM, Harvey wrote: Can someone recommend a method to answer the following type of question: Suppose I have a coin with a probability hhh of coming up heads (and 1-hhh of coming up tails) I plan on flipping the coin nnn times (for example, nnn = 500) What is the expec

[R] Print call condensely

2008-10-09 Thread Shengqiao Li
Hello all, I want to print out "call" from my function. When I have a long list of arguments or long names for them, I either got mulilines using default print or big blank space using cat: foo<- function(data, newdata) { call <- match.call(); cat("Call:\n"); print(call); cat("\nCa

Re: [R] R book needed

2008-10-09 Thread Gabor Grothendieck
It would take the size of several books to systematically list everything in R so no book could contain that. If you read one page of the R reference manual per day and when you are finished with that then read the entire reference manual of one contributed package each week then you should be fin

Re: [R] nls, lattice, and conversion over to ggplot

2008-10-09 Thread hadley wickham
On Thu, Oct 9, 2008 at 2:29 PM, stephen sefick <[EMAIL PROTECTED]> wrote: > I am trying to figure out how to use ggplot2. I would like to do the below > with ggplot, but I can not figure out how. The data provided is a subset of > a much larger data set, but these data are the data necessary to m

Re: [R] Exporting symnum() result from cor()

2008-10-09 Thread Michael Just
Hello John, Is it possible to write more than one data frame to a single write.csv or write.table? Thanks, Michael On Thu, Oct 9, 2008 at 8:38 AM, John Kane <[EMAIL PROTECTED]> wrote: > Perhaps save the file as a csv (?write.table) and present the results in a > spreadsheet or word processor tab

[R] Binom.test, vector input

2008-10-09 Thread David Afshartous
All, Is it possible to use binom.test with vector input for only one of the arguments? I was thinking that this would possibly work with sapply but then it seems that the binom.test function would have to be re-written to supply defaults for all other arguments. set.seed(101) sim.x = rbinom(100

Re: [R] LIST HELP

2008-10-09 Thread Jorge Ivan Velez
Dear Ramya, Try this: # Your list A=matrix(rnorm(100),ncol=10) B=matrix(rnorm(100),ncol=10) C=matrix(rnorm(100),ncol=10) colnames(A)=colnames(B)=colnames(C)=paste('X',1:10,sep="") mylist=list(A,B,C) names(mylist)=c('A','B','C') # Your name vector x=c('A','C') # Marching up! mylist[names(mylist)

Re: [R] LIST HELP

2008-10-09 Thread Henrique Dallazuanna
Try this: A1 <- list(abc = letters[1:3], dce = letters[4:6], kpo = letters[7:8]) v <- c("abc", "dce") A1[setdiff(names(A1), v)] On Thu, Oct 9, 2008 at 4:01 PM, Rajasekaramya <[EMAIL PROTECTED]> wrote: > > Hi, > > I have a list(A1) of dataframe and a vector containing a 22 list names. > list(A1) >

Re: [R] LIST HELP

2008-10-09 Thread stephen sefick
could you make this reporducible- even with dummy data...? I am not sure what you want. On Thu, Oct 9, 2008 at 3:01 PM, Rajasekaramya <[EMAIL PROTECTED]>wrote: > > Hi, > > I have a list(A1) of dataframe and a vector containing a 22 list names. > list(A1) > abc > l m n > p q r > > dce > e g h

Re: [R] R book needed

2008-10-09 Thread Christos Hatzis
You might find Robert Gentleman's recent book useful for exposure on many of the more advanced features of R. http://www.bioconductor.org/pub/RBioinf/ -Christos > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Hua Li > Sent: Thursday, October 09,

[R] nls, lattice, and conversion over to ggplot

2008-10-09 Thread stephen sefick
I am trying to figure out how to use ggplot2. I would like to do the below with ggplot, but I can not figure out how. The data provided is a subset of a much larger data set, but these data are the data necessary to make the plot. I think I would rather have the colors become symbols, and I do k

[R] R book needed

2008-10-09 Thread Hua Li
Hi there, I'm looking for advice on a R book that's for somewhat advanced user. I've been using R for a while and can do the basic analysis with no problem. My problem is that for many already existing commands, such as gsub, textconnection, list, etc, I don't use them, simply because I don't

[R] Help MLE

2008-10-09 Thread LFRC
Dear, I'm starting on R language. I would like some help to implement a MLE function. I wish to obtain the variables values (alpha12, w_g12, w_u12) that maximize the function LL = Y*ln(alpha12 + g*w_g12 + u*w_u12). Following the code: rm(list=ls()) ls() library(stats4) Model = functio

Re: [R] Two math expressions in plot

2008-10-09 Thread Gabor Grothendieck
Try bquote: plot(0, 0, main = bquote(n == .(k) * "," ~ N[eff] == .(n.eff[k]))) On Thu, Oct 9, 2008 at 12:22 PM, Giovanni Petris <[EMAIL PROTECTED]> wrote: > > Hello! > > I am trying to put two math expressions in the title of a plot. As > you can see below, I can place correctly one expression

[R] Plot grouped histograms

2008-10-09 Thread soeren . vogel
r11 -- r16 are variables showing a reason for usage of a product in 6 different situations. Each variable is a factor with 4 levels imported from a SPSS sav file with labels ranging from "not important" to "very important", and NA's for a sample of N = 276. (1) I need a chi square test of i

[R] LIST HELP

2008-10-09 Thread Rajasekaramya
Hi, I have a list(A1) of dataframe and a vector containing a 22 list names. list(A1) abc l m n p q r dce e g h l k m kpo a d c also i have a vector of list names. abc,dce similarly i have 22 elements. I wanna delete or want a list without the list elements whoes name match up the vector.

Re: [R] Two math expressions in plot

2008-10-09 Thread Mark Lyman
Giovanni Petris uark.edu> writes: > > > Hello! > > I am trying to put two math expressions in the title of a plot. As > you can see below, I can place correctly one expression at a time, but > not both. Ideally I would like to have them separated by a comma. Any > suggestions? > > > k <- 1

[R] number format in plots

2008-10-09 Thread Jarek Jasiewicz
Hi It is probably simple but how to force in plot command number format: 2, 3, 4 etc. instead of 2e+04, 3e+04 etc. example of command: plot(x=data$along, y=data$rzedna,type="l", xlim=c(0,max(data$along)), ylim=c(200,1200), main="", xlab="length", ylab="height", cex.main=2, cex.lab=

Re: [R] Dump decision trees of randomForest object

2008-10-09 Thread Liaw, Andy
See the getTree() function in the package. Also, the source package contains C code that does the prediction that you may be able to work from. Andy From: Christian Sturz > > Hi, > > I'm using the package randomForest to generate a classifier > for the exemplary > iris data set: > > data(ir

Re: [R] follow up on "[Rd] NAMESPACE & methods guidance, please" ( http://tolstoy.newcastle.edu.au/R/e4/devel/08/06/1901.html )

2008-10-09 Thread Martin Morgan
Hi Tao -- Tao Shi <[EMAIL PROTECTED]> writes: > This is a follow-up on the discussion originally posted on the > R-devel list ( > http://tolstoy.newcastle.edu.au/R/e4/devel/08/06/1901.html ), as I > have encountered the exact same issue mentioned in Martin's email. > Here is a simplified version

Re: [R] Creating GUIs for R

2008-10-09 Thread Greg Snow
I am not involved in the RExcel project. I have just had some discussions with the people that are, so you should contact them for specific questions. I believe that this currently only works on windows, there was some mention of possibly expanding it to OpenOffice so that it would be cross pla

Re: [R] runs of heads when flipping a coin

2008-10-09 Thread jgarcia
It seems to me that you are asking for: > hhh <- 0.1 > sum(dbinom(x=0:50,size=500,prob=hhh)) [1] 0.5375688 > You can use 'sample' and 'rle': > >> x <- sample(c("H","T"), 500, replace=TRUE, prob=c(.95, .05)) >> as.data.frame(unclass(rle(x))) >lengths values > 1 12 H > 21

[R] R/OCaml?

2008-10-09 Thread Alexy Khrabrov
Did anyone try to write R extensions in OCaml? What would it entail to enable it? Cheers, Alexy __ 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

Re: [R] stack or dissolve matrix without double entries

2008-10-09 Thread jim holtman
Is this what you want: > x <- matrix(1:16,4) > rownames(x) <- colnames(x) <- LETTERS[1:4] > x A B C D A 1 5 9 13 B 2 6 10 14 C 3 7 11 15 D 4 8 12 16 > require(reshape) > # create single list > z <- melt(x) > z X1 X2 value 1 A A 1 2 B A 2 3 C A 3 4 D A 4 5 A B

[R] Dump decision trees of randomForest object

2008-10-09 Thread Christian Sturz
Hi, I'm using the package randomForest to generate a classifier for the exemplary iris data set: data(iris) iris.rf<-randomForest(Species~.,iris) Is it possible to print all decision trees in the generated forest? If so, can the trees be also written to disk? What I actually need is to translat

Re: [R] runs of heads when flipping a coin

2008-10-09 Thread jim holtman
You can use 'sample' and 'rle': > x <- sample(c("H","T"), 500, replace=TRUE, prob=c(.95, .05)) > as.data.frame(unclass(rle(x))) lengths values 1 12 H 21 T 3 10 H 41 T 55 H 62 T 7 26 H 81 T 9

Re: [R] Basic aggregate help

2008-10-09 Thread jim holtman
Is this what you want: > x <- data.frame(Name=c("A","A","C"), Category=c("a","a","b"), > Quantity=c(1,2,3)) > aggregate(x$Quantity, list(x$Name, x$Category), FUN=sum) Group.1 Group.2 x 1 A a 3 2 C b 3 > 'by' is "a list of grouping elements, each as long as the variables

[R] runs of heads when flipping a coin

2008-10-09 Thread Harvey
Can someone recommend a method to answer the following type of question: Suppose I have a coin with a probability hhh of coming up heads (and 1-hhh of coming up tails) I plan on flipping the coin nnn times (for example, nnn = 500) What is the expected probability or frequency of a run of rrr heads

[R] Basic aggregate help

2008-10-09 Thread rkevinburton
>From what I read this should work. So please help my misunderstanding: > x <- data.frame(Name=c("A","A","C"), Category=c("a","a","b"), > Quantity=c(1,2,3)) > x Name Category Quantity 1Aa1 2Aa2 3Cb3 > aggregate(x, by=as.list(setdiff(n

Re: [R] Running R under Sun Grid Engine with OpenMPI tight integration

2008-10-09 Thread Markus Schmidberger
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, actually there is no perfect way to use R one multiprocessors. There are two options: * using mpi: This means starting several R sessions and using MPI for the communication between the R sessions. Task distribution, fail over solutions, ... have

Re: [R] vectorization instead of using loop

2008-10-09 Thread Richard . Cotton
Frank said: > > This piece of code works, but it is very slow. We were wondering if it's > at > > all possible to somehow vectorize this function. Any help would be > greatly > > appreciated. Richie said: > You can save a substantial time by calling as.matrix before the loop Patrick said: > On

Re: [R] ParallelR

2008-10-09 Thread Markus Schmidberger
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, mpi is probably the mostly used standard for parallel computing. It was especially developed for message passing. Therefore most packages are based on MPI. Using "snow" you can choose between socket, mpi, pvm and (in the newest version) nws. I thi

[R] Two math expressions in plot

2008-10-09 Thread Giovanni Petris
Hello! I am trying to put two math expressions in the title of a plot. As you can see below, I can place correctly one expression at a time, but not both. Ideally I would like to have them separated by a comma. Any suggestions? > k <- 1 > n.eff <- c(20, 30) > ### this works > plot(0,0, main =

Re: [R] vectorization instead of using loop

2008-10-09 Thread Richard . Cotton
> I've sent this question 2 days ago and got response from Sarah. Thanks for > that. But unfortunately, it did not really solve our problem. The main issue > is that we want to use our own (manipulated) covariance matrix in the > calculation of the mahalanobis distance. Does anyone know how to v

Re: [R] Creating GUIs for R

2008-10-09 Thread eugene dalt
Check out R-PLUS 3.3 from XLSolutions Corp. They have a GUI that you can easily expand. www.Experience-Rplus.com --- On Thu, 10/9/08, [Ricardo Rodriguez] Your XEN ICT Team <[EMAIL PROTECTED]> wrote: > From: [Ricardo Rodriguez] Your XEN ICT Team <[EMAIL PROTECTED]> > Subject: Re: [R] Creat

Re: [R] Creating GUIs for R

2008-10-09 Thread eugene dalt
Check out R-PLUS 3.3 from XLSolutions Corp. They have a GUI that you can easily expand. www.Experience-Rplus.com --- On Thu, 10/9/08, [Ricardo Rodriguez] Your XEN ICT Team <[EMAIL PROTECTED]> wrote: > From: [Ricardo Rodriguez] Your XEN ICT Team <[EMAIL PROTECTED]> > Subject: Re: [R] Creat

Re: [R] vectorization instead of using loop

2008-10-09 Thread Patrick Burns
One thing that would speed it up is if you inverted 'covmat' once and then used 'inverted=TRUE' in the call to 'mahalanobis'. Patrick Burns [EMAIL PROTECTED] +44 (0)20 8525 0696 http://www.burns-stat.com (home of S Poetry and "A Guide for the Unwilling S User") Frank Hedler wrote: Dear all, I'v

[R] Altering the cube around a wireframe plot.

2008-10-09 Thread Todd Remund
I'm trying to create a 3D plot using wireframe with certain parts removed. I would like to get rid of the part of the outer cube that crosses over the plot leaving the back two walls and the axes. It would also be useful to put lines in the plot separate from the wireframe call. I've looked t

[R] Spatstat - Several density plots using the same scale

2008-10-09 Thread Arthur Weiss
Hi everyone, I am using the package "spatstat" for ploting kernel maps of my data. It is a marked point pattern, the result of mosquito surveillance in a area in a week. For each trap, the number of individuals captured is the mark of the point. > plot(density(X, weights=X$marks)) makes a nice k

Re: [R] NA's in multiple choice summary table in Hmisc

2008-10-09 Thread Erich Studerus
Thank you so much. I have yet another problem that I could not resolve from the documentation. I want to get line breaks for long variable names. Here's an example: Gender<-sample(c("m","f"),20,replace=TRUE) Education<-rnorm(20,13) label(Education)<-"Years of\nEducation" summary(Gender~Education,

Re: [R] Strange horns on notched box plots

2008-10-09 Thread Frostygoat
Ben Bolker > >There's not much you can do about this. But at least I understand it now. Thank you. __ 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/postin

[R] stack or dissolve matrix without double entries

2008-10-09 Thread Marten Winter
Heja, I've some bigger distance-matrices like this: num [1:3231, 1:3231] 0.000 0.176 0.176 0.176 0.176 ... - attr(*, "dimnames")=List of 2 ..$ : chr [1:3231] "A" "B" "C" "D" ... ..$ : chr [1:3231] A" "B" "C" "D" . I actually want to convert them into a 2 column dataframe like this: data.f

[R] Please help: Latent class analysis with poLCA

2008-10-09 Thread Janina_84
Dear R-experts, I am currently writing my theses about what - else but price - drives low cost carriers` buying behavior. To evaluate the collected choice-based conjoint data, I have to perform a latent class analysis. I have found the package poLCA, but somehow I don`t get the output I need...

Re: [R] Error when reading a SAS transport file

2008-10-09 Thread Peter Dalgaard
Jean-Louis Abitbol wrote: > Dear All, > > I get the following error when using either SASxport or Hmisc to read an > .xpt file: > > >> w <- read.xport("D:/consult/Trophos/dnp/base/TRO_ds_20081006.xpt") >> > Erreur dans factor(x, f$value, f$label) : > invalid labels; length 15 should be 1

[R] GWR Predictions' standard deviation

2008-10-09 Thread Eduardo Marinho
Dear all, I would like to use a GWR model in order to spatially predict food insecurity in Africa. I have a georeferenced village data-bases and I've run a "classic" regression model (taking into account the spatial dependence of the errors) that works fairly well for Niger that is a quite homoge

[R] vectorization instead of using loop

2008-10-09 Thread Frank Hedler
Dear all, I've sent this question 2 days ago and got response from Sarah. Thanks for that. But unfortunately, it did not really solve our problem. The main issue is that we want to use our own (manipulated) covariance matrix in the calculation of the mahalanobis distance. Does anyone know how to ve

[R] Error when reading a SAS transport file

2008-10-09 Thread Jean-Louis Abitbol
Dear All, I get the following error when using either SASxport or Hmisc to read an .xpt file: > w <- read.xport("D:/consult/Trophos/dnp/base/TRO_ds_20081006.xpt") Erreur dans factor(x, f$value, f$label) : invalid labels; length 15 should be 1 or 14 > z<- sasxport.get("D:/consult/Trophos/dnp/ba

Re: [R] Running R under Sun Grid Engine with OpenMPI tight integration

2008-10-09 Thread Chi Chan
On Thu, Oct 9, 2008 at 9:02 AM, Dirk Eddelbuettel <[EMAIL PROTECTED]> wrote: > You could have a look at the slides from my UseR! 2008 tutorial [1] on > 'high-performance computing with R' which covered Open MPI / Rmpi and > includes examples. > > It may just be that you are expecting something that

Re: [R] Creating a matrix

2008-10-09 Thread John Kane
?aggregate ( as Jim Holtman pointed out) is the standard way. Another way is to use the reshape package and try something like library(reshape) names(x)[3] <- "value" cast(x, Seller + Art. ~., mean) (Note the names(x)[3] <- "value" seems necessary at the moment as reshape only seems to wo

Re: [R] Running R under Sun Grid Engine with OpenMPI tight integration

2008-10-09 Thread Dirk Eddelbuettel
On 9 October 2008 at 09:18, Sean Davis wrote: | We have spent some time setting up Sun Grid Engine and OpenMPI on a | group of linux boxes. I have created a parallel environment and | everything seems to be working. I have Rmpi 0.5.5-5 installed on all | machines. I would like to start an inter

Re: [R] ParallelR

2008-10-09 Thread Hesen Peng
But when I use the function makeSOCKmpi I am required to input my password to local computer, right? I haven't figured out how to do that when using a Sun Grid Engine. Do you have any suggestions? Thanks a lot. 2008/10/9 Martin Morgan <[EMAIL PROTECTED]>: > snow can use native sockets, i.e., no ad

Re: [R] Exporting symnum() result from cor()

2008-10-09 Thread John Kane
Perhaps save the file as a csv (?write.table) and present the results in a spreadsheet or word processor table? --- On Thu, 10/9/08, Michael Just <[EMAIL PROTECTED]> wrote: > From: Michael Just <[EMAIL PROTECTED]> > Subject: [R] Exporting symnum() result from cor() > To: "r-help" > Received: T

Re: [R] Interpretation in cor()

2008-10-09 Thread John Kane
Please provide a small working example. It is difficult to see what you are doing from the description below. --- On Thu, 10/9/08, Michael Just <[EMAIL PROTECTED]> wrote: > From: Michael Just <[EMAIL PROTECTED]> > Subject: [R] Interpretation in cor() > To: "r-help" > Received: Thursday, Octob

[R] Running R under Sun Grid Engine with OpenMPI tight integration

2008-10-09 Thread Sean Davis
We have spent some time setting up Sun Grid Engine and OpenMPI on a group of linux boxes. I have created a parallel environment and everything seems to be working. I have Rmpi 0.5.5-5 installed on all machines. I would like to start an interactive R session using, say, 8 processors and then star

Re: [R] plot-parameter pch without influence when plotting a data-frame

2008-10-09 Thread John Kane
--- On Thu, 10/9/08, Oliver Bandel <[EMAIL PROTECTED]> wrote: > From: Oliver Bandel <[EMAIL PROTECTED]> > Subject: Re: [R] plot-parameter pch without influence when plotting a > data-frame > To: "Gerhard Schön, UKE Hamburg" <[EMAIL PROTECTED]> > Cc: "R-help" > Received: Thursday, October 9, 2008

[R] Odp: Observed responses in 'augPred' data frame - Wrong order ?

2008-10-09 Thread Petr PIKAL
Hi I had similar problem before and I ended with some ordering of groups before making grouped data object but it was data specific so I can not give you definite clue. Regards Petr [EMAIL PROTECTED] napsal dne 08.10.2008 19:30:07: > Dea-R community. > > I'd like to draw your attention to a

  1   2   >