Re: [R] Multiple hist(ograms) - One plot

2008-10-03 Thread Deepayan Sarkar
On 10/2/08, Michael Just [EMAIL PROTECTED] wrote: Dieter and Thierry: Per you suggestions I have tried: ggplot2 from Thierry: p - ggplot(dat, aes(x=bbContag, y=..density..)) + geom_histogram() p + facet_grid(. ~ sc_recov %in% c(21,31,41)) But get the followinng error: Error in

Re: [R] time segments intersection

2008-10-03 Thread [Ricardo Rodriguez] Your XEN ICT Team
Thanks Gabor, Gabor Grothendieck wrote: Try: chooseCRANmirror() It works the call to the pop-up window, but it fails now whatever mirror I use with the following message: install.packages(zoo,repos=chooseCRANmirror()) /bin/sh: tar: command not found Error in sprintf(gettext(fmt, domain =

[R] Missing basic understanding of classes, generic functions and methods

2008-10-03 Thread Martin Maechler
[EMAIL PROTECTED] on Thu, 2 Oct 2008 10:02:04 -0700 writes: Sorry, I must be looking at a different section but when I look at 3.4 in r-intro.pdf I see: 3.4 The class of an object All objects in R have a class, reported by the function class. For simple vectors this is

Re: [R] possible bug in function 'var' in R 2.7.2?

2008-10-03 Thread Martin Maechler
BB == Ben Bolker [EMAIL PROTECTED] on Thu, 2 Oct 2008 13:07:02 + (UTC) writes: BB klaus.steenberg.larsen at risoe.dk writes: Dear R-Help, I have used R2.6.0 until I recently installed also R2.7.2 (see details below) In R 2.6.0, the following script

Re: [R] time segments intersection

2008-10-03 Thread [Ricardo Rodriguez] Your XEN ICT Team
Thanks Mark, [EMAIL PROTECTED] wrote: # MAKE POSIXct OBJECTS FROM CHARACTER STRINGS temp1 - as.POSIXct(strptime(2007-02-02,%Y-%m-%d)) temp2 - as.POSIXct(strptime(2007-02-01,%Y-%m-%d)) # TEMP1 AND TEMP2 ARE SORT OF NUMBERS BUT EACH UNIT IS ONE # SECOND result - difftime(temp1,temp2) # STILL

Re: [R] Multiple hist(ograms) - One plot

2008-10-03 Thread ONKELINX, Thierry
Michael, You get this error because you make the subset at the wrong place. Try p - ggplot(dat[dat$sc_recov %in% c(21,31,41), ], aes(x=bbContag, y=..density..)) + geom_histogram() p + facet_grid(. ~ sc_recov) or subdat - dat[dat$sc_recov %in% c(21,31,41), ] p - ggplot(subdat,

Re: [R] Adding plane in a 3D scatterplot

2008-10-03 Thread Uwe Ligges
Please use a recent version of R *and* scatterplot3d. Uwe Ligges Megh Dal wrote: I got following error : library(mnormt) library(scatterplot3d) dat = cbind(rmnorm(3, rep(0,2), diag(2)), 1:3) s3d - scatterplot3d(dat, lab.z=2, scale.y=0.7, angle=20) s3d$plane3d(2,0,0, solid, col=grey) Error

[R] several postscript problems

2008-10-03 Thread Joanne Demmler
Hello everyone, I'm currently trying to export a couple of graphs to pdf . Postscript would be fine too, but I'm using odd page dimensions, which seem to be overwritten when using the ps2pdf command. I'm using the pdfpages package in LaTeX to put 6 graphs onto one page (this is why it ought

[R] 3D scatter, groups, RdbiPgSQL...

2008-10-03 Thread Tomas Lanczos
hello, I wish to create some 3d scatter diagrams visualising different grouped data set by a given field in the database. I tried the scatterplot3d package, as well as the plot3d and scatter3d functions (both within the rgl resp. Rcmdr package). My first question is, whether is it possibe to

[R] Problem with strptime

2008-10-03 Thread Solene Goy
Hello, I have a column with dates in the form %Y-%m-%d %H:%M:%S; I want to substract the line i+1 to the line i and get a numeric result (in seconds for instance). This is what I did (I take the data from a database): res- dbSendQuery (con, SELECT Date_Heure FROM data.meteo )Time-fetch(res,

Re: [R] several postscript problems

2008-10-03 Thread Prof Brian Ripley
On Fri, 3 Oct 2008, Joanne Demmler wrote: Hello everyone, I'm currently trying to export a couple of graphs to pdf . Postscript would be fine too, but I'm using odd page dimensions, which seem to be overwritten when using the ps2pdf command. I'm using the pdfpages package in LaTeX to put 6

Re: [R] Error message in ifthen else

2008-10-03 Thread Duncan Murdoch
On 03/10/2008 12:40 AM, Jason Lee wrote: Hi Duncan, Mark and all, Thanks for the suggestion. I ve tried the below suggestion. I got this error now Error in `[-.data.frame`(`*tmp*`, , x, value = NULL) : new columns would leave holes after existing columns Its weird as I try to assign NULL

[R] invalid 'ncol' value (too large or NA) error message

2008-10-03 Thread Vie
Hi, I've been trying to run an R script, however I keep getting the error message invalid 'ncol' value (too large or NA) The program involves reading data from table, and manipulating it in some way. However I do not understand what the error message means (I'm new to R). Is it because some of

Re: [R] several postscript problems

2008-10-03 Thread Richard . Cotton
I'm currently trying to export a couple of graphs to pdf . Postscript would be fine too, but I'm using odd page dimensions, which seem to be overwritten when using the ps2pdf command. I'm using the pdfpages package in LaTeX to put 6 graphs onto one page (this is why it ought to be a pdf

Re: [R] Problem with strptime

2008-10-03 Thread jim holtman
Your example works fine for me: x - read.table(textConnection(13199 2008-03-19 03:55:46 + 13200 2008-03-19 04:00:46 + 13201 2008-03-19 04:05:46 + 13202 2008-03-19 04:10:46 + 13203 2008-03-19 04:15:46), as.is=TRUE) closeAllConnections() x$time - as.POSIXct(strptime(paste(x$V2, x$V3), %Y-%m-%d

Re: [R] 3D scatter, groups, RdbiPgSQL...

2008-10-03 Thread Duncan Murdoch
On 03/10/2008 4:33 AM, Tomas Lanczos wrote: hello, I wish to create some 3d scatter diagrams visualising different grouped data set by a given field in the database. I tried the scatterplot3d package, as well as the plot3d and scatter3d functions (both within the rgl resp. Rcmdr package). My

Re: [R] several postscript problems

2008-10-03 Thread Joanne Demmler
Thanks, I upgraded to R 2.7.2 and installed Acrobat Reader. Once Acrobat reader is set as default application for pdf it will automatically also be used under Lyx. This solved most problems, but all error bars at pch=1 dots still look like a little mouse nibbled on them. Perhaps I'll just

Re: [R] Point of intersection

2008-10-03 Thread jim holtman
Here it is by hand. You can probably create an iterative solution: x=seq(-10,10,length=100) p1=dnorm(x,0,1) plot(x,p1,type='n',ylab=Density,main=Overlap Measure) points(x,p1,type='l') abline(0.07,0.01) f.x - function(x) abs(dnorm(x,0,1) - (.07 + .01*x)) optimize(f.x, c(-10,0))

Re: [R] several postscript problems

2008-10-03 Thread Stefan Evert
I'm currently trying to export a couple of graphs to pdf . Postscript would be fine too, but I'm using odd page dimensions, which seem to be overwritten when using the ps2pdf command. From what you wrote I guess that perhaps you don't really want unusual page dimensions, but rather

[R] question on xyplot

2008-10-03 Thread eugen pircalabelu
Hi List, I have the following problem: I am using the multilevel package and make.univ function for available in the package and then xyplot from lattice and I want to know how could I be able to use the “coefficient” for the straight line that passes the data ? Example from help:

Re: [R] several postscript problems

2008-10-03 Thread Prof Brian Ripley
On Fri, 3 Oct 2008, Stefan Evert wrote: I'm currently trying to export a couple of graphs to pdf . Postscript would be fine too, but I'm using odd page dimensions, which seem to be overwritten when using the ps2pdf command. From what you wrote I guess that perhaps you don't really want

Re: [R] Missing basic understanding of classes, generic functions and methods

2008-10-03 Thread rkevinburton
It turns out not to be a misunderstanding about generice functions it was a mistaken assumption about the values being returned from 'fft'. I made the mistaken assumption (based on an EE background) that 'fft' would always return a vector of complex numbers. I didn't realize that 'fft' could

Re: [R] time segments intersection

2008-10-03 Thread Gabor Grothendieck
On Fri, Oct 3, 2008 at 2:48 AM, [Ricardo Rodriguez] Your XEN ICT Team [EMAIL PROTECTED] wrote: Thanks Gabor, Gabor Grothendieck wrote: Try: chooseCRANmirror() It works the call to the pop-up window, but it fails now whatever mirror I use with the following message:

Re: [R] question on xyplot

2008-10-03 Thread hadley wickham
On Fri, Oct 3, 2008 at 8:04 AM, eugen pircalabelu [EMAIL PROTECTED] wrote: Hi List, I have the following problem: I am using the multilevel package and make.univ function for available in the package and then xyplot from lattice and I want to know how could I be able to use the coefficient

Re: [R] time segments intersection

2008-10-03 Thread hadley wickham
Its as follows: chooseCRANmirror() install.packages(zoo, dep = TRUE) or maybe: chooseCRANmirror() install.packages(zoo, dep = TRUE, type = mac.binary) If those do not work try installing some other packages, e.g. chron, to see if you can install anything. If you still have problems

Re: [R] When to set small values to 0?

2008-10-03 Thread Ravi Varadhan
It really dependes on the nature of the computations that you are doing to obtain these real vectors, and also on the objective of your problem. For example, if the real vectors are the result of some numerical approximation, then you can set the threshold to be equal to the error involved in

[R] how to do a probit?

2008-10-03 Thread Viktor Nagy
Hi, I know that this question appears in the archives, but from the docs I couldn't figure out how to do it, (I am really new to R) I have a simple setting with three variables (y binary, x1 continuous, x2 dummy) and would like to run a probit estimation of the form y=Phi(X*B). How can I do

[R] Error in R/parallel

2008-10-03 Thread 宗楷
Dear all: I try a package called rparallel, and it can make your multiple cores desktop PC have parallel computation. The following are my code: library(rparallel) msd - function(x)c(mean(x),sd(x)) m - matrix(rnorm(10*100),ncol=100) st - Sys.time() M - NULL

[R] suggestions for plotting 5000 data points

2008-10-03 Thread Tania Oh
Dear all, I have a collection of 5000 entries which represent the evolutionary rates of 3 animals. I would like to show the differences between the rates of all 3 animals and have tried using the function parallel (from the lattice package) and pairs() function. The parallel function

[R] plot overlay of several times from the same month (but from different years) with formatted axis

2008-10-03 Thread Max Rausch
I have searched the forums but I am having trouble trying accomplish a specific plot. I am not sure if this is a very basic task but I am having a lot of trouble Here is my data frame: dateproduction price 1 2003-08-15 12050 4.83 2 2003-08-18 12050

Re: [R] how to do a probit?

2008-10-03 Thread Chuck Cleland
On 10/3/2008 10:06 AM, Viktor Nagy wrote: Hi, I know that this question appears in the archives, but from the docs I couldn't figure out how to do it, (I am really new to R) I have a simple setting with three variables (y binary, x1 continuous, x2 dummy) and would like to run a probit

[R] How to mix different font styles in axis label of lattice plot?

2008-10-03 Thread Judith Flores
Hello, I have a y-axis label that reads: S. schenckii yeast cells. The part that reads S. schenckii needs to be in italic style, the rest of the text is normal style. How can I specify the different font styles for each part of the y-axis label? Thank you, Judith

Re: [R] suggestions for plotting 5000 data points

2008-10-03 Thread Tania Oh
sorry, I made a slight typo in the code below, it should be mat3 -matrix(sample(1:5000),nrow=5000,ncol=3, byrow=TRUE) colnames(mat3) - c(human,mouse, chicken) mat3 -data.frame(mat3) mat3$model - factor( rep( Model 3), labels=model3) ## code I used for parallel require(lattice) parallel( ~

Re: [R] suggestions for plotting 5000 data points

2008-10-03 Thread Uwe Ligges
Typical suggestions would be to sample from the data or use alpha blending (translucency). Best wishes; uwe Ligges Tania Oh wrote: Dear all, I have a collection of 5000 entries which represent the evolutionary rates of 3 animals. I would like to show the differences between the rates of

[R] Problem with read.table in Windows and Linux

2008-10-03 Thread Carlos Morales
Hello everyone, I'm trying to open the same file under Linux and Windows. Under Windows everything is ok but when I try to do it under Linux I have a mistake and I don't know why. This is the mistake: Error in make.names(col.names,unique=TRUE): string multibyte 1 invalid why? I write this

Re: [R] Problem with read.table in Windows and Linux

2008-10-03 Thread Uwe Ligges
Carlos Morales wrote: Hello everyone, I'm trying to open the same file under Linux and Windows. Under Windows everything is ok but when I try to do it under Linux I have a mistake and I don't know why. This is the mistake: Error in make.names(col.names,unique=TRUE): string multibyte 1

Re: [R] RBloomberg to get dividend

2008-10-03 Thread davidr
Try adding ret=raw and leaving off start= since that is not supported for data set requests. You'll just have to format the returned nested lists yourself. Looking at the RBloomberg code should give you hints. (Also I think that field is deprecated - at least I can't find it in my version, but it

[R] Beginner's question about vgam for zanegbinomial models

2008-10-03 Thread John Poulsen
Hello, I am just starting to use the vgam() function in VGAM to try to fit zero-altered negative binomial models. So far I have gotten some a test dataset to run, but can't seem to extract the log-likelihood. That is, I am using summary(fit)@df.residual to extract the residual df's, but

Re: [R] Contour Plot Aspect Ratio

2008-10-03 Thread Greg Snow
The squishplot function in the TeachingDemos package will adjust margins to give the desired aspect ratio with the whitespace outside of the plot rather than inside. However the filled.contour function sets its own margins inside of the function so this does not work with filled.contour. You

[R] computing on expressions

2008-10-03 Thread Vadim Organovich
Dear R-users, Suppose I have an expression: expr = expression(a0) and now I want to modify it to expression(a0 b0). The following doesn't work: expr = expression(expr b0) What would be a good way of doing this? Thanks, Vadim Note: This email is for the

Re: [R] computing on expressions

2008-10-03 Thread Henrique Dallazuanna
Try this: parse(text = paste(capture.output(expr[[1]]), b 0)) On Fri, Oct 3, 2008 at 12:48 PM, Vadim Organovich [EMAIL PROTECTED] wrote: Dear R-users, Suppose I have an expression: expr = expression(a0) and now I want to modify it to expression(a0 b0). The following doesn't work:

[R] Mirror Image on Biplot Graphic

2008-10-03 Thread Rodrigo Aluizio
He everybody, Well I have a biplot CCA-like origined from plot.cca (vegan package). I need to rotate on y axis the lines and symbols of constrained and sites representation. If I do that on an image editor, I rotate everything, including titles, axes labels and positions. I just need to rotate

[R] glmmPQL Wald-type F-tests

2008-10-03 Thread Fowler, Mark
Hello, Might anyone know how to conduct Wald-type F-tests of the fixed effects estimated by glmmPQL? I see this implemented in SAS (GLIMMIX), and have seen it recommended in user group discussions, but haven't come across any code to accomplish it. I understand the anova function treats a

Re: [R] computing on expressions

2008-10-03 Thread Vadim Organovich
Thanks! Here is a less verbose variation based on suggestion by Phil Spector: parse(text=paste(expression(a0), b0)) From: Henrique Dallazuanna [EMAIL PROTECTED] Sent: Friday, October 03, 2008 11:08 AM To: Vadim Organovich Cc: r-help@r-project.org

Re: [R] Problem with read.table in Windows and Linux

2008-10-03 Thread Prof Brian Ripley
On Fri, 3 Oct 2008, Uwe Ligges wrote: Carlos Morales wrote: Hello everyone, I'm trying to open the same file under Linux and Windows. Under Windows everything is ok but when I try to do it under Linux I have a mistake and I don't know why. This is the mistake: Error in

[R] snow/rmpi using deinompi question

2008-10-03 Thread tolga . i . uzuner
Dear R Users, I have set-up: - R 2.7.2 - rmpi using deinoMPI, and - snpw on two Windows XP machines. I would like to use the makeCluster(...,MPI) command to create a cluster. Assume the machines are A and B. I would like the master to be on A and the nodes to be on B. How do I achieve this

Re: [R] crashes while using Rattle (GTK+)

2008-10-03 Thread Michael Lawrence
Just saw this one. This should be fixed in RGtk2 2.12.7 on CRAN. Thanks, Michael On Tue, Sep 30, 2008 at 12:03 AM, Tomislav Puða [EMAIL PROTECTED] wrote: Hi, I'm using R 2.7.2 for Windows.I have also installed gtk-dev-2.12.9 and rattle 2.3.65. When I work in rattle, I occasionally get these

[R] Problem with glm.nb estimation

2008-10-03 Thread Roberto Patuelli
Dear All, I've been using already for a year glm.nb() from the MASS package. But today, R gave me an error message when estimating one of my usual models: depEsf.nb - glm.nb(depE ~ manuf00E + corps00E + lngdp00E + lngdp00sqE + lnpop00E + indshE + scishE + mechshE + elecshE + chemshE +

Re: [R] Contour Plot Aspect Ratio

2008-10-03 Thread Sam Albers
So I managed to solve this for myself in a very roundabout kind of way. So I figured that I should share in case anyone else needed something like this. filled.contour(contour, axes=F, frame.plot=F, color=terrain.colors, ylab= , key.title = title(main=Velocity\n(m/s)),asp=2, key.axes = axis(4,

[R] cannot open connection: Authorization Required

2008-10-03 Thread Spencer Graves
Hi, All: Is there a way in R to access a file / web site that requires permission? Consider for example the following: readLines('http://www.r-project.org/', 4) [1] !DOCTYPE HTML PUBLIC \-//W3C//DTD HTML 4.01 Transitional//EN\ [2] html [3] head [4] titleThe R Project for

[R] What is wrong with my Kmean?

2008-10-03 Thread chengzou
I have a matrix 14000 row X 69 col. I noticed that when I break them in to 5~200 clusters. Each cluster has the same size. I use the first 100 row to run, each cluster has different size. Why is that? I used this command cl- kmeans(t,k,algorithm = Hartigan-Wong,nstart=5*k,iter.max=5*k)

[R] Latent Structure Analysis

2008-10-03 Thread Xu, Jun
Dear R-Listers, I have several ratio (percentages) and binary indicators, and I'd like to use these indicators to recover several latent classes based on these percentage (expenses over GDP) and binary measures. Any type of statistical analysis is suited for such data and is there a R-package

[R] flexible contour plots

2008-10-03 Thread Wolfgang Polasek
I want to make a contour plot estimate based on a sample of points -- a sort of smoothing.in 2D (but also in a scatterplot)? Any ideas [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

[R] cannot open connection: Authorization Required

2008-10-03 Thread Spencer Graves
Hi, All: Is there a way in R to access a file / web site that requires permission? Consider for example the following: readLines('http://www.r-project.org/', 4) [1] !DOCTYPE HTML PUBLIC \-//W3C//DTD HTML 4.01 Transitional//EN\ [2] html

Re: [R] question on xyplot

2008-10-03 Thread Deepayan Sarkar
On 10/3/08, hadley wickham [EMAIL PROTECTED] wrote: On Fri, Oct 3, 2008 at 8:04 AM, eugen pircalabelu [EMAIL PROTECTED] wrote: Hi List, I have the following problem: I am using the multilevel package and make.univ function for available in the package and then xyplot from lattice

[R] What is the meaning of segfault 'memory not mapped' ?

2008-10-03 Thread Ubuntu.Diego
I'm trying to get some easy coding to reproduce the error. In the meantime I have R code that run for 20 or more hours and suddenly i got a segfault 'memory not mapped' error. I have to clarify that the error not alway occurs and sometimes the process end satisfactorily. The process is basically a

[R] Multivariate Density Plots

2008-10-03 Thread David G. Tully
All, I am working with a large dataset that tracks who watches what media at what time. I am working on media consumption data from a survey, and one of the batteries asks if [r] has consumed a particular form of media at X time over the course of a week, so the data looks like

Re: [R] Problem with glm.nb estimation

2008-10-03 Thread Prof Brian Ripley
I see no error message here -- a *warning* is not an error. Please give a fully reproducible example with the actual output containing an error message. On Fri, 3 Oct 2008, Roberto Patuelli wrote: Dear All, I've been using already for a year glm.nb() from the MASS package. But today, R

Re: [R] aggregate empty row for pretty appearance also subtotal if possible

2008-10-03 Thread Sharma, Dhruv
Hi, By the way if there are many columns in the aggregate like x1,x2,x3 for example how would the subtotal code change? Is it possible to get subtotal for multiple columns by Group.1 e.g. below? Thanks Dhruv -Original Message- From: jim holtman [mailto:[EMAIL PROTECTED] Sent:

[R] Question about quantile.default

2008-10-03 Thread Lo, Ken
Hi all, I am running into a snag using quantile function in stats. Basically, I don't understand why the loop below throws the error that it does. test.data - rnorm(1000, 0, 1) for (i in seq(0.1, 0.001, 0.1)){ test - quantile(test.data, probs=seq(0,1,i)); print(i); }

Re: [R] What is the meaning of segfault 'memory not mapped' ?

2008-10-03 Thread Ben Bolker
Ubuntu.Diego ubuntu.diego at gmail.com writes: I'm trying to get some easy coding to reproduce the error. In the meantime I have R code that run for 20 or more hours and suddenly i got a segfault 'memory not mapped' error. I have to clarify that the error not alway occurs and sometimes the

Re: [R] time segments intersection

2008-10-03 Thread [Ricardo Rodriguez] Your XEN ICT Team
Thanks Hadley, hadley wickham wrote: Also ensure that you have an up-to-date version of R. Hadley I think the most recent release... version _ platform i386-apple-darwin8.11.1 arch i386 os

Re: [R] time segments intersection

2008-10-03 Thread [Ricardo Rodriguez] Your XEN ICT Team
Thanks Mark! Mark Leeds wrote: Hi Ricardo: My date knowledge is mostly restricted to as.POSIXct so I don't know what else to tell you. Did you ever work out that zoo downloading problem because Gabor's solutions are usually excellent. I've not worked out the problems I am facing while

Re: [R] time segments intersection

2008-10-03 Thread [Ricardo Rodriguez] Your XEN ICT Team
Thanks Gabor, Gabor Grothendieck wrote: If those do not work try installing some other packages, e.g. chron, to see if you can install anything. If you still have problems there is something wrong with your installation. Ask on the r-sig-mac list. You are right: something is wrong with

Re: [R] [R-SIG-Mac] /bin/sh: tar: command not found

2008-10-03 Thread [Ricardo Rodriguez] Your XEN ICT Team
Thanks, Ben Ben Bolker wrote: Since this is not my package (and I'm still not a Mac user), I think you must think about becoming a Mac person in spite of this problems :-) I really have no idea ... I never heard back from Andrew, don't know if he found a solution or if the problem

[R] Splitting a file into multiple files based on the column name

2008-10-03 Thread kayj
Hi, I have a txt file here I want to split it into different files based on the column name if it contains a specific word or part of a word. For example, If the header looks like A001_Sick A015_SBK99_SickL913_BB I would like to split the data , one file contains the data with

[R] Simple addition and subtraction doesn't work??

2008-10-03 Thread Adrian Teo
I was working on a teaching example, but came across this weird result: q-c(1.6,2.6, -3.4) q [1] 1.6 2.6 -3.4 sum(q) [1] 0.8 sum(q)- 0.8 [1] 2.22044605e-16 Why is the result not precisely zero? Thanks! AT __ R-help@r-project.org mailing list

Re: [R] Dot plot - equivalent of MINITAB

2008-10-03 Thread kerfuffle
Many many thanks for all your suggestions. -- View this message in context: http://www.nabble.com/Dot-plot---equivalent-of-MINITAB-tp19677009p19803454.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

[R] color code from csv

2008-10-03 Thread kerfuffle
hi folks, this is driving me up the wall. Apologies for posting twice in the same week, I'm writing up a thesis. I wish to color-code some dots in an xy plot. I've got a csv file with various elements, one of which is the color-key (with the header 'color'). If the color-key is decimal (eg.

[R] Question about quantile.default

2008-10-03 Thread Lo, Ken
Hi all, I am running into a snag using quantile function in stats. Basically, I don't understand why the loop below throws the error that it does. test.data - rnorm(1000, 0, 1) for (i in seq(0.1, 0.001, 0.1)){ test - quantile(test.data, probs=seq(0,1,i)); print(i); }

[R] re ading specific columns

2008-10-03 Thread kayj
I have a huge txt file and I only want to get out of it column 3 and 7. I tried to read the whole file and then extract the two columns, but I ran into a memory problem since the file is huge. Is it possible just to tell R to read these two columns without reading the whole file? Thanks --

[R] merge

2008-10-03 Thread kayj
Hi All, I want to merge file 2 into file 1 , is it possible to get the rows from file 2 that did not end up in the merge result? Thanks -- View this message in context: http://www.nabble.com/merge-tp19805328p19805328.html Sent from the R help mailing list archive at Nabble.com.

[R] Bug or inaccuracy in cumsum( )

2008-10-03 Thread Mai Zhou
I came across this: shouldn't the last value be a more exact zero? It did not do that with 1 - sum( rep(0.1, 10) ) 1 - cumsum( rep(0.1, 10) ) [1] 9.00e-01 8.00e-01 7.00e-01 6.00e-01 5.00e-01 4.00e-01 3.00e-01 2.00e-01 [9]

Re: [R] re ading specific columns

2008-10-03 Thread Erik Iverson
What function are you using to read in your data file? If read.table, then see the help page for that function, specifically the colClasses argument NULL. Erik kayj wrote: I have a huge txt file and I only want to get out of it column 3 and 7. I tried to read the whole file and then

Re: [R] Bug or inaccuracy in cumsum( )

2008-10-03 Thread Erik Iverson
Third one this afternoon, see FAQ 7.31 Mai Zhou wrote: I came across this: shouldn't the last value be a more exact zero? It did not do that with 1 - sum( rep(0.1, 10) ) 1 - cumsum( rep(0.1, 10) ) [1] 9.00e-01 8.00e-01 7.00e-01 6.00e-01 5.00e-01

[R] Tinn-R explorer used to be my friend

2008-10-03 Thread Farrel Buchinsky
I have upgraded everything lately and can no longer get the Tinn-R explorer to work. I think I have had this problem before but cannot recall how I solved it.I run Tinn-R 2.0.0.7 and Rgui version 2.7.2 When I click on the explorer button I get trObjList(envir='.GlobalEnv', pattern='', group='',

Re: [R] color code from csv

2008-10-03 Thread Sarah Goslee
Hi, I don't know how to get R to use the hex codes, but as an alternative strategy you can use colors() to get a (much longer than 8) list of all the colors that R knows, and use that with your index: plot(x, y, col=colors()[datacolor]) It takes a bit of fiddling to get distinguishable colors

Re: [R] color code from csv

2008-10-03 Thread hadley wickham
On Fri, Oct 3, 2008 at 2:10 PM, kerfuffle [EMAIL PROTECTED] wrote: hi folks, this is driving me up the wall. Apologies for posting twice in the same week, I'm writing up a thesis. I wish to color-code some dots in an xy plot. I've got a csv file with various elements, one of which is the

[R] NA's in segmented

2008-10-03 Thread T.D.Rudolph
I am trying to fit a very simple broken stick model using the package segmented but I have hit a roadblock. str(data) 'data.frame': 18 obs. of 2 variables: $ Bin : num 0.25 0.75 1.25 1.75 2.25 2.75 3.25 3.75 4.25 4.75 ... $ LnFREQ: num 5.06 4.23 3.50 3.47 2.83 ... I fit the lm

Re: [R] merge

2008-10-03 Thread stephen sefick
if you want to include all everything the add the argument all=TRUE there is also a all.x and all.y which are explained in the documentation. hope this helps On Fri, Oct 3, 2008 at 4:48 PM, kayj [EMAIL PROTECTED] wrote: Hi All, I want to merge file 2 into file 1 , is it possible to get the

[R] Ragged time series data

2008-10-03 Thread Joe Kaser
Hi and thanks in advance, I am fairly new with R so I hope this problem isn't too amateur. I have a vector of count data which correspond to vectors of date (%m/%d/%Y) and time of day (%H:%M:%S). I am trying to compute various statistics (e.g. daily max) by lumping the data together by day. I

Re: [R] time segments intersection

2008-10-03 Thread [Ricardo Rodriguez] Your XEN ICT Team
Hi! [Ricardo Rodriguez] Your XEN ICT Team wrote: Thanks Gabor, Gabor Grothendieck wrote: If those do not work try installing some other packages, e.g. chron, to see if you can install anything. If you still have problems there is something wrong with your installation. Ask on the

Re: [R] time segments intersection

2008-10-03 Thread Gabor Grothendieck
On Fri, Oct 3, 2008 at 7:47 PM, [Ricardo Rodriguez] Your XEN ICT Team [EMAIL PROTECTED] wrote: Hi! [Ricardo Rodriguez] Your XEN ICT Team wrote: Thanks Gabor, Gabor Grothendieck wrote: If those do not work try installing some other packages, e.g. chron, to see if you can install

Re: [R] Ragged time series data

2008-10-03 Thread stephen sefick
If you want quick and reliable help it is always best to provide a reproducible example. I learned this after much reminding. The rational is if you do the work to frame the problem then answers can be provided swiftly and correctly with the least amount of headache on both sides of the email.

Re: [R] Ragged time series data

2008-10-03 Thread Gabor Grothendieck
Check out the zoo package and its three vignettes and ?aggregate.zoo in particular. Also have a look at the article on dates and times in R News 4/1 and note the chron class which, in fact, accepts inputs in the very form you have. On Fri, Oct 3, 2008 at 7:39 PM, Joe Kaser [EMAIL PROTECTED]

[R] font color

2008-10-03 Thread kayj
Hi , I was wondering if we can color the font in R ? thanks -- View this message in context: http://www.nabble.com/font-color-tp19807473p19807473.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

[R] help regarding levels

2008-10-03 Thread K3
When i try to extract a column of data from an excel file and assign it to a variable , say x, it does assign the column of data as well as different levels. it looks something like this when i print. [1] 6.91 5.89 7.44 8.82 80 Levels: 1.43 102.07 103.65 106.21 106.24 107.15 108.58 11.19 ... so

Re: [R] 3D scatter, groups, RdbiPgSQL...

2008-10-03 Thread Tomas Lanczos
Thank You for Your answer, Duncan, Duncan Murdoch wrote: On 03/10/2008 4:33 AM, Tomas Lanczos wrote: hello, I wish to create some 3d scatter diagrams visualising different grouped data set by a given field in the database. I tried the scatterplot3d package, as well as the plot3d and

Re: [R] merge

2008-10-03 Thread kayj
Thanks , but I want to find out the elements that were NOT merged from file2? stephen sefick wrote: if you want to include all everything the add the argument all=TRUE there is also a all.x and all.y which are explained in the documentation. hope this helps On Fri, Oct 3, 2008 at

Re: [R] Splitting a file into multiple files based on the column name

2008-10-03 Thread jim holtman
You can read the data in, then use 'grep' to determine which rows match, then write the files out: x - read.table() rowIndx - grep(Sick|CB, x$col) write.table(x[rowIndx,], file=match) write.table(x[-rowIndx,], file=nomatch) On Fri, Oct 3, 2008 at 2:48 PM, kayj [EMAIL PROTECTED] wrote: Hi,

Re: [R] help regarding levels

2008-10-03 Thread Steven McKinney
Your column of data has some character data in it, perhaps an Excel #VALUE! or a blank or some such entry not strictly numeric. When R reads in such a column, it makes that column variable into a 'factor' variable instead of a numeric variable, because the values are not all numeric. You can

Re: [R] aggregate empty row for pretty appearance also subtotal if possible

2008-10-03 Thread jim holtman
You can try reshape: n - 2000 x - data.frame(a=sample(letters[1:2],n,TRUE), b=sample(LETTERS[1:2],n,TRUE), + c=sample(month.abb[1:2], n, TRUE), d=sample(LETTERS[25:26], n, TRUE), value=runif(n)) str(x) 'data.frame': 2000 obs. of 5 variables: $ a: Factor w/ 2 levels a,b: 2 1 2 1 1 2

Re: [R] color code from csv

2008-10-03 Thread Yihui Xie
So you have two problems: (1) integers to colors (2) hexadecimal values to colors They are quite different problems, I think. For the first one, you have to look at ?palette to know how integers are mapped to colors via the palette; and the second problem seems to be that 'read.csv()' has treated

Re: [R] font color

2008-10-03 Thread Yihui Xie
Hi, isn't the 'col' argument sufficient? e.g. plot(1:26,pch=letters,col=1:26) 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, Renmin