Re: [R] ask for help about netcdf

2010-08-17 Thread Prof Brian Ripley
Please learn that capitalization is important both in R (sic) and in effective communication. There are CRAN packages RNetCDF, ncdf and ncdf4 on CRAN to read/write NetCDF (sic) format files from R. On Wed, 18 Aug 2010, mat chueng wrote: hi,r project I am a new user who has some questions ab

[R] Digest, Vol90, Issue18 does not display properly

2010-08-17 Thread Jianyun Wu
Dear R team, I received Digest, Vol90, Issue18 today. However there are bunchs of threads not displaying properly. Could you please check it out?? Thanks and Regards Fred *After Message 15, :* Date/Time: 2010-08-16 14:14:57 +0300 OS Version: 10.6.4 (Build 10F569) Architecture:i

Re: [R] ROCR predictions

2010-08-17 Thread Claudia Beleites
Dear Assa, you need to call prediction with continuous predictions and a _binary_ true class label. You are the only one who can tell whether the p-values are actually predictions and what the class labels are. For the list readers p is just the name of whatever variable, and you didn't eve

Re: [R] Plot in cartesian plane

2010-08-17 Thread Pablo Cerdeira
Thanks! That was exactly what I was looking for. best regards *pablo de camargo cerdeira* pablo.cerde...@gmail.com | pa...@fgv.br Phone: +55-(21)-3799-6065 [image: Facebook] [image: LinkedIn][image: Google]

Re: [R] Combining values from a data.frame row with matrix rownames.

2010-08-17 Thread Joshua Wiley
Hi, I believe you are looking for ?unlist. Here is something that does what I think you want with data that is my best guess at what yours is like (if the data in seed_panel is stored as factor, you will probably need to convert it first somehow). > seed_panel <- data.frame(V2 = "507D22", V3 = "

Re: [R] Matrix

2010-08-17 Thread Jorge Ivan Velez
Try this: x[, -1] HTH, Jorge On Tue, Aug 17, 2010 at 7:05 PM, Rookie wrote: > How do I completely remove the first column? > > (x <- matrix(c(1, 44, 124, 80, 254, 70, 190, 0, 2, 35, 110, 70, 240, 73, > 216, 0, 3, 41, 114, 80, 279, 68, 178, 0, 4, 31, 100, 80, 284, 68, 149, 0, 5, > 61, 190, 110

Re: [R] column names only

2010-08-17 Thread Joshua Wiley
Hi, Here are two options. Depending whether the data is already read in or being created, one or the other may be more useful to you ### x1 <- matrix(1:4, ncol = 2) colnames(x1) <- c("First", "Second") #OR x2 <- matrix(1:4, ncol = 2, dimnames = list(NULL, c("First", "Second"))) x1 x2 ###

Re: [R] Matrix Dimnames

2010-08-17 Thread Joshua Wiley
Hi Rookie, Sure, just use the dimnames argument. You pass it a list where the first element contains the row names and the second element contains the column names. Supposing you only want to name one dimension, just use NULL for the other (see ?matrix for full details). Using your data: x <-

Re: [R] Matrix

2010-08-17 Thread Joshua Wiley
Hi Rookie, Just as a note, it is generally nicer if you just provide the list with some sample data that illustrates your problem. This should answer your question: # mymatrix <- matrix(1:9, ncol = 3) mymatrix mymatrix <- mymatrix[, -1] #remove column 1 mymatrix # See ?'[' for d

Re: [R] Rows index/colProds

2010-08-17 Thread pablo.andrade
Hi Henrik, My sessionInfo() is: R version 2.10.1 (2009-12-14) i386-pc-mingw32 locale: [1] LC_COLLATE=English_United States.1252 [2] LC_CTYPE=English_United States.1252 [3] LC_MONETARY=English_United States.1252 [4] LC_NUMERIC=C [5] LC_TIME=English_United States.1

[R] How to Perform CCA in ??!! Help please

2010-08-17 Thread stompper33
Performing CCA in R I know they say don't say please... or plead...but I'm sorry but I really need some help with this problem. I have tried to perform CCA in R and I can never do this successfully. Can someone please tell me what I'm doing wrong. I can't attach any file...so Please email me and

[R] p-value from fisher.test odds ratio 'estimate' (without 2x2 table)

2010-08-17 Thread dschruth
Hello, I'm trying to generate a p.value directly from the output of a fisher exact test odds ratio statistic without resorting to performing another test on the 2x2 table itself. The motivation for this stems from a need to modify the test statistic before calculating it's new p- value. I've lo

Re: [R] column names only

2010-08-17 Thread Jorge Ivan Velez
Take a look at ?colnames HTH, Jorge On Tue, Aug 17, 2010 at 9:08 PM, R Newbie wrote: > Does anyone know how to assign (column names only) to a matrix? > > __ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE

Re: [R] Plot in cartesian plane

2010-08-17 Thread Charles C. Berry
On Wed, 18 Aug 2010, Pablo Cerdeira wrote: Hi all, I'm trying to plot this two curves in a single cartesian plane, but when I plot the first one, the plot appears with no negative "y" value. When I plot the second curve, it almost does not apear in the graph. I was trying the plot.window but w

[R] Might be useful

2010-08-17 Thread Rookie
I came across this site and thought to pass it along http://www.rseek.org/ __ 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 commente

Re: [R] Sweave

2010-08-17 Thread Karen Kotschy
Dear Randall I do it like this: \begin{center} \setkeys{Gin}{width=0.7\textwidth} \begin{Scode}{fig=T, echo=F} ... \end{Scode} \end{center} Hope this helps. Karen On Wed 18Aug10, Randall Wrong wrote: > Dear R users, > > I am using Sweave. > > I would like to use the width opti

[R] Matrix

2010-08-17 Thread Rookie
How do I completely remove the first column? (x <- matrix(c(1, 44, 124, 80, 254, 70, 190, 0, 2, 35, 110, 70, 240, 73, 216, 0, 3, 41, 114, 80, 279, 68, 178, 0, 4, 31, 100, 80, 284, 68, 149, 0, 5, 61, 190, 110, 315, 68, 182, 1, 6, 61, 130, 88, 250, 70, 185, 0, 7, 44, 130, 94, 298, 68, 161, 0, 8,

[R] column names only

2010-08-17 Thread R Newbie
Does anyone know how to assign (column names only) to a matrix? __ 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,

[R] ask for help about netcdf

2010-08-17 Thread mat chueng
hi,r project I am a new user who has some questions about r tool,I have some original data file in netcdf format which is a famous geometry data file format, The file contains very large weather information from every zone of the world,I want to extract only a part of them to calcuate, like the

[R] svyquantile w/ svyby is returning an error

2010-08-17 Thread Marc Zodet
svymean w/ svyby is working for me... > svyby(~visitcnt, ~agegrp3.f, svymean, design=svydes) agegrp3.f visitcnt se.visitcnt 18-44 18-44 8.72 0.4953235 45-64 45-64 10.131555 0.5347806 65+ 65+ 9.588802 0.4323629 svyquantile is working for me... > svyquantile(~vis

[R] Matrix Dimnames

2010-08-17 Thread Rookie
Is there a way that I can specify the column names in the matrix function? Currently, below is the way I am doing it. x <- matrix(c(15, 7, 20, 12, 25, 14, 30, 19, 35, 7, 15, 7, 20, 17, 25, 19, 30, 25, 35, 10, 15, 15, 20, 12, 25, 19, 30, 22, 35, 11, 15, 11, 20, 18, 25, 18, 30, 19, 35, 15, 15, 9,

Re: [R] replacing values in a vector

2010-08-17 Thread Karen Kotschy
Thanks so much to all those who suggested solutions! You guys are wonderful! I went with Dimitris' suggestion in the end. Regards Karen On Tue 17Aug10, Dimitris Rizopoulos wrote: > try this: > > vec <- c(3,2,6,4,7) > > n <- length(vec) > for(i in seq_along(vec)){ > r <- numeric(n) > r

Re: [R] About scan

2010-08-17 Thread Joshua Wiley
On Tue, Aug 17, 2010 at 9:20 PM, Stephen Liu wrote: > - Original Message > > From: Joshua Wiley > To: Stephen Liu > Cc: r-help@r-project.org > Sent: Wed, August 18, 2010 12:10:51 PM > Subject: Re: [R] About scan > > Hi Josh, > > Thanks for your advice. > > - snip - > >>> x <- scan() >>1

Re: [R] About scan

2010-08-17 Thread Stephen Liu
- Original Message From: Joshua Wiley To: Stephen Liu Cc: r-help@r-project.org Sent: Wed, August 18, 2010 12:10:51 PM Subject: Re: [R] About scan Hi Josh, Thanks for your advice. - snip - >> x <- scan() >1: 1 2 3 4 5 >6: I tried it before. It'll continue asking for input unless pr

[R] rJava: System.exit(1) in Java causes R crash

2010-08-17 Thread Sigal Blay
I'm writing a package that successfully calls Java from R using rJava. When R sends my Java function bad data (through .jcall()), I get the error message details (when I run it on a console) and then: Java requested System.exit(1), closing R. Is there a way to call .jcall so that when Java recei

Re: [R] About scan

2010-08-17 Thread Joshua Wiley
Hi Stephen, Maybe it is just me, but I am not clear what your question is. scan() is a function with a variety of arguments. When these are not explicitly named, they go in order. So, scan(1, 2, 3, 4, 5) is equivalent to scan(file = 1, what = 2, nmax = 3, n = 4, sep = 5), which is clearly nonse

[R] Plot in cartesian plane

2010-08-17 Thread Pablo Cerdeira
Hi all, I'm trying to plot this two curves in a single cartesian plane, but when I plot the first one, the plot appears with no negative "y" value. When I plot the second curve, it almost does not apear in the graph. I was trying the plot.window but with no success. Can someone help me with this

[R] About scan

2010-08-17 Thread Stephen Liu
Hi folks, I followed an online example to input data; > x = scan(1,2,3,4,5) Error in scan(1, 2, 3, 4, 5) : either specify 'nmax' or 'n', but not both. It can't work. > x = c(1,2,3,4,5) > x [1] 1 2 3 4 5 It works. Whether "scan" is replaced with "c" ? > ?c . Usage: c(..., recur

Re: [R] Missing values

2010-08-17 Thread Stephen Liu
- Original Message From: Robert Baer To: Stephen Liu ; r-help@r-project.org Sent: Wed, August 18, 2010 2:43:27 AM Subject: Re: [R] Missing values Hi Robert, - snip - >> z <- c(1:3,NA); ind <- is.na(z) ># To see the logical vector the same size as the original print them out ># z h

Re: [R] what does it mean when my main effect 'disappears' when using lme4?

2010-08-17 Thread Mitchell Maltenfort
One difference is that the random effect in lmer is assumed -- implicitly constrained, as I understand it -- to be a bell curve. The fixed effect model does not have that constraint. How are the values of "labs" effects distributed in your lm model? On Tue, Aug 17, 2010 at 8:50 PM, Johan Jackson

[R] what does it mean when my main effect 'disappears' when using lme4?

2010-08-17 Thread Johan Jackson
Hello, Setup: I have data with ~10K observations. Observations come from 16 different laboratories (labs). I am interested in how a continuous factor, X, affects my dependent variable, Y, but there are big differences in the variance and mean across labs. I run this model, which controls for mean

Re: [R] plotting functions of chi square

2010-08-17 Thread maiya
OK, for the record, this is not my homework, thanks for asking! Also, I am sure I could have phrased my question more eloquently, but (hence the newbie qualifier) I didn't. The code I posted was for the plot I want, only smoothed i.e not based on random sampling from the distribution. Dennis:

Re: [R] Sweave

2010-08-17 Thread Abhijit Dasgupta
Please read the Sweave documentation. The default is set to 0.8\textwidth. You have to change a \SweaveOpt. On Aug 17, 2010 7:00 PM, "Randall Wrong" wrote: Dear R users, I am using Sweave. I would like to use the width option for the graphics : \begin{figure}[h!] \centering \includegraphics[w

Re: [R] HMisc/rms package questions

2010-08-17 Thread Frank Harrell
Frank E Harrell Jr Professor and ChairmanSchool of Medicine Department of Biostatistics Vanderbilt University On Tue, 17 Aug 2010, Rob James wrote: 1) How does one capture the plots from the plsmo procedure? Simply inserting a routing call to a graphical devic

Re: [R] HMisc/rms package questions

2010-08-17 Thread David Winsemius
On Aug 17, 2010, at 5:53 PM, Rob James wrote: 1) How does one capture the plots from the plsmo procedure? Simply inserting a routing call to a graphical device (such as jpeg, png, etc) and then running the plsmo procedure (and then dev.off()) does not route the output to the file system. 1

[R] Sweave

2010-08-17 Thread Randall Wrong
Dear R users, I am using Sweave. I would like to use the width option for the graphics : \begin{figure}[h!] \centering \includegraphics[width=0.7\textwidth]{x} \end{figure} How do I get this ? Thank you very much, Randall [[alternative HTML version deleted]] _

Re: [R] replace loops with matrix

2010-08-17 Thread Nikhil Kaza
what is nt? is that a typo for ns? I don't see why you need to calculate lia within the loop. Also library(fBasics) ccl <-rowprod(lia) Nikhil Kaza Asst. Professor, City and Regional Planning University of North Carolina nikhil.l...@gmail.com On Aug 17, 2010, at 6:22 PM, Hey Sky wrote: He

[R] replace loops with matrix

2010-08-17 Thread Hey Sky
Hey, R users I am using numerical method for my research paper and the computation burden is very heavy. first I tried to do it with loops, example code as following, and it take hours to converge for only 200 obs. and my real data has 4000 obs. and the optimization command that I use is: o

Re: [R] plotting functions of chi square

2010-08-17 Thread David Winsemius
On Aug 17, 2010, at 5:28 PM, maiya wrote: Thanks, but that wasn't what I was going for. Like I said, I know how to do a simple chi-square density plot with dchisq(). What I'm trying to do is chi-square / degrees of freedom. Hence rchisq(10,i)/i). How do I do that with dchisq? Maybe

[R] HMisc/rms package questions

2010-08-17 Thread Rob James
1) How does one capture the plots from the plsmo procedure? Simply inserting a routing call to a graphical device (such as jpeg, png, etc) and then running the plsmo procedure (and then dev.off()) does not route the output to the file system. 1b) Related to above, has anyone thought of revising

Re: [R] AIC in MuMIn

2010-08-17 Thread elaine kuo
Thank you. Most of the answers solved the puzzles. Q2 > > I tried to display sub-model with only temp_ran using the code below but > > failed. > > Please kindly suggest the potential failure cause. > > > > code > > > > library(MuMIn) > > datam <-read.csv("c:/migration/Mig_ratio_20100817.csv",hea

Re: [R] plotting functions of chi square

2010-08-17 Thread Ben Bolker
maiya gmail.com> writes: > Thanks, but that wasn't what I was going for. Like I said, I know how to do a > simple chi-square density plot with dchisq(). > > What I'm trying to do is chi-square / degrees of freedom. Hence > rchisq(10,i)/i). > > How do I do that with dchisq? By explicitl

Re: [R] plotting functions of chi square

2010-08-17 Thread Rookie
x <- seq(from = 0, to = 10, by = .01) plot(x, dchisq(x = x, df = 1), main = "title", sub = "subtitle", type = "l", xlab = "x-title", ylab = "y-title", ylim = c(0, .4), col = "red") lines(x, dchisq(x = x, df = 2), type = "l", col = "green") lines(x, dchisq(x = x, df = 3), type = "l", col = "blue")

Re: [R] plotting functions of chi square

2010-08-17 Thread Dennis Murphy
Hi: On Tue, Aug 17, 2010 at 2:28 PM, maiya wrote: > > Thanks, but that wasn't what I was going for. Like I said, I know how to do > a > simple chi-square density plot with dchisq(). > > What I'm trying to do is chi-square / degrees of freedom. Hence > rchisq(10,i)/i). > > How do I do that wi

Re: [R] plotting functions of chi square

2010-08-17 Thread maiya
Thanks, but that wasn't what I was going for. Like I said, I know how to do a simple chi-square density plot with dchisq(). What I'm trying to do is chi-square / degrees of freedom. Hence rchisq(10,i)/i). How do I do that with dchisq? -- View this message in context: http://r.789695.n4.na

Re: [R] plotting functions of chi square

2010-08-17 Thread David Winsemius
On Aug 17, 2010, at 4:57 PM, maiya wrote: Hi! This is going to be a real newbie question, but I can't figure it out. I'm trying to plot densities of various functions of chi-square. A simple chi-square plot I can do with dchisq(). But e.g. chi.sq/degrees of freedom I only know how to

[R] plotting functions of chi square

2010-08-17 Thread maiya
Hi! This is going to be a real newbie question, but I can't figure it out. I'm trying to plot densities of various functions of chi-square. A simple chi-square plot I can do with dchisq(). But e.g. chi.sq/degrees of freedom I only know how to do using density(rchisq()/df). For example: plot(1,

Re: [R] how to paste a vector to expression?

2010-08-17 Thread Kay Cichini
..thank you! this generally works well - but after saving the result as jpeg i noticed that the printed "=" used with the expression looks different from the "=" signs used for the same graph for another simple text annotation (i.e. the linewidths used with the expression are much smaller). maybe

Re: [R] navel-gazing

2010-08-17 Thread Henrique Dallazuanna
I think that gsub example on help page is more clear: library(XML) # could be used the XML package to get the names cnames <- gsub('\n', '', head(tail(sapply(getNodeSet(htmlParse(z, asText = TRUE), "//i"), xmlValue), -3), -3)) gsub("(\\w)(\\w*)", "\\U\\1\\L\\2", cnames, perl=TRUE) On Tue, Aug

Re: [R] TM Package - Corpus function - Memory Allocation Problems

2010-08-17 Thread David Winsemius
On Aug 17, 2010, at 3:45 PM, Guelman, Leo wrote: I'm using R 2.11.1 on Win XP (32-bit) with 3 GB of RAM. My data has (only) 16.0 MB. Probably more than that. Each numeric is 8 bytes even before overhead, so a csv file that was all single digit integers and commas would more that double i

Re: [R] TM Package - Corpus function - Memory Allocation Problems

2010-08-17 Thread Guelman, Leo
I'm using R 2.11.1 on Win XP (32-bit) with 3 GB of RAM. My data has (only) 16.0 MB. I want to create a VCorpus object using the Corpus function in the tm package but I'm running into Memory allocation issues: "Error: cannot allocate vector of size 372 Kb". My data is stored in a csv file which

[R] Combining values from a data.frame row with matrix rownames.

2010-08-17 Thread Gil Gamesh
Apologies, I neglected to check that the email was plain text. Here is a the text of the previous email. Hello, I am trying to iteratively build a build a panel of variables to discriminate between two groups. My starting position is a matrix of experimental data and I have a function that will

Re: [R] navel-gazing

2010-08-17 Thread Brian Diggs
Since Peter Dalgaard is splitting his considerable contributions between "Peter Dalgaard" and "peter dalgaard", I made the following changes (which shouldn't be a problem unless e e cummings becomes a regular poster): # from base::chartr documentation capwords <- function(s, strict = FALSE) {

Re: [R] grid.table and expression in table body?

2010-08-17 Thread baptiste auguie
On 17 August 2010 18:38, Johannes Graumann wrote: > Hi - I can't get this figured out ... > > Thanks for any hint. The parse=TRUE argument means that all the table content will be parsed and interpreted as expression. In your content you have invalid expressions (e.g. text with spaces), which cau

Re: [R] compare gam fits

2010-08-17 Thread Gavin Simpson
On Thu, 2010-08-05 at 13:49 -0300, Mike Lawrence wrote: > Hi folks, I've been pondering this for a little while, drumming up courage to reply, whilst I've been away on fieldwork with patchy email access... so here goes with the neck sticking out thing... ;-) > I originally tried R-SIG-Mixed-Model

[R] Tables in Packages

2010-08-17 Thread Daniel Murphy
I have a 100x2 matrix to go into a package. I could type it into the R code but, more generally, what is the *best* way to read a table from disk into, say, package 'foo' when it is loaded into memory via library(foo)? I thought of having .onLoad create an environment and assign a matrix read from

Re: [R] Missing values

2010-08-17 Thread Robert Baer
- Original Message - From: "Stephen Liu" To: Sent: Tuesday, August 17, 2010 8:25 AM Subject: Re: [R] Missing values - Original Message From: Michael Bedward To: Stephen Liu Cc: r-help@r-project.org Sent: Tue, August 17, 2010 3:57:05 PM Subject: Re: [R] Missing values

Re: [R] using color palette in persp

2010-08-17 Thread szisziszilvi
yes, I had, and failed somehow, because I couldn't work out some points. I don't have my work with me at the moment, but will give a detailed description about my porblems. I don't remember for sure what I tried and what not, but I failed at this line: zfacet <- z[-1, -1] + z[-1, -ncz] + z[-nrz,

[R] Problems building own package (Error: "package has been build before R-2.10.0")

2010-08-17 Thread Janko Thyson
Dear List, I’m doing my first baby steps towards developing own R Packages and ran into the following problem: R CMD check mypackage works fine (no errors, no warnings) R CMD build mypackage works fine (no errors, no warnings) R CMD INSTALL –library=”C:\R\R-2.11.1\library” “something\mypa

Re: [R] how to paste a vector to expression?

2010-08-17 Thread David Winsemius
On Aug 17, 2010, at 11:51 AM, Kay Cichini wrote: hello, i need to annotate a plot with an expression and a variable value - like: plot(1:4) dat<-1:2 text(2:3,2:3,expression(paste(bar(x)==dat))) ... but with the dat values plotted, 1 at x=2,y=2, and 2 at x=3,y=3. One way ... actually t

Re: [R] Weird differing results when using the Wilcoxon-test

2010-08-17 Thread Cedric Laczny
Thanks for the hint. I tested this generic example and had the same behavior also in a special example, that can be found below. This example does not involve continuity correction but exibits the same "unexpected" behavior: GDS_example = function() { print("---> GDS EXAMPLE <---", quote

Re: [R] how to selection model by BIC

2010-08-17 Thread Gavin Simpson
On Tue, 2010-08-17 at 17:12 +0100, Xin__ Li wrote: > Hi All: > the package "MuMIn" can be used to select the model based on AIC or AICc. > The code is as follows: > > data(Cement) > lm1 <- lm(y ~ ., data = Cement) > > dd <- dredge(lm1,rank="AIC") > print(dd) > > If I want to select the model by

Re: [R] "2 not defined because of singularities" appearing after introducing Fixed Effects

2010-08-17 Thread asdir
Sorry, please nevermind. It seems to have been an econometrical problem after all. (A variable consisting of 2 or more of the 150 Country-Dummies for the fixed effects causes perfect multicollinearity as well. So does a variable that differs over cross-sections but not over periods, seemingly. I

Re: [R] R Send an Email

2010-08-17 Thread Jorge Ivan Velez
Hi Harold, I have not used it recently, but it seems promising: http://cran.r-project.org/web/packages/sendmailR/index.html HTH, Jorge On Tue, Aug 17, 2010 at 10:54 AM, Doran, Harold <> wrote: > Just out of curiosity, has anyone ever written a function that sends an > email to you when an R p

Re: [R] R Send an Email

2010-08-17 Thread Barry Rowlingson
On Tue, Aug 17, 2010 at 3:54 PM, Doran, Harold wrote: > Just out of curiosity, has anyone ever written a function that sends an email > to you when an R process has finished? For instance, I often work with very > large data sets and certain tasks (e.g., merging records, lmer runs) can take > a

Re: [R] R Send an Email

2010-08-17 Thread Henrique Dallazuanna
See sendmailR package. On Tue, Aug 17, 2010 at 11:54 AM, Doran, Harold wrote: > Just out of curiosity, has anyone ever written a function that sends an > email to you when an R process has finished? For instance, I often work with > very large data sets and certain tasks (e.g., merging records,

Re: [R] navel-gazing

2010-08-17 Thread Henrique Dallazuanna
Ben, I change the line: z <- getURL(paste(baseurl,list,"/", month,"/author.html",sep="")) to z <- getURL(paste(baseurl,list,"/", month,"/author.html",sep=""), ssl.verifypeer = FALSE) because don't work for me. Nice! On Tue, Aug 17, 2010 at 1:47 PM, Ben Bolker wrote: > month <- "2010-August

[R] R Send an Email

2010-08-17 Thread Doran, Harold
Just out of curiosity, has anyone ever written a function that sends an email to you when an R process has finished? For instance, I often work with very large data sets and certain tasks (e.g., merging records, lmer runs) can take a long time and I find myself constantly looking over to see if

Re: [R] how to selection model by BIC

2010-08-17 Thread Ben Bolker
Xin__ Li mail.wbs.ac.uk> writes: > > Hi All: > the package "MuMIn" can be used to select the model based on AIC or AICc. > The code is as follows: > > data(Cement) > lm1 <- lm(y ~ ., data = Cement) > > dd <- dredge(lm1,rank="AIC") > print(dd) > > If I want to select the model by BIC, what cod

Re: [R] \ell symbol (log-likelihood)

2010-08-17 Thread David Winsemius
On Aug 17, 2010, at 8:41 AM, ivo welch wrote: Dear R experts---is it possible to plot the \ell symbol in R under the pdf device? the following did not work: pdf(file="ell.pdf"); plot( c(0,1), c(0,1) ); text( 0.5, 0.5, "\u2113" ) dev.off() my guess is that this cannot be done, but I thoug

[R] navel-gazing

2010-08-17 Thread Ben Bolker
month <- "2010-August" list <- "r-help" ##list <- "r-sig-ecology" ##list <- "r-sig-mixed-models" ## month <- "2010q3" n <- 50 baseurl <- "https://stat.ethz.ch/pipermail/"; library(RCurl) z <- getURL(paste(baseurl,list,"/",month,"/author.html",sep="")) zz <- strsplit(z,"")[[1]] namefun <- function(x

Re: [R] grid.table and expression in table body?

2010-08-17 Thread Johannes Graumann
Hi - I can't get this figured out ... Thanks for any hint. Joh > load("/tmp/AbsoluteTable.Rdata") > absolutetable > library(gridExtra) > grid.table(absoluteTable)#Works > grid.table(absoluteTable,parse=TRUE) Error in parse(text = d[ii]) : unexpected symbol in "Survey Scans" > sessionInfo() R ve

Re: [R] Wilcoxon test and grouping factor with multiple levels

2010-08-17 Thread Iurie Malai
Thank you, David Winsemius and Dennis Murphy! I want to compare pairs one by one. 2010/8/17 Iurie Malai : > Dear R users, > > I have a dataset with two variables: $esan - a grouping factor with 8 > levels and $reus. I'd like to do wilcox.test on this dataset as > sugested Weiwei here: > https://

[R] frailtypack

2010-08-17 Thread avsha38
Hello everyone, I have a question about using frailtypack to run recurrent events data. I have a file with 1,580 events. The file structure fits the andersen gill model. When I run the file with all records, the R stops and shuts down. Once I run only part of the file, about 400 events, R runs w

Re: [R] predict.lm, matrix in formula and newdata

2010-08-17 Thread William Dunlap
> -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Stephan Kolassa > Sent: Tuesday, August 17, 2010 5:25 AM > To: R-help@r-project.org > Subject: [R] predict.lm, matrix in formula and newdata > > Dear all, > > I am stumped at wh

Re: [R] ROCR predictions

2010-08-17 Thread Assa Yeroslaviz
Dear Claudia, thank you for your fast answer. I add again the table of the data as an example. Protein ID Pfam Domain p-value Expected Is Expected True Postive False Negative False Positive True Negative NP_11.2 APH 1.15E-05 APH TRUE 1 0 0 0 NP_11.2 MutS_V 0.0173 APH FALSE 0 0 1 0

[R] how to selection model by BIC

2010-08-17 Thread Xin__ Li
Hi All: the package "MuMIn" can be used to select the model based on AIC or AICc. The code is as follows: data(Cement) lm1 <- lm(y ~ ., data = Cement) dd <- dredge(lm1,rank="AIC") print(dd) If I want to select the model by BIC, what code do I need to use? And when to select the best model based

Re: [R] Missing values in function calls

2010-08-17 Thread David Winsemius
On Aug 17, 2010, at 8:22 AM, wrote: Hello, I would like to ask you how to determine if function value is missing for particular function call. I mean if I define function ?is.na f David Winsemius, MD West Hartford, CT __ R-help@r-projec

Re: [R] Odd crash with tcl/tk

2010-08-17 Thread Gabor Grothendieck
On Tue, Aug 17, 2010 at 11:49 AM, Lars Dalby wrote: > Hi Peter > > Spot on! You where absolutely right. After installing the tcltk bits > it worked just fine. > > Thank you very much! > > Lars > > On Aug 17, 4:36 pm, peter dalgaard wrote: >> Sorry to chime in late (for some reason, I was not at t

Re: [R] using color palette in persp

2010-08-17 Thread David Winsemius
On Aug 17, 2010, at 10:35 AM, szisziszilvi wrote: I am using persp to get a plot of a 32x48 matrix. data <- as.matrix(read.table(file="mySample.dat")) persp(data) And I'm having trouble with trying to give a z-dependent palette to it like rainbow (or any built in one would do). How to combi

Re: [R] Odd crash with tcl/tk

2010-08-17 Thread Gabor Grothendieck
That should not be necessary if you used options(gsubfn.engine = "R") since it should not be using tcltk in the first place. Perhaps you are using an old version of gsubfn -- the latest on CRAN is 0.5-3. On Tue, Aug 17, 2010 at 11:49 AM, Lars Dalby wrote: > Hi Peter > > Spot on! You where

Re: [R] Weird differing results when using the Wilcoxon-test

2010-08-17 Thread Thomas Lumley
After fixing the parentheses in your code so it does run, it seems that the difference is that wilcox.test defaults to using a continuity correction and your manual calculation does not. Use wilcox.test(big1, big2, correct=FALSE). -thomas On Tue, 17 Aug 2010, Cedric Laczny wrote: Hi,

[R] how to paste a vector to expression?

2010-08-17 Thread Kay Cichini
hello, i need to annotate a plot with an expression and a variable value - like: plot(1:4) dat<-1:2 text(2:3,2:3,expression(paste(bar(x)==dat))) ... but with the dat values plotted, 1 at x=2,y=2, and 2 at x=3,y=3. maybe someone can help? yours, kay - Kay Cichin

Re: [R] Odd crash with tcl/tk

2010-08-17 Thread Lars Dalby
Hi Peter Spot on! You where absolutely right. After installing the tcltk bits it worked just fine. Thank you very much! Lars On Aug 17, 4:36 pm, peter dalgaard wrote: > Sorry to chime in late (for some reason, I was not at the Mac when this came > in originally). > > I can't reproduce the sit

[R] Plotproblem, histogram, y-axis label?

2010-08-17 Thread JesperHybel
How can I control label on y-axis? Specifically how high relative to the y-axis it is plotted? At the moment I am using mtext appearing in the function quotet below. The function is applied to a dataframe and plots histograms for all numerical variables of the frame generating several histogram

Re: [R] question about bayesian model selection for quantile regression

2010-08-17 Thread Xin__ Li
Hi All: the package "MuMIn" can be used to select the model based on AIC or AICc. The code is as follows: data(Cement) lm1 <- lm(y ~ ., data = Cement) dd <- dredge(lm1,rank="AIC") print(dd) If I want to select the model by BIC, what code do I need to use? And when to select the best model based o

Re: [R] Delete rpart/mvpart cross-validation output

2010-08-17 Thread Gavin Simpson
On Fri, 2010-08-13 at 14:52 -0300, Marie-Hélène Ouellette wrote: > Dear all, I've been away for several weeks but I don't see an answer on the list so... > I was wondering if there is a simple way to avoid printing the multiple > cross-validation automatic output to the console of recursive parti

Re: [R] remove rows ??

2010-08-17 Thread skan
Now it works I was reading from a file DF <- read.table("prueba.txt") DF[!as.POSIXlt(DF$V1)[['min']] %% 10,] didn't do anything, then I tried zz[!as.POSIXlt(zz$V2)[['min']] %% 10,] that caused an error Error en as.POSIXlt.character(as.character(x)) : character string is not in a standard unamb

Re: [R] remove rows ??

2010-08-17 Thread Henrique Dallazuanna
Works for me: Lines <- "2005-01-03 09:05;0.00 2005-01-03 09:10;0.01 2005-01-03 09:15;0.02 2005-01-03 09:20;0.03 2005-01-03 09:25;0.04 2005-01-03 09:30;0.05 2005-01-03 09:35;0.06 2005-01-03 09:40;0.07 2005-01-03 09:45;0.08 2005-01-03 09:50;0.09 2005-01-03 09:55;0.10 2005-01-03 10:00;0.00 2005-01-03

Re: [R] remove rows ??

2010-08-17 Thread skan
I get this message "character string is not in a standard unambiguous format" and if I try to use a zoo object "Error en `$.zoo`(final, V2) : not possible for univariate zoo series" cheers -- View this message in context: http://r.789695.n4.nabble.com/remove-rows-tp2328312p2328487.html Sent fro

[R] [R-pkgs] Major update of Deducer, including GSOC funded work

2010-08-17 Thread ian fellows
A new version of Deducer (0.4) has been sent to CRAN, and should be propagating to all the mirrors in due course. Also, a new plug-in package (DeducerExtras) has also been released to CRAN, containing additional dialogs and functionality. I would like to take this opportunity to thank the

Re: [R] Automated plot and linear regression line/data

2010-08-17 Thread ashz
Hi, I presume the easy way is using plot and lm. Thx, As hz -- View this message in context: http://r.789695.n4.nabble.com/Automated-plot-and-linear-regression-line-data-tp2328027p2328372.html Sent from the R help mailing list archive at Nabble.com. ___

[R] \ell symbol (log-likelihood)

2010-08-17 Thread ivo welch
Dear R experts---is it possible to plot the \ell symbol in R under the pdf device?  the following did not work: pdf(file="ell.pdf"); plot( c(0,1), c(0,1) ); text( 0.5, 0.5, "\u2113" ) dev.off() my guess is that this cannot be done, but I thought I would ask. Ivo Welch (ivo.we...@brown.ed

[R] Missing values in function calls

2010-08-17 Thread vojta
Hello, I would like to ask you how to determine if function value is missing for particular function call. I mean if I define function f __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] Odd crash with tcl/tk

2010-08-17 Thread peter dalgaard
Sorry to chime in late (for some reason, I was not at the Mac when this came in originally). I can't reproduce the situation. One guess is that you haven't installed the tcltk bits, as indicated on the http://cran.at.r-project.org/bin/macosx/ page. -pd On Aug 17, 2010, at 4:12 PM, Lars Dalby

[R] using color palette in persp

2010-08-17 Thread szisziszilvi
Hello! I am using persp to get a plot of a 32x48 matrix. data <- as.matrix(read.table(file="mySample.dat")) persp(data) And I'm having trouble with trying to give a z-dependent palette to it like rainbow (or any built in one would do). How to combine that with the "col" argument? nice day Szilv

Re: [R] Odd crash with tcl/tk

2010-08-17 Thread Lars Dalby
Hi @ Andrew: Did you get this problem solved? I am having similar problems and have tried to work around it using options(gsubfn.engine = "R") as suggested by Gabor. However, this don't solve on my machine. R just freezes up trying to execute read.csv.sql() On OSX 10.6.4, R 2.11.1 (2010-05-31) 64

Re: [R] Specify decimal places for parameters in BUGS output

2010-08-17 Thread Uwe Ligges
On 16.08.2010 23:01, Anamika Chaudhuri wrote: Hi All: I had a basic question to ask. I am running R2WinBUGS so that I could automate the running of my model using 1000 simulated datasets. Below is the code I am using. The only problem I am having is the bugs output that comes out shows my para

Re: [R] dims error

2010-08-17 Thread Ivan Calandra
Yaacov, I cannot really help you, I don't even understand what you're trying to do! What's the link between your function and all the information you've just sent (by the way, you forgot to send it to the list)? By the way, attachments are not really advised, you'd better use dput() I've neve

Re: [R] AIC in MuMIn

2010-08-17 Thread Gavin Simpson
On Tue, 2010-08-17 at 16:05 +0800, elaine kuo wrote: > Hello, Why did you decide to post the exact same message from two different email addresses?? > I am using package MuMIn to calculate AIC for a full model with 10 > explanatory variables. > Thanks in advance in sharing your experience. > > Q

  1   2   >