Re: [R] Rmpi installation trouble

2012-10-09 Thread Prof Brian Ripley
Note: libmpi.dylib: cannot open shared object file: No such file or directory Linux does not have .dylib's: Darwin (part of Mac OS X) does. This is not an R question (it seems to be about your MPI installation) and you need to discuss it with the package maintainer (see the posting quide).

Re: [R] Legend Truncated Using filled.contour

2012-10-09 Thread Kirsten Simmons
This worked perfectly, thank you! (Sorry for the delay, was traveling and didn't get a chance to test it until now.) Kirsten On Oct 4, 2012, at 1:30 PM, David Winsemius wrote: > > On Oct 3, 2012, at 12:58 PM, Kirsten wrote: > >> Hey everyone, >> >> I'm working on a contour plot depicting a

[R] Finding the p value of the intercept in model 2 regression

2012-10-09 Thread dpond95
Hello, Please excuse my ignorance; my statistical background is fairly poor. I am looking to do a model II regression in R, and determine if the intercept is significantly greater then 0. I have downloaded the package "lmodel2", which gives me the 95% confidence interval of the intercept. Althou

Re: [R] RGL package surface plot

2012-10-09 Thread Jeff Newmiller
You should help us per the posting guide reproducible sample data, code you have tried that you thought would work, why you think it did not, output of sessionInfo function... Note that you can learn a lot by doing this exercise, your problem may not be where you think it is (or where we mi

Re: [R] RGL package surface plot

2012-10-09 Thread David Winsemius
On Oct 9, 2012, at 5:41 PM, ariklee wrote: > I'm completely new at R... I have sinkhole survey data (lat, long, and > elevation) and have been trying to plot a rotatable 3d plot for several > hours... cannot get it right. Examples I see tend to be grid data (one > elevation value per grid cell);

Re: [R] Qustion about Creating a sequence of vector

2012-10-09 Thread arun
HI,By customising sequence(), set.seed(1) dat1<-data.frame(id=rep(c(1,2,3),c(30,20,25)),value=rnorm(75,15)) #Either dat1$seq1<-unlist(sapply(table(dat1$id),FUN=function(x) 1:x),use.names=FALSE) #or dat1$seq1<-unlist(sapply(count(dat1$id)$freq,FUN=function(x) seq_len(x))) #can be used. A.K. --

[R] RGL package surface plot

2012-10-09 Thread ariklee
I'm completely new at R... I have sinkhole survey data (lat, long, and elevation) and have been trying to plot a rotatable 3d plot for several hours... cannot get it right. Examples I see tend to be grid data (one elevation value per grid cell); however, my data are more random (known elevations at

Re: [R] How to write out this regression equation in R?

2012-10-09 Thread Jeff Newmiller
But sprintf is itself vectorized. If you give it vectors, it returns vectors. So you could obtain that apply-result more efficiently by passing a bunch of column vectors of data. There happens to be a convenient object called a data frame that holds a bunch of similar-length vectors. DF <- data

Re: [R] RMySQL install on windows

2012-10-09 Thread Gabor Grothendieck
On Tue, Oct 9, 2012 at 5:08 PM, Robert Baer wrote: > I have been trying to install RMySQL on Windows 7 following the procedure > at: > http://biostat.mc.vanderbilt.edu/wiki/Main/RMySQL > > I think I have properly installed RTools and created a proper Renviron.site > file saying: > MYSQL_HOME="C:/P

Re: [R] Constant Error in R

2012-10-09 Thread David Winsemius
On Oct 9, 2012, at 2:30 PM, bobo wrote: > Hi good R folks, > > I am hoping that you could help me resolve this issue. I tried finding > answers online but to no avail. > > I keep getting this "Error in x^2 : non-numeric argument to binary operator" > using multiple different codes, ones which h

Re: [R] Error in if (is.na(n) || n > 65536L) stop("size cannot be NA nor exceed 65536") : missing value where TRUE/FALSE needed

2012-10-09 Thread Peter Langfelder
Hi Eliza, this is not __reproducible__ code - how am I supposed to know what's wrong when I don't have the input files you use? Please read the help for NbClust carefully and check that all your input variables have the correct dimensions. Some of the input seems strange, for example the z matrix

[R] Error in matrix (unlist(value, recursive = FALSE, use.names = FALSE), nrow = nr, : attempt to set an attribute on NULL

2012-10-09 Thread marsyxp
I am using Donlp2 package to solve a non-linear problem, but there's an error I always meet: Error in matrix(unlist(value, recursive = FALSE, use.names = FALSE), nrow = nr, : attempt to set an attribute on NULL I have been suffering from this bug for a long time. I'll be very grateful if som

[R] Constant Error in R

2012-10-09 Thread bobo
Hi good R folks, I am hoping that you could help me resolve this issue. I tried finding answers online but to no avail. I keep getting this "Error in x^2 : non-numeric argument to binary operator" using multiple different codes, ones which have been verified to work by my professor and other stud

Re: [R] Error in if (is.na(n) || n > 65536L) stop("size cannot be NA nor exceed 65536") : missing value where TRUE/FALSE needed

2012-10-09 Thread eliza botto
Thankyou very much peter, here is the code filelist = list.files(pattern = ".*.txt") datalist = lapply(filelist, function(x)read.table(x, header=T)) datafr = do.call("cbind", datalist) x<-datafr colnames(x) <- c("1": "38") m=matrix(x, nrow=365) mat1<-mlist1<-list() for(i in 1

Re: [R] Error in if (is.na(n) || n > 65536L) stop("size cannot be NA nor exceed 65536") : missing value where TRUE/FALSE needed

2012-10-09 Thread Peter Langfelder
On Tue, Oct 9, 2012 at 4:37 PM, eliza botto wrote: > > Dear useRs, > > i am using NbClust to determine appropriate number of cluster for > hclustering. i am consistently getting the following error > > Error in if (is.na(n) || n > 65536L) stop("size cannot be NA nor exceed > 65536") : > missin

[R] Error in if (is.na(n) || n > 65536L) stop("size cannot be NA nor exceed 65536") : missing value where TRUE/FALSE needed

2012-10-09 Thread eliza botto
Dear useRs, i am using NbClust to determine appropriate number of cluster for hclustering. i am consistently getting the following error Error in if (is.na(n) || n > 65536L) stop("size cannot be NA nor exceed 65536") : missing value where TRUE/FALSE needed Does any one know where i am wro

Re: [R] problem with convergence in mle2/optim function

2012-10-09 Thread Adam Zeilinger
Dear R help, Thanks again for the responses. I increased the lower constraint to: lower = list(p1 = 0.0001, p2 = 0.0001, mu1 = 0.0001, mu2 = 0.0001). I also included an upper box constraint of: upper = list(p1 = Inf, p2 = Inf, mu1 = p1t, mu2 = p2t). Making these changes improved the rate of

Re: [R] Qustion about Creating a sequence of vector

2012-10-09 Thread arun
Hi, You can also try this: set.seed(1) dat1<-data.frame(id=rep(c(1,2,3),c(30,20,25)),value=rnorm(75,15)) dat2<-data.frame(stack(lapply(split(dat1,dat1$id),FUN=function(x) 1:nrow(x))),value=dat1[,2]) colnames(dat2)[1:2]<-c("seq1","id")  dat2$seq1 # [1]  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 1

[R] RMySQL install on windows

2012-10-09 Thread Robert Baer
I have been trying to install RMySQL on Windows 7 following the procedure at: http://biostat.mc.vanderbilt.edu/wiki/Main/RMySQL I think I have properly installed RTools and created a proper Renviron.site file saying: MYSQL_HOME="C:/Program Files/MySQL/MySQL Server 5.5" When I try to install t

Re: [R] turn list into dataframe

2012-10-09 Thread Benjamin Caldwell
Thanks! *Ben Caldwell* On Tue, Oct 9, 2012 at 10:18 AM, R. Michael Weylandt < michael.weyla...@gmail.com> wrote: > > > On Tuesday, October 9, 2012, Benjamin Caldwell wrote: > >> Thanks Arun - the different lengths in the list elements was the sticking >> point. Does anyone have suggestions for

Re: [R] car::linearHypothesis Sum of Sqaures Error?

2012-10-09 Thread John Jay Wiley Jr.
John, Thank you. There are different means of the covariate among the levels in my contrasts, which is producing the non-orthogonality and non-additivity of the sum of squares. Should be all set. Cheers, John From: John Fox [j...@mcmaster.ca] Sent: Tu

Re: [R] synthetic distribution built upon set of discrete values

2012-10-09 Thread Bert Gunter
?? Perhaps: ?density ?plot.density -- Bert On Tue, Oct 9, 2012 at 1:06 PM, Thomas Carrié wrote: > Hello, > > I have a vector of double values between 0 and 100 > > I would like to draw a synthetic distribution of this vector to see > graphically how the values are distributed between 0 and 100.

[R] synthetic distribution built upon set of discrete values

2012-10-09 Thread Thomas Carrié
Hello, I have a vector of double values between 0 and 100 I would like to draw a synthetic distribution of this vector to see graphically how the values are distributed between 0 and 100. How can I do that ? Thomas __ R-help@r-project.org mailing li

Re: [R] Up key is not the previous command

2012-10-09 Thread Milan Bouchet-Valat
Le lundi 08 octobre 2012 à 20:33 -0700, Peter Langfelder a écrit : > run > > capabilities(what="cledit") > > in your R terminal session. If you get FALSE, your R was compiled > without command line editing support which you need for the "up arrow" > action. FWIW, it works with the R version packa

Re: [R] how to convert by lists in data.frames

2012-10-09 Thread Rui Barradas
You're right, I was in a hurry. This one works. x <- rnorm(100) a <- sample(letters[1:4], 100, T) by.list <- by(x, a, summary) do.call(rbind, as.list(by.list)) (I would also prefer aggregate.) Rui Barradas Em 09-10-2012 19:46, ilai escreveu: On Tue, Oct 9, 2012 at 12:25 PM, Bert Gunter wr

Re: [R] variances of random effects in coxme

2012-10-09 Thread Hugo Varet
Dear R users, Terry Theneau, thank you very much for you answer. I'm running R 2.15.1 (32 bits) and coxme 2.2-3. Here is a small R code which reproduces the problem (I fitted a model with random effects whereas it is useless), it gives exactly the same estimations of the variances than on my real

Re: [R] car::linearHypothesis Sum of Sqaures Error?

2012-10-09 Thread John Fox
Dear John, > -Original Message- > From: John Jay Wiley Jr. [mailto:jwile...@syr.edu] > Sent: Tuesday, October 09, 2012 3:37 PM > To: John Fox > Cc: r-help@r-project.org > Subject: RE: [R] car::linearHypothesis Sum of Sqaures Error? > > John, > > Again, thank you for your reply. > > Unfo

Re: [R] plot.new() and grid functions in multipage pdfs

2012-10-09 Thread Greg Snow
The plot.new function is for base graphics and base and grid graphics don't usually play well together. You probably want to use grid.newpage function instead. On Tue, Oct 9, 2012 at 1:26 PM, Ali Tofigh wrote: > Hi, > > when using the grid package, I've come across this weird behaviour > where a

Re: [R] plot.new() and grid functions in multipage pdfs

2012-10-09 Thread ilai
On Tue, Oct 9, 2012 at 1:26 PM, Ali Tofigh wrote: > Hi, > > when using the grid package, I've come across this weird behaviour > > pdf("test.pdf"); plot.new(); grid.rect(gp = gpar(fill="blue")); > plot.new(); grid.rect(gp = gpar(fill="blue")); dev.off() > > The first page is filled completely wi

Re: [R] car::linearHypothesis Sum of Sqaures Error?

2012-10-09 Thread John Jay Wiley Jr.
John, Again, thank you for your reply. Unfortunately, I didn't specify that I had previously changed the contrast options to contr.sum. I was aware of that requirement, and I still found that the sum of squares didn't add up. It seems that you made the SS add up by removing the covariate. Ulti

Re: [R] Qustion about Creating a sequence of vector

2012-10-09 Thread William Dunlap
> sequence(c(4,2,0,10)) [1] 1 2 3 4 1 2 1 2 3 4 5 6 7 8 9 10 Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On > Behalf > Of bibek sharma > Sent: Tuesday, October 09,

[R] plot.new() and grid functions in multipage pdfs

2012-10-09 Thread Ali Tofigh
Hi, when using the grid package, I've come across this weird behaviour where a call to plot.new() will start a new page for a multi-page pdf, but then the margins will somehow behave strangely for all but the first page: here is some code: pdf("test.pdf"); plot.new(); grid.rect(gp = gpar(fill="bl

[R] Qustion about Creating a sequence of vector

2012-10-09 Thread bibek sharma
Hello R User, I have a data set where subject( Id) are frequently measured. For example, the size of the data set is 75 by 2 and has following frequency distribution. idfreq 1 30 2 20 3 25 I want to create a variable (say seq) containing sequential count for each id. I mean va

Re: [R] car::linearHypothesis Sum of Sqaures Error?

2012-10-09 Thread John Fox
Dear John, > -Original Message- > From: John Jay Wiley Jr. [mailto:jwile...@syr.edu] > Sent: Tuesday, October 09, 2012 9:17 AM > To: John Fox > Cc: r-help@r-project.org > Subject: RE: [R] car::linearHypothesis Sum of Sqaures Error? > > John, > > Thank you for the reply. > > The data are

[R] NA When Setting Options to See Fractions of Seconds

2012-10-09 Thread Alex Zhang
Dear all, I just found a weird behavior of the timeDate related functions Sys.timeDate() and as.timeDate(). Both of them take place when showing fractions of seconds and I think they might have the same source. Do you know if it should be considered a bug of Sys.timeDate()? Also, what is a goo

Re: [R] how to convert by lists in data.frames

2012-10-09 Thread ilai
On Tue, Oct 9, 2012 at 12:25 PM, Bert Gunter wrote: > > The only wrinkle here (with either rbind or simplify2array) is getting > the labels correct if the design is not fully crossed -- i.e. if some > groups are missing so that expand.grid() won't work. Then you might > have to work harder to ext

Re: [R] How can I write the square root symbol in an axes label?

2012-10-09 Thread William Dunlap
Look at help("plotmath"). > plot(1:10, xlab=bquote(Log(sqrt("Total area") * (mm # small space before > (mm) > plot(1:10, xlab=bquote(Log(sqrt("Total area") ~ (mm # more space before > (mm) For your next question: > # now use .(var) to interpolate value of variable 'var' into a plot la

Re: [R] How can I write the square root symbol in an axes label?

2012-10-09 Thread David Winsemius
On Oct 9, 2012, at 11:13 AM, 21rosit wrote: > And how can I write the units of my axis but outside the square root symbol > I have > > plot(1:10, ylab=bquote(Log(sqrt("Total area (mm)" > > but I need it as in the attached picture >

Re: [R] How can I write the square root symbol in an axes label?

2012-10-09 Thread 21rosit
And how can I write the units of my axis but outside the square root symbol I have plot(1:10, ylab=bquote(Log(sqrt("Total area (mm)" but I need it as in the attached picture -- View this message in context: http://r.78969

Re: [R] how to convert by lists in data.frames

2012-10-09 Thread Bert Gunter
Ilai, et. al: Yes. The OP might also look at the result of: > t(simplify2array (by.list)) The only wrinkle here (with either rbind or simplify2array) is getting the labels correct if the design is not fully crossed -- i.e. if some groups are missing so that expand.grid() won't work. Then you mig

Re: [R] how to convert by lists in data.frames

2012-10-09 Thread ilai
On Tue, Oct 9, 2012 at 11:42 AM, Rui Barradas wrote: > Hello, > > Try > > do.call(data.frame, by.list) > > I don't think data.frame inside do.call works in this context. May need it on the outside to do the job (Only OK here since there is no mixture of numeric and character/factors in this summa

Re: [R] how to convert by lists in data.frames

2012-10-09 Thread Rui Barradas
Hello, Try do.call(data.frame, by.list) Hope this helps, Rui Barradas Em 09-10-2012 17:53, Jesus Frias escreveu: > Dear R-helpers, > > > > I've got a summary of results from a by() call that I am making with a list > of more than two of factors not very different from the example in the by()

Re: [R] converting dgCMatrix to regular matrix

2012-10-09 Thread Berend Hasselman
On 09-10-2012, at 19:04, Mark Leeds wrote: > Hi: I've looked around and I must be missing it because it's probably > somewhere. Does someone know how to convert an object of class dgCmatrix > to a regular matrix. I can send someone the data if they need it but it's > too big to include here. >

Re: [R] turn list into dataframe

2012-10-09 Thread R. Michael Weylandt
On Tuesday, October 9, 2012, Benjamin Caldwell wrote: > Thanks Arun - the different lengths in the list elements was the sticking > point. Does anyone have suggestions for packages or R books on indexing/ > reshaping datasets for an intermediate user like myself? Perhaps Spector on Data Manipula

[R] how to convert by lists in data.frames

2012-10-09 Thread Jesus Frias
Dear R-helpers, I’ve got a summary of results from a by() call that I am making with a list of more than two of factors not very different from the example in the by() help page require(stats) by(warpbreaks[, 1], warpbreaks[, -1], summary) The result of the command gives a list

[R] converting dgCMatrix to regular matrix

2012-10-09 Thread Mark Leeds
Hi: I've looked around and I must be missing it because it's probably somewhere. Does someone know how to convert an object of class dgCmatrix to a regular matrix. I can send someone the data if they need it but it's too big to include here. I read the data in using temp<-readMat("movielens.mat

Re: [R] How to create a column in dependence of another column

2012-10-09 Thread William Dunlap
It might be simpler to use cut(): > trans_value <- c(3000, 200, 400, 50, 2000) > cut(trans_value, breaks=c(-Inf, 200, 500, Inf), labels=c("low","medium","high")) [1] high lowmedium lowhigh Levels: low medium high Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com > ---

Re: [R] R stickers

2012-10-09 Thread Virgilio Gómez-Rubio
Hi Jim,El mar, 09-10-2012 a las 12:39 -0400, jim holtman escribió: > The R site has a number of them: > > http://developer.r-project.org/Logo/ > Many thanks. That was what I printed last year, but perhaps someone has a logo with some text on it, etc. Cheers, Virgilio _

Re: [R] How to create a column in dependence of another column

2012-10-09 Thread Rui Barradas
Hello, As for creating the new variable try dataSet <- within(dataSet, deal_category <- ifelse(trans_value < 200, "low", ifelse(trans_value < 500, "medium", "high"))) And the rest seems ok. Run the code and see if it is. Hope this helps, Rui Barradas Em 09-10-2012 10:25, fxen3k escrev

Re: [R] R stickers

2012-10-09 Thread jim holtman
The R site has a number of them: http://developer.r-project.org/Logo/ On Tue, Oct 9, 2012 at 12:27 PM, Virgilio Gómez-Rubio wrote: > Dear all, > > Perhaps this is not the place but... we are going to print some stickers > to take them to a conference for a sticker exchange with other free > so

[R] R stickers

2012-10-09 Thread Virgilio Gómez-Rubio
Dear all, Perhaps this is not the place but... we are going to print some stickers to take them to a conference for a sticker exchange with other free software organisations. Last year I printed very simple stickers and this year I would like to take better stuff to the meeting. Does anyone have a

Re: [R] append for .Rdata?

2012-10-09 Thread Prof Brian Ripley
On 09/10/2012 16:35, Jessica Streicher wrote: Can i somehow append objects to an .Rdata file? No. See the 'R Internals' manual for the details. BTW, it is '.RData': R is case sensitive and so are many file systems. It sounds like you should be using a database of the results of saveRDS() fo

Re: [R] turn list into dataframe

2012-10-09 Thread Benjamin Caldwell
Thanks Arun - the different lengths in the list elements was the sticking point. Does anyone have suggestions for packages or R books on indexing/ reshaping datasets for an intermediate user like myself? *Ben Caldwell* On Mon, Oct 8, 2012 at 3:26 PM, arun wrote: > Hi, > > Your output suggest

Re: [R] Convert COLON separated format

2012-10-09 Thread William Dunlap
Matrix::spMatrix can help. Read your data file with lns <- readLines("fileName") to get something like lns <- c("1 5:15 7:17 9:19", "2 2:22 8:28", "4 6:46") Then use a function like the following that reformats the data to the i=row,j=col,x=value vectors that s

[R] append for .Rdata?

2012-10-09 Thread Jessica Streicher
Can i somehow append objects to an .Rdata file? I didn't see an option for it in the save() method. dump() won't work since i have s4 objects in there. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read th

Re: [R] why does R stepAIC keep unsignificant variables?

2012-10-09 Thread S Ellison
> > Why are the first 5 variables kept in the stepwise result?? I don't know, for your data set. However, AIC is in my limited experience less likely to reject a term than rejection based on p-value at 95% confidence. It's not the same criterion, so there's no immediate reason it should give th

Re: [R] How to deal with thousands of seconds in R?

2012-10-09 Thread Agustin Lobo
Sorry for the typo, I meant thousandths, and thanks for pointing out the %OS format, which I had overlooked Agus On Tue, Oct 9, 2012 at 2:51 PM, Prof Brian Ripley wrote: > On 09/10/2012 09:54, Agustin Lobo wrote: >> >> If I do: >>> >>> a >> >> [1] "2012_10_01_14_13_32.445" >>> >>> a2 >> >> [1] "

[R] Send Email from R

2012-10-09 Thread Rantony
Hi, i wanted to send a mail from R (using Eclips). Currently i installed the following packages base64_1.1 sendmailR_1.1-1 mail_1.0.tar.gz Rmail_1.1.tar.gz But while installing package some error was occuring. Any other way to send a mail ? - Thanks in advance Antony -- View this message in

Re: [R] Text file: multiple matrix

2012-10-09 Thread Rui Barradas
Hello, Try the following, substituting your filename for "test.txt". fun <- function(filenumber, con, n, sep = " ", prefix = "RTest"){ txt <- readLines(con, n = n) tc <- textConnection(txt) on.exit(close(tc)) tbl <- read.table(tc, sep = sep)[-n, ] filename <- sprintf("%s_%03

Re: [R] How to write out this regression equation in R?

2012-10-09 Thread S Ellison
> How to make R write out: > > Balance = 2 + 3 * IntGDP + 5 * IntUnemployment + 0.3 * d1 > > from the table below: > > Balance Intercept IntGDP GDPNum IntUnemployment > IntInflationd1 d2 d3 > 3 2 3 5 > 0.3 0

[R] How to write out this regression equation in R?

2012-10-09 Thread liang . che
For example: How to make R write out: Balance = 2 + 3 * IntGDP + 5 * IntUnemployment + 0.3 * d1 from the table below: Balance Intercept IntGDP GDPNum IntUnemployment IntInflationd1 d2 d3 3 2 3 5 0.3 0 0

Re: [R] other way of making a table?

2012-10-09 Thread Jessica Streicher
Yepp, i do not necessarily know them beforehand. Or maybe i should rather say that they may differ from time to time but i want to be able to just copy the code. I can use your code that skips the first factor commands though, thanks. On 09.10.2012, at 15:00, Jeff Newmiller wrote: > Use facto

Re: [R] why does R stepAIC keep unsignificant variables?

2012-10-09 Thread liang . che
will add() or drop() function work more similarly as SAS? I understand that there are not many observation points which might cause the problem, but why can the automated process run successfully in SAS instead? From: David Winsemius To: Liang Che/US/TLS/PwC@Americas-US Cc: Date:

Re: [R] Reading labels for very large heatmaps

2012-10-09 Thread Jean V Adams
If you provide some example data in reproducible code, I might be able to help. Otherwise, not much I can do. Jean JIMonroe wrote on 10/08/2012 01:17:55 AM: > > Jean, > > It's definitely bigger now, but my axes are cut-off. As in your example, I > had them drawn after generating the heat

Re: [R] other way of making a table?

2012-10-09 Thread Duncan Murdoch
On 09/10/2012 9:24 AM, Jessica Streicher wrote: So.. real=factor(realLabels) predicted=factor(predictedLabels) fl<-unique(levels(real),levels(predicted)) real=factor(realLabels,fl) predicted=factor(pl,fl)

Re: [R] other way of making a table?

2012-10-09 Thread Jorge I Velez
Dear Jessica, Compare x<-c(1,1,1,0,0) y<-c(1,1,1,1,1) table(x, y) with table(factor(x, levels = 0:1), factor(y, levels = 0:1)) HTH, Jorge.- On Wed, Oct 10, 2012 at 12:24 AM, Jessica Streicher <> wrote: > So.. > > real=factor(realLabels) > predicted=factor(pr

Re: [R] other way of making a table?

2012-10-09 Thread Jessica Streicher
So.. real=factor(realLabels) predicted=factor(predictedLabels) fl<-unique(levels(real),levels(predicted)) real=factor(realLabels,fl) predicted=factor(pl,fl) table(real,predicted) ? i kinda dont like i

Re: [R] car::linearHypothesis Sum of Sqaures Error?

2012-10-09 Thread John Jay Wiley Jr.
John, Thank you for the reply. The data are balanced; I double-checked. I believe the contrasts are orthogonal. Sum of squares in summary(aov) with the contrasts split out add to the main effect. I am still unsure of where the error is for the sum of squares calculation. I have written some c

Re: [R] other way of making a table?

2012-10-09 Thread Jeff Newmiller
Use factors? --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#.. Playing Research En

Re: [R] How to deal with thousands of seconds in R?

2012-10-09 Thread Prof Brian Ripley
On 09/10/2012 09:54, Agustin Lobo wrote: If I do: a [1] "2012_10_01_14_13_32.445" a2 [1] "2012_10_01_14_13_32.500" strptime(a,format="%Y_%M_%d_%H_%M_%S")-strptime(a2,format="%Y_%M_%d_%H_%M_%S") Time difference of 0 secs Is there any time object in R that would deal with thousands of second

Re: [R] turn list into dataframe

2012-10-09 Thread arun
Hi Purna, >From your reply, I guess you intend to email the OP (original poster), but >somehow you got confused with the email ids.  When you send reply, please cc: >to r-help. The OP didn't gave much details about the dataset, but only the output generated from tapply().  Output shows that t

Re: [R] Modern Symbolic debugger for R programmes?

2012-10-09 Thread Vitalie Spinu
>> Worik R >> on Tue, 9 Oct 2012 17:12:51 +1300 wrote: WR> I cannot make setBreakpoint or findLineNum work. I get "No source WR> refs found.". I am starting to loose my mind! Indeed, as Rainer suggested, check out ESS. The ess-tracebug (part of ESS) provides, among other things, sourc

[R] How to deal with thousands of seconds in R?

2012-10-09 Thread Agustin Lobo
If I do: > a [1] "2012_10_01_14_13_32.445" > a2 [1] "2012_10_01_14_13_32.500" > strptime(a,format="%Y_%M_%d_%H_%M_%S")-strptime(a2,format="%Y_%M_%d_%H_%M_%S") Time difference of 0 secs Is there any time object in R that would deal with thousands of seconds? Thanks Agus -- -- Dr. Agustin Lobo I

[R] How to create a column in dependence of another column

2012-10-09 Thread fxen3k
Hi there, I'm sorry for the bad subject decision. Couldn't describe it better... In my dataset called "dataSet" I want to create a new variable column called "deal_category" which depends on another column called "trans_value". In column "trans_value" I have values in USDm. Now what I want to do

[R] Text file: multiple matrix

2012-10-09 Thread ludovico
Hi there! I'm a newbie in R This is my problem: I have a txt file composed by 100 matrix (256x256) separated by a blank line! How can I save automatically the matrix in separated txt file (100)? e.g. 1° matrix from line 1 to line 256 257 blank line 2°matrix from line 258 to line 513 514 blank line

Re: [R] How to create a table with borders?

2012-10-09 Thread arun
HI Rui, Thanks for the alternate method. I guess OP had trouble with pdflatex processing (output of latex(tab)) to create the table. A.K. - Original Message - From: Rui Barradas To: killerkarthick Cc: r-help@r-project.org Sent: Tuesday, October 9, 2012 3:15 AM Subject: Re: [R] How t

[R] other way of making a table?

2012-10-09 Thread Jessica Streicher
I'm making tables for prediction results of classifiers (2 classes) that show the usual numbers, true positives, false positives, etc I used the command table(predictedLabels,realLabels) to make those. I just had a case though ,where one of the label vectors had only one class in it. This wil

Re: [R] Convert COLON separated format

2012-10-09 Thread jim holtman
If you want something that is fast, read the file in, strip off the colon/data, write it out to a temp and then read it back in. Here is a 355K line file: > temp <- tempfile() > input <- readLines('/temp/colon.txt') > length(input) [1] 355212 > system.time(input <- gsub("(:[0-9]+)", "", input))

Re: [R] car::linearHypothesis Sum of Sqaures Error?

2012-10-09 Thread John Fox
Dear John On Tue, 9 Oct 2012 02:07:07 + "John Jay Wiley Jr." wrote: > I am working with a RCB 2x2x3 ANCOVA, and I have noticed a difference in the > calculation of sum of squares in a Type III calculation. For type III tests, you should use contrasts that are orthogonal in the row basis o

Re: [R] ylim with only one value specified

2012-10-09 Thread R. Michael Weylandt
On Tue, Oct 9, 2012 at 10:28 AM, Matthias Gondan wrote: > Dear R developers, > > I would like to have R choose the limits of the y-axis semi-automatically, > e.g., zero should be included, but the maximum should be chosen depending > on the data. > > Examples: > > plot(1:10, 1:10) # selects min an

Re: [R] Modern Symbolic debugger for R programmes?

2012-10-09 Thread Duncan Murdoch
On 12-10-09 12:12 AM, Worik R wrote: I think I am whistling in the wind, but is there a modern symbolic debugger for R programmes? I am working through some one else's code, thousands of lines, that has the occasional bug in it, and a lot in my understanding of it. I cannot make setBreakpoint

[R] ylim with only one value specified

2012-10-09 Thread Matthias Gondan
Dear R developers, I would like to have R choose the limits of the y-axis semi-automatically, e.g., zero should be included, but the maximum should be chosen depending on the data. Examples: plot(1:10, 1:10) # selects min and max automatically plot(1:10, 1:10, ylim=c(1, 10)) # manual definition

Re: [R] Update CSV file content

2012-10-09 Thread Jim Lemon
On 10/08/2012 08:20 PM, Rantony wrote: Hi, Here i have a csv file, it contain like this NAME UPDATED - -- ABCINDIA XYZ UK My requirement what is, i need to change the value inside the csv file (instead of INDIA i need to make it USA). NAME UPDATED ---

[R] multinomial MCMCglmm

2012-10-09 Thread Vaniscotte Amélie
Dear all, I would like to add mixed effects in a multinomial model and I am trying to use MCMCglmm for that. The main problem I face: my data set is a trapping data set, where the observation at each trap (1 or 0 for several species) have been aggregated per trapline (i.e. 25 traps). Therefore we

Re: [R] Modern Symbolic debugger for R programmes?

2012-10-09 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 09/10/12 09:42, Rainer M Krug wrote: > On 09/10/12 06:12, Worik R wrote: >> I think I am whistling in the wind, but is there a modern symbolic debugger >> for R >> programmes? > >> I am working through some one else's code, thousands of lines, th

Re: [R] Modern Symbolic debugger for R programmes?

2012-10-09 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 09/10/12 06:12, Worik R wrote: > I think I am whistling in the wind, but is there a modern symbolic debugger > for R programmes? > > I am working through some one else's code, thousands of lines, that has the > occasional bug in > it, and a lot

Re: [R] Diagnostic testing in a VEC

2012-10-09 Thread Pfaff, Bernhard Dr.
Hello Laura, you convert your VEC model to its levl-VAR representation and employ the diagnostic tests you mentioned. This can be accomplished with the functions/methods contained in the package 'vars'. You might want to have a look at the vignette of the latter package. Best, Bernhard -U

Re: [R] simulating a toss of a coin

2012-10-09 Thread Rui Barradas
Hello, Try the following. fun <- function(n = 100){ x <- sample(c("H","T"),3*n,replace=TRUE) dim(x) <- c(3,n) num_heads <- apply(x,2,function(x) sum(x=="H")) table(num_heads)/n } Runs <- 1e1 t(replicate(Runs, fun())) Hope this helps, Rui Barradas Em 09-10-2012 06:04, David Ar

Re: [R] How to create a table with borders?

2012-10-09 Thread Rui Barradas
Hello, Why not use package xtable? I've just tried the following. #install.packages('xtable') library(xtable) x <- 1:20 y <- 0.5*x + rnorm(20) fit <- aov(y ~ x) latex.tbl <- xtable(fit) align(latex.tbl) <- "|lr|" print(latex.tbl) The output was % latex table generated in R 2.15.1 by xtab

Re: [R] simulating a toss of a coin

2012-10-09 Thread R. Michael Weylandt
On Tue, Oct 9, 2012 at 6:04 AM, David Arnold wrote: > All, > > I've devised a way to toss a coin three times and record the number of heads, > then use the table command to summarize the number of time 0, 1, 2, or 3 > heads were obtained. > > n <- 100 > x <- sample(c("H","T"),3*n,replace=TRUE) >

Re: [R] Error in lmer: asMethod(object) : matrix is not symmetric [1, 2]

2012-10-09 Thread olivier
Yes, that was what I was trying to do. Thank you very much for your reply! Olivier -- View this message in context: http://r.789695.n4.nabble.com/Error-in-lmer-asMethod-object-matrix-is-not-symmetric-1-2-tp4645133p4645537.html Sent from the R help mailing list archive at Nabble.com. __

[R] simulating a toss of a coin

2012-10-09 Thread David Arnold
All, I've devised a way to toss a coin three times and record the number of heads, then use the table command to summarize the number of time 0, 1, 2, or 3 heads were obtained. n <- 100 x <- sample(c("H","T"),3*n,replace=TRUE) dim(x) <- c(3,n) num_heads <- apply(x,2,function(x) sum(x=="H")) tab

[R] car::linearHypothesis Sum of Sqaures Error?

2012-10-09 Thread John Jay Wiley Jr.
I am working with a RCB 2x2x3 ANCOVA, and I have noticed a difference in the calculation of sum of squares in a Type III calculation. Anova output is a follows: > Anova(aov(MSOIL~Forest+Burn*Thin*Moisture+ROCK,data=env3l),type=3) Anova Table (Type III tests) Response: MSOIL

Re: [R] How to create a table with borders?

2012-10-09 Thread killerkarthick
Thanks arun, But what is the alternative solution in windows. Please reply me. -- View this message in context: http://r.789695.n4.nabble.com/How-to-create-a-table-with-borders-tp4645470p4645527.html Sent from the R help mailing list archive at