Re: [R] group by-like statement for 2-row matrix

2009-04-08 Thread Hans-Henning Gabriel
Luc, Eik, Jorge, thanks to all of you! Nice to see how many different solutions there are for the same problem. :) Best Henning Am 07.04.2009 um 22:25 schrieb Jorge Ivan Velez: > > Dear Hans, > > Try also: > > x <- structure(c(2, 1, 2, 1, 3, 2, 4, 1, 4, 3, 4, 3, 5, 2, 5, 1, 6, > 1), .Dim

Re: [R] Re ading Excel 5.0 files with RODBC?

2009-04-08 Thread Yuri Volchik
Thanks for reply David, but the problem is that the place i get those files from saves them in the old Excel format (Excel 5.0), not Excel 97-2003, so neither of the packages (RODBC, xlsReadWrite) can read it. >Your question is a bit confusing. This is the current state of play >regarding read

[R] References for elliptical2d(fCopulae)

2009-04-08 Thread caspar
Dear R-mailing list, I am using the fCopulae package. Where can I find the relevant references for functions such as elliptical2d( ) ? I am particularly interested in references pointing out how the correlation coefficients can be incorporated in such density functions. Thanks in advance Ca

[R] Student

2009-04-08 Thread alberto cassese
Hi, I have problem. In the function below (test and test2) i want the function test not to print the variable data but i want the function test2 to use the variable test$data. This is the creation of the variable data: > matrice=c(1:10) > matrice=matrix(matrice,nrow=5,ncol=2) This is the functi

[R] help loading an svm model from file

2009-04-08 Thread J Biel
Hi R-experts, I'm using the svm implentation available in the library 'e1071', to train a classifier using cross validation (...) obj = tune.svm(truth ~ ., data=examples,cost=2^(grid.cost),gamma=2^(grid.gamma),cross=k) and to save the best model into a file as ?write.svm suggests: write.sv

[R] asymptotic convergence intervall for poisson regression

2009-04-08 Thread soxx
Hello! The following code is an implementation of a Poisson regression. It generates some data-samples and computes the beta values with the negative log likelihood function. Now, my task is to compute the asymptotic convergence intervalls for the values of beta but I dont know how to implement t

[R] [R-pkgs] tcltk - control message while the program is running

2009-04-08 Thread srpd TCLTK
Hi, We are trying to write control messages (errors, warnings, ...) to a tktable while the program is running. Until now we only managed to write all the messages at once at the end of execution. How can we refresh the window in order to show the tclArray content? -

Re: [R] Re ading Excel 5.0 files with RODBC?

2009-04-08 Thread Prof Brian Ripley
On Wed, 8 Apr 2009, Yuri Volchik wrote: Thanks for reply David, but the problem is that the place i get those files from saves them in the old Excel format (Excel 5.0), not Excel 97-2003, so neither of the packages (RODBC, xlsReadWrite) can read it. RODBC supports any format for which an ODB

Re: [R] Minimum Spanning Tree

2009-04-08 Thread Gábor Csárdi
On Tue, Apr 7, 2009 at 11:06 PM, jpearl01 wrote: > > There was an error in the file... an extraneous comma.  That's taken care of. > however, my tree prints out an image that doesn't seem like a mst.  Attached > is the csv file I used... Well, it looks definitely a tree to me. > http://www.nabbl

Re: [R] Annotation rgl plot

2009-04-08 Thread Yuri Volchik
Thanks for a great package Duncan, one of the most amazing things i saw for R platform. In the meanwhile i can do with you suggestion: par3d(ignoreExtent=TRUE); -- View this message in context: http://www.nabble.com/Annotation-rgl-plot-tp22930428p22945459.html Sent from the R help mailing list

Re: [R] Student

2009-04-08 Thread Hans Ekbrand
On Wed, Apr 08, 2009 at 10:02:10AM +0200, alberto cassese wrote: > Hi, > I have problem. In the function below (test and test2) i want the function > test not to print the variable data but i want the function test2 to use the > variable test$data. > > This is the creation of the variable data: >

[R] Tinn-R pdf()

2009-04-08 Thread Henning Wildhagen
Dear R and Tinn-R users, i recently switched to Tinn-R and sending code to R works fine (R 2.8.1, Tinn-R 2.2.0.2, OS Windows XP). However, i encountered a problem when trying to send plots to pdf files like this: library(lattice) pdf("plot1.pdf") PLOT<-(xyplot, ...) PLOT dev.off() The file "p

[R] Clear all with/without function()

2009-04-08 Thread Taraxacum88
why rm(list=ls(all=TRUE),envir=globalenv()) is ok but ca<-function() rm(list=ls(all=TRUE),envir=globalenv()) ca() does not work? Thank you! v -- View this message in context: http://www.nabble.com/Clear-all-with-without-function%28%29-tp22947021p22947021.html Sent from the R help mailin

[R] read.spss, locale and encodings

2009-04-08 Thread Hans Ekbrand
I must be missing something obvious here: According to the help page for read.spss, the reencode option is only active when R is run under a UTF-8 locale. read.spss can only import the SPSS file when run under a iso88591(5) locale, under a UTF-8 locale I get: Error in read.spss("wo.sav") : error

Re: [R] Clear all with/without function()

2009-04-08 Thread Duncan Murdoch
Taraxacum88 wrote: why rm(list=ls(all=TRUE),envir=globalenv()) is ok but ca<-function() rm(list=ls(all=TRUE),envir=globalenv()) ca() does not work? ls(all=TRUE) from within your function lists all local variables, not globals. You need envir=globalenv() there too. Duncan Murdoch

Re: [R] Tinn-R pdf()

2009-04-08 Thread ONKELINX, Thierry
Dear Henning, You need to print() lattice plots when using a device: library(lattice) pdf("plot1.pdf") PLOT<-(xyplot, ...) print(PLOT) dev.off() So this is not due to TINN-R. HTH, Thierry ir. Thierry Onkelinx Inst

Re: [R] change default output size when using Sweave

2009-04-08 Thread baptiste auguie
On 8 Apr 2009, at 11:44, Duncan Murdoch wrote: Mark Heckmann wrote: Dear Duncan, Thanks for the reply. This works, but unfortunately I need a different solution. My script is supposed to run completely automated and the graphics I produce vary in size each time I run the script. But I wan

Re: [R] Tinn-R pdf()

2009-04-08 Thread Henning Wildhagen
Dear Thierry, thanks for your help, with solved the problem, although i don't why, because when using the R editor accessible via the R console i created many many lattice plots with the code i posted, i.e. without the print() command. Anyway, thanks a lot, Henning > >

[R] factor, as.factor and levels

2009-04-08 Thread Heinz Tuechler
Dear All, to my surprise as.factor does not accept a levels argument. Maybe I did not read the documentation well enough. See the example below. I wanted to use ch1 as factor in the newdata argument of survfit, so I assumed that I could write as.factor(ch1, levels=ch1), since the order should

[R] help with random forest package

2009-04-08 Thread Chrysanthi A.
Hello, I am a phd student in Bioinformatics and I am using the Random Forest package in order to classify my data, but I have some questions. Is there a function in order to visualize the trees, so as to get the rules? Also, could you please provide me with the code of "randomForest" function, as

Re: [R] factor, as.factor and levels

2009-04-08 Thread Heinz Tuechler
Thank you, Jim. I see, the fact that in the documentation you find only "as.factor(x)" means that it does not accept more arguments. Does as.factor have speed advantages over factor, or is there a different cause for it's existence? Heinz At 13:50 08.04.2009, jim holtman wrote: as.factor do

Re: [R] Sequences

2009-04-08 Thread Eik Vettorazzi
Hi Melissa, so what you want to calculate is something like S<-cumsum(lambs)-(1:length(lambs))*mean(lambs) since (with x.bar=mean(x)) S_1=x_1-x.bar S_2=S1+(x_2-x.bar)=x_1-x.bar+x_2-x_bar=x_1+x_2-2*x.bar ... S_n=S_(n-1)+x_n-x.bar=sum_i (x_i)-n*x.bar Eik. m.mcquil...@lancaster.ac.uk schrieb: Hi

Re: [R] change default output size when using Sweave

2009-04-08 Thread Duncan Murdoch
Mark Heckmann wrote: Dear Duncan, Thanks for the reply. This works, but unfortunately I need a different solution. My script is supposed to run completely automated and the graphics I produce vary in size each time I run the script. But I want the graphics to be fitted to my .pdf output without

Re: [R] Tinn-R pdf()

2009-04-08 Thread Tobias Verbeke
Hi Henning, thanks for your help, with solved the problem, although i don't why, because when using the R editor accessible via the R console i created many many lattice plots with the code i posted, i.e. without the print() command. At the command line, R objects (including lattice plots wh

[R] Convert data frame containing time stamps to time series

2009-04-08 Thread amvds
I read records using scan: dat<-data.frame(scan(file="KDA.csv",what=list(t="%m/%d/%y %H:%M",f=0,p=0,d=0,o=0,s=0,a=0,l=0,c=0),skip=2,sep=",",nmax=np,flush=TRUE,na.strings=c("I/OTimeout","ArcOff-line"))) which results in: > dat[1:5,] t fp d o sa l c 1 1/21/09 5:01 161

[R] Howto Plot With Transparent Background

2009-04-08 Thread Gundala Viswanath
Is there a way to do it in R? Especially generating plot in EPS/PDF format. By transparent I mean clear (not white) background. I want to attached it to dark PPT slides. - Gundala Viswanath __ R-help@r-project.org mailing list https://stat.ethz.ch/mail

Re: [R] Clear all with/without function()

2009-04-08 Thread baptiste auguie
clr <- function () rm(list = ls(pos = .GlobalEnv), pos = .GlobalEnv) this works for me HTH, baptiste On 8 Apr 2009, at 10:50, Taraxacum88 wrote: why rm(list=ls(all=TRUE),envir=globalenv()) is ok but ca<-function() rm(list=ls(all=TRUE),envir=globalenv()) ca() does not work? Thank yo

[R] Null-Hypothesis

2009-04-08 Thread Benedikt Niesterok
Hello R users, I've used the following help two compare two regression line slopes. Wanted to test if they differ significantly: Hi, I've made a research about how to compare two regression line slopes (of y versus x for 2 groups, "group" being a factor ) using R. I knew the method based on th

Re: [R] newbie query: simple crosstabs

2009-04-08 Thread Bernardo Rangel Tura
On Tue, 2009-04-07 at 16:33 -0400, Donald Braman wrote: > I've been playing around with various table tools, trying to construct a > fairly simple cross-tab. It shouldn't be hard, but for some reason it > turning out to be (for me). > > If I want to see how many men and how many women agree with

Re: [R] factor, as.factor and levels

2009-04-08 Thread jim holtman
as.factor does not accept levels as an argument. use the first form that you have factor(ch1, levels=ch1) On Wed, Apr 8, 2009 at 7:36 AM, Heinz Tuechler wrote: > Dear All, > > to my surprise as.factor does not accept a levels argument. Maybe I did not > read the documentation well enough. See

Re: [R] change default output size when using Sweave

2009-04-08 Thread Mark Heckmann
Dear Duncan, Thanks for the reply. This works, but unfortunately I need a different solution. My script is supposed to run completely automated and the graphics I produce vary in size each time I run the script. But I want the graphics to be fitted to my .pdf output without specifying the height a

[R] does grid.rect() not accept NULL argument from gpar(col=NULL) ?

2009-04-08 Thread Mark Heckmann
I want to draw a grid rectangle without a border. ?gpar says: "Specifying the value NULL for a parameter is the same as not specifying any value for that parameter, except for col and fill, where NULL indicates not to draw a border or not to fill an area (respectively)." pushViewport(viewport(h

Re: [R] Null-Hypothesis

2009-04-08 Thread Eik Vettorazzi
Hi Benedikt in principle this is correct. A p-value less than a prespecified alpha-level leads to rejection of the null hypothesis H0. I'm a little bit puzzled about your given p-value, since actually your slopes are the same, so H0 is valid but rejected. This might be a matter of chance, but i

Re: [R] Howto Plot With Transparent Background

2009-04-08 Thread baptiste auguie
with base graphics, par(bg=NA) see ?par Hope this helps, baptiste On 8 Apr 2009, at 12:54, Gundala Viswanath wrote: Is there a way to do it in R? Especially generating plot in EPS/PDF format. By transparent I mean clear (not white) background. I want to attached it to dark PPT slides. -

Re: [R] Simulate binary data for a logistic regression Monte Carlo

2009-04-08 Thread Ben Bolker
Rolf Turner-3 wrote: > > > On 8/04/2009, at 1:27 PM, Ben Bolker wrote: > > > >> I agree that that the individual-level random effect is probably >> the issue. >> I played with this some today but didn't manage to resolve it -- >> tried JAGS/R2jags and glmer from lme4 but didn't mana

Re: [R] Convert data frame containing time stamps to time series

2009-04-08 Thread Gabor Grothendieck
Try varying the arguments to this to accommodate the precise format of your data. See the three zoo vignettes, ?read.zoo and R News 4/1 for dates and times. > Lines <- "t,f,p,d,o,s,a,l,c + 1/21/09 5:01,16151,8.2,76,30,282,1060,53,7 + 1/21/09 5:02,16256,8.3,76,23,282,1059,54,7 + 1/21/09 5:03,16150

[R] Genstat into R - Randomisation test

2009-04-08 Thread Anne Kempel
Hello everybody, I have a question. I would like to get a correlation between constitutive and induced plant defence which I messured on 30 plant species. So I have table with Species, Induced defence (ID), and constitutive defence (CD). Since Induced and constitutive defence are not independa

Re: [R] read.spss, locale and encodings

2009-04-08 Thread Peter Dalgaard
Hans Ekbrand wrote: I must be missing something obvious here: According to the help page for read.spss, the reencode option is only active when R is run under a UTF-8 locale. Not in my version: reencode: logical: should character strings be re-encoded to the current locale. The def

Re: [R] Howto Plot With Transparent Background

2009-04-08 Thread Eik Vettorazzi
if you not persist in using pdf, the emf format works very well with PPT and has a transparent background. Its the way you copy&paste pdf-graphs form Acrobat to PPT which causes the solid (white) background - unfortunately ppt has no builtt in support for pdf-graphs. By default pdfs have a tra

Re: [R] factor, as.factor and levels

2009-04-08 Thread jim holtman
It is just a simple version of 'factor'. The only speed advantage it might have is that it checks to see if it is a factor first. Here is the definition: )> as.factor function (x) if (is.factor(x)) x else factor(x) You can always list out what the function does to get a better understanding of

Re: [R] read.spss, locale and encodings

2009-04-08 Thread Hans Ekbrand
On Wed, Apr 08, 2009 at 03:03:06PM +0200, Peter Dalgaard wrote: > Hans Ekbrand wrote: >> I must be missing something obvious here: >> >> According to the help page for read.spss, the reencode option is only >> active when R is run under a UTF-8 locale. > > Not in my version: > > reencode: logical:

Re: [R] factor, as.factor and levels

2009-04-08 Thread Heinz Tuechler
Jim - you are right, I should have looked before. So there is a difference that should also effect the dropping of unused levels. Thanks, Heinz At 15:31 08.04.2009, jim holtman wrote: It is just a simple version of 'factor'. The only speed advantage it might have is that it checks to see if

[R] sourced plot commands not working

2009-04-08 Thread SHANE MILLER, BLOOMBERG/ 731 LEXIN
I have source a script running with no errors that ends in these lines: == for (i in 2:3) win.graph() dev.set(2) levelplot(avg ~ procs * size, rrt, drape=T, colorkey=T,main="ops/sec",scales=list(x=list(tick.number=15),y=list(log=10))) dev.set(3) levelplot(avg ~ procs * size, ort, drape

Re: [R] Pulling data into a model

2009-04-08 Thread Luc Villandre
Hi Jacy, I'll take my chances answering your question. I'd suggest using the paste() function and then transforming the string into a formula object: my.formula = as.formula(paste("y~x1+x2+",paste(colnames(REG)[2:num],collapse="+"), sep= "")) ; aov(my.formula,data=REG) ; The first line

[R] R File I/O Capability - Writing output to specific lines of existing file

2009-04-08 Thread Jason Rupert
Currently I am using the R "write" command to output results to a *.txt file and then copying those results into an initialization file. In an attempt to continue to automate the process I would like to have R write to the location in the existing initialization file, instead of me copying the

Re: [R] sourced plot commands not working

2009-04-08 Thread Gavin Simpson
On Wed, 2009-04-08 at 10:05 -0400, SHANE MILLER, BLOOMBERG/ 731 LEXIN wrote: > I have source a script running with no errors that ends in these lines: > == > for (i in 2:3) win.graph() > dev.set(2) > levelplot(avg ~ procs * size, rrt, drape=T, > colorkey=T,main="ops/sec",scales=list(x=

[R] default print format for large numbers

2009-04-08 Thread SHANE MILLER, BLOOMBERG/ 731 LEXIN
Numbers like ``1239178547.653775" is inserted into a vector. I print the vector: > route_9_80_end [1] 1239178522 1239178526 1239178524 1239178524 1239178524 1239178523 1239178524 1239178522 1239178521 1239178565 1239178566 1239178566 [13] 1239178565 1239178566 1239178566 1239178565 1239178566 12

Re: [R] read.spss, locale and encodings

2009-04-08 Thread Peter Dalgaard
Hans Ekbrand wrote: On Wed, Apr 08, 2009 at 03:03:06PM +0200, Peter Dalgaard wrote: Hans Ekbrand wrote: I must be missing something obvious here: According to the help page for read.spss, the reencode option is only active when R is run under a UTF-8 locale. Not in my version: reencode: logi

Re: [R] sourced plot commands not working

2009-04-08 Thread Gavin Simpson
[Ooops, brain/fingers not well connected today, sent prematurely] On Wed, 2009-04-08 at 10:05 -0400, SHANE MILLER, BLOOMBERG/ 731 LEXIN wrote: > I have source a script running with no errors that ends in these lines: > == > for (i in 2:3) win.graph() > dev.set(2) > levelplot(avg ~ proc

Re: [R] binary version of R 2.8.x

2009-04-08 Thread stephen sefick
./configure works with no errors ? I have compiled on mac os x and debian so my advice may be circumspect, but the errors I don't know what they are. On Tue, Apr 7, 2009 at 10:17 PM, wrote: > > > Hello, > > Is there any binary version of R 2.8.x available for x86 Solaris 10?  I need > it so tha

Re: [R] Re ading Excel 5.0 files with RODBC?

2009-04-08 Thread Yuri Volchik
Seems like the place where i get those files from has an error somewhere when they create the file which doesn't allow ODBC to see sheet with data, i.e sqlTables returns: [1] TABLE_CAT TABLE_SCHEM TABLE_NAME TABLE_TYPE REMARKS <0 rows> (or 0-length row.names) When i open this file in exce

Re: [R] Genstat into R - Randomisation test

2009-04-08 Thread Mike Lawrence
Looks like that code implements a non-exhaustive variant of the randomization test, sometimes called a permutation test. Assuming you have a data frame with columns ID & CD, this should do it: n.obs = 100 ID=rnorm(n.obs) CD=rnorm(n.obs) obs.cor = cor(ID,CD) num.permutations = 1e4 perm.cor = rep(

Re: [R] Genstat into R - Randomisation test

2009-04-08 Thread Mike Lawrence
"Assuming you have a data frame with columns ID & CD, this should do it" Oops, the code I sent doesn't assume this. It assumes that you have two vectors, ID & CD, as generated in the first 3 lines. On Wed, Apr 8, 2009 at 11:31 AM, Mike Lawrence wrote: > Looks like that code implements a non-exha

Re: [R] Genstat into R - Randomisation test

2009-04-08 Thread Mike Lawrence
*Hits head* Of course, the approach taken by your Genstat code of only shuffling one variable is sufficient and faster: n.obs = 100 ID=rnorm(n.obs) CD=rnorm(n.obs) obs.cor = cor(ID,CD) num.permutations = 1e4 perm.cor = rep(NA,num.permutations) start.time=proc.time()[1] index = 1:n.obs for(i in 1

Re: [R] default print format for large numbers

2009-04-08 Thread Richard . Cotton
> Numbers like ``1239178547.653775" is inserted into a vector. I print > the vector: > > > route_9_80_end > [1] 1239178522 1239178526 1239178524 1239178524 1239178524 > 1239178523 1239178524 1239178522 1239178521 1239178565 1239178566 1239178566 > [13] 1239178565 1239178566 1239178566 123917856

Re: [R] Genstat into R - Randomisation test

2009-04-08 Thread Mike Lawrence
*sigh* and the elapsed time line should be: cat('Elapsed time:',proc.time()[1]-start.time) On Wed, Apr 8, 2009 at 11:35 AM, Mike Lawrence wrote: > *Hits head* > Of course, the approach taken by your Genstat code of only shuffling > one variable is sufficient and faster: > > n.obs = 100 > ID=rn

[R] persp3d and rgl.viewpoint for rotating 3D plots

2009-04-08 Thread Camarda, Carlo Giovanni
Dear R-users, within the rgl-package, I would have a question about the usage of persp3d in combination of rgl.viewpoint. I am not able to figure out how to let a 3D plot rotating around likewise the example in ?rgl.viewpoint. It seems that when I use persp3d(...) I see something on my scr

Re: [R] read.spss, locale and encodings

2009-04-08 Thread Hans Ekbrand
On Wed, Apr 08, 2009 at 04:17:51PM +0200, Peter Dalgaard wrote: > Hans Ekbrand wrote: >> Someone running foreign 8.34 that is willing to test my SPSS-file? > > Someone with an SPSS file problem willing to help test the prereleases? :-) http://sociologi.cjb.net/temp/test.sav -- Hans Ekbrand (http

Re: [R] persp3d and rgl.viewpoint for rotating 3D plots

2009-04-08 Thread Duncan Murdoch
On 4/8/2009 11:01 AM, Camarda, Carlo Giovanni wrote: Dear R-users, within the rgl-package, I would have a question about the usage of persp3d in combination of rgl.viewpoint. I am not able to figure out how to let a 3D plot rotating around likewise the example in ?rgl.viewpoint. It seems th

[R] Is a point into an ellipse

2009-04-08 Thread Alain Guillet
Hi, I drew an ellipse with the package ellipse. Now I would like to know if a point is inside the ellipse. Is any R functions to do it without computing the equation of the ellipse manually? Thanks. For example, if I do "plot(ellipse(0.8), type = 'l')", I would like to know if (0,1) belongs

[R] predict "interval" for lmRob?

2009-04-08 Thread Galkowski, Jan
lm's "predict" function offers an "interval" parameter to choose between 'confidence' and 'prediction' bands. In the package "robust" and for "lmRob", there is also a "predict" but it lacks such a parameter, and the documented "type" parameter has only "response" offerred. Is there some way of

Re: [R] [OT ?] rant (was : Re: Conversions From standard to metric units)

2009-04-08 Thread Michael Dewey
At 00:48 04/04/2009, Duncan Murdoch wrote: On 03/04/2009 5:37 PM, Emmanuel Charpentier wrote: Le vendredi 03 avril 2009 à 14:17 -0400, stephen sefick a écrit : I am starting to use R for almost any sort of calculation that I need. I am a biologist that works in the states, and there is often

[R] vectors on top of contours, and lattice

2009-04-08 Thread Cable, Samuel B Civ USAF AFMC AFRL/RVBXI
OK, I needed to plot a set of vectors on top of a contour plot. I figured out a way to do this. I create a panel function that calls "larrows()" with arguments constructed from my vector data. Then, when I go to do the contour plot, I call contourplot() with the "panel" argument set to point to

Re: [R] Howto Plot With Transparent Background

2009-04-08 Thread Christof Winter
Eik Vettorazzi wrote, On 08.04.2009 15:08: By default pdfs have a transparent background, see ?pdf and there the bg part, which can be proven by a minimal R+ LaTeX example #R code pdf("test.pdf") plot(1,1) dev.off() #minimal tex example \documentclass[a4paper,12pt]{article} \usepackage[svgname

Re: [R] persp3d and rgl.viewpoint for rotating 3D plots

2009-04-08 Thread Camarda, Carlo Giovanni
Dear Duncan, thanks for your prompt reply. I was tempted to use movie3d, but below I copied what I get on my PC. Then, I have ImageMagick installed and, though I set convert equal to FALSE, I was not able to find where the function writes the .png files. Maybe I lack experience in manag

Re: [R] Convert data frame containing time stamps to time series

2009-04-08 Thread amvds
Converting dates is getting stranger still. I am coercing a data frame into a ts as follows: tst1<-as.POSIXct("1/21/09 5:01",format="%m/%d/%y %H:%M") tst2<-as.POSIXct("1/28/09 3:40",format="%m/%d/%y %H:%M") tsdat<-as.ts(dat,start=tst1,end=tst2,frequency=1) This generates a ts object. But strange

Re: [R] persp3d and rgl.viewpoint for rotating 3D plots

2009-04-08 Thread Duncan Murdoch
On 4/8/2009 11:47 AM, Camarda, Carlo Giovanni wrote: Dear Duncan, thanks for your prompt reply. I was tempted to use movie3d, but below I copied what I get on my PC. Then, I have ImageMagick installed and, though I set convert equal to FALSE, I was not able to find where the function writes th

[R] Col Names

2009-04-08 Thread livia
Hello, I am working with S-plus TimeSeries Object. I wonder how can I change the column names of the variable instead of using the one default? i.e to change "DEV.MSCI" to other name PositionsDEV.MSCI 04/30/1980 00:00:00.000 -0.0150328542 05/31/1980 00:00:00.000 0.0

[R] problem with creating a netcdf file under script sh

2009-04-08 Thread tuatu
Hi everyone, I try to make a netcdf file which disposes a difference between 2 variables of 2netcdf files the same dimension When I programmed under R, everything is ok but when I put the code under EOF of a sh script, an error occurs: "Error, passed variable has a dim that is NOT of class dim.

[R] Reshape - strange outputs

2009-04-08 Thread Steve Murray
Dear R Users, I am using the reshape package to reformat gridded data into column format using the code shown below. However, when I display the resulting object, a single column is fomed (instead of three) and all the latitude values (which should be in either column one or two) are collected

Re: [R] Is a point into an ellipse

2009-04-08 Thread Duncan Murdoch
On 4/8/2009 11:17 AM, Alain Guillet wrote: Hi, I drew an ellipse with the package ellipse. Now I would like to know if a point is inside the ellipse. Is any R functions to do it without computing the equation of the ellipse manually? Thanks. For example, if I do "plot(ellipse(0.8), type = '

[R] Sweave problem, with multicolumn tables from R to LaTeX

2009-04-08 Thread Christian Salas
Hi there, I have been using the example provided bellow for a while, and It was working without any problem. Nevertheless, just since 2-3 days is not working, probably because I did update.packages(). I have tried to re-install the older versions of the packages Hmisc() and xtable(), but stil

Re: [R] Col Names

2009-04-08 Thread jim holtman
Is this what you are looking for: > x Positions DEV.MSCI 04/30/1980 00:00:00.000 -0.0150328542 05/31/1980 00:00:00.000 0.0005087752 06/30/1980 00:00:00.000 0.0586794492 07/31/1980 00:00:00.000 0.0458505592 08/31/1980 00:00:00.000 0.0350926728 > colnames(x)[2] <- "NewName" >

[R] Colour each letter of a text string in a plot

2009-04-08 Thread Daren Tan
I am inserting a DNA sequence into a plot, and hope to colourize each of the four nucleotide of the DNA sequence with a unique colour i.e., A ("red"), C ("green"), G ("blue", and T ("yellow"). I use the following codes, but the DNA sequence only shows as "red" DNA <- "ACGT" plot(1, xlim = c(0,1)

Re: [R] Genstat into R - Randomisation test

2009-04-08 Thread Peter Dalgaard
Mike Lawrence wrote: Looks like that code implements a non-exhaustive variant of the randomization test, sometimes called a permutation test. Isn't it the other way around? (Permutation tests can be exhaustive by looking at all permutations, if a randomization test did that, then it wouldn't

Re: [R] Tinn-R pdf()

2009-04-08 Thread Deepayan Sarkar
On 4/8/09, Tobias Verbeke wrote: > Hi Henning, > > > > thanks for your help, with solved the problem, although i don't why, > because when using the R editor accessible via the R console i created many > many lattice plots with the code i posted, i.e. without the print() command. > > > > At the c

Re: [R] Colour each letter of a text string in a plot

2009-04-08 Thread jim holtman
Use 'text' to write out each one: plot(0, type='n', xlim=c(0,1), ylim=c(0,1)) text(seq(0,1,length=10), rep(0.5,10), LETTERS[1:10], col=1:10) On Wed, Apr 8, 2009 at 12:15 PM, Daren Tan wrote: > I am inserting a DNA sequence into a plot, and hope to colourize each > of the four nucleotide of the

Re: [R] vectors on top of contours, and lattice

2009-04-08 Thread Deepayan Sarkar
On 4/8/09, Cable, Samuel B Civ USAF AFMC AFRL/RVBXI wrote: > OK, I needed to plot a set of vectors on top of a contour plot. I > figured out a way to do this. I create a panel function that calls > "larrows()" with arguments constructed from my vector data. Then, when > I go to do the contou

[R] Comparing Proportions Among Groups

2009-04-08 Thread Isabella Ghement
Hi everyone, I am trying to compare proportions among groups using the logistic regression approach as follows: 1) Fit the model log(p_i/(1-p_i)) = M + G_i, where p_i is the probability of success in group i and G_i is the effect of group i, i=1,..,I. 2) Test the hypotheses: Ho: G_1 = G_2 =

Re: [R] axis values on lattice log-scale plot

2009-04-08 Thread Deepayan Sarkar
On 4/7/09, Don McKenzie wrote: > I'm plotting the following (stripped of inessentials) > > xyplot(sd ~ distance | > wshed,data=sdvar.df,scales=list(x=list(log=TRUE),y=list(log=TRUE))) > > sdvar.df is a data frame, sd and distance are numeric, wshed is an ordered > factor > > trying to replicat

Re: [R] Constrained, multiple response statistics

2009-04-08 Thread Gene Leynes
This sounds very similar to what I've been working on, but I'm not sure without an example. My solution has been to use an optimization that normalizes inside the objective function. The betas that are provided by optim are not normalized, however since they were normalized inside the objective f

Re: [R] binary version of R 2.8.x

2009-04-08 Thread tomkur2006-takehome
Yes, ./configure works with no error. I guess it's a problem of my environment setup. It's my first attempt to build it myself, and I have downloaded the binaries and installed it previously. --- On Wed, 4/8/09, stephen sefick wrote: > From: stephen sefick > Subject: Re: [R] binary version

[R] subscript out of bounds in eqscplot problem

2009-04-08 Thread Pierre Moffard
Dear R users, I have the following problem. Suppose I have the following toy data set: > data m1 m2 m3 m4 m5 state [1,] 1 0 1 13 23 2 [2,] 0 1 0 23 94 2 [3,] 1 0 0 45 56 1 [4,] 0 1 0 35 84 2 [5,] 1 1 0 98 37 1 [6,] 1 1 0 68 1 2 where the

[R] MLE for bimodal distribution

2009-04-08 Thread _nico_
Hello everyone, I'm trying to use mle from package stats4 to fit a bi/multi-modal distribution to some data, but I have some problems with it. Here's what I'm doing (for a bimodal distribution): # Build some fake binormally distributed data, the procedure fails also with real data, so the proble

Re: [R] Minimum Spanning Tree

2009-04-08 Thread jpearl01
>I am not sure what you mean. Of course you can plot it using different >layouts, e.g. with layout.reingold.tilford (after choosing the root >vertex in some way) and then it looks like a usual tree plot, but why >would that be any better? I'd like to be able to distinguish between the nodes bett

Re: [R] Genstat into R - Randomisation test

2009-04-08 Thread Mike Lawrence
I was taught that Fisher proposed the F-test as a computationally simpler approximation to what he called a "Randomization test", consisting of exhaustive permutations. I never looked at the original Fisher reference myself, so this may be false. However, I haven't observed a consistent nomenclatu

Re: [R] binary version of R 2.8.x

2009-04-08 Thread stephen sefick
Does solaris have a package managment system? And do you have all of the packages for building? It looks like you do, but I am not sure. On Wed, Apr 8, 2009 at 12:42 PM, wrote: > > Yes, ./configure works with no error. > I guess it's a problem of my environment setup.  It's my first attempt to

Re: [R] Convert data frame containing time stamps to time series

2009-04-08 Thread stephen sefick
have you tried using zoo and then using the function as.ts() On Wed, Apr 8, 2009 at 11:56 AM, wrote: > Converting dates is getting stranger still. I am coercing a data frame > into a ts as follows: > > > tst1<-as.POSIXct("1/21/09 5:01",format="%m/%d/%y %H:%M") > tst2<-as.POSIXct("1/28/09 3:40",f

Re: [R] Reshape - strange outputs

2009-04-08 Thread stephen sefick
can you provide a reproducible example? On Wed, Apr 8, 2009 at 11:59 AM, Steve Murray wrote: > > Dear R Users, > > I am using the reshape package to reformat gridded data into column format > using the code shown below. However, when I display the resulting object, a > single column is fomed (i

Re: [R] read.spss, locale and encodings

2009-04-08 Thread Peter Dalgaard
Hans Ekbrand wrote: On Wed, Apr 08, 2009 at 04:17:51PM +0200, Peter Dalgaard wrote: Hans Ekbrand wrote: Someone running foreign 8.34 that is willing to test my SPSS-file? Someone with an SPSS file problem willing to help test the prereleases? :-) http://sociologi.cjb.net/temp/test.sav No j

Re: [R] predict "interval" for lmRob?

2009-04-08 Thread Greg Snow
Your problem is related to the theory underlying linear models (and is an example as to why it is important to understand the theory, not just know how to plug numbers into a computer). The lm function is based on theory that assumes the y variable in normally distributed with the mean of that

Re: [R] Minimum Spanning Tree

2009-04-08 Thread Gábor Csárdi
On Wed, Apr 8, 2009 at 6:12 PM, jpearl01 wrote: > > >>I am not sure what you mean. Of course you can plot it using different >>layouts, e.g. with layout.reingold.tilford (after choosing the root >>vertex in some way) and then it looks like a usual tree plot, but why >>would that be any better? > >

Re: [R] Lattice Groups

2009-04-08 Thread Lyman, Mark
I don't understand your first question, but, since no one else has responded I can answer your second question. panel.bwplot, unlike panel.xyplot doesn't use panel.superpose when groups is not NULL. In order to get an analogous result you need to specify that you want to use panel.superpose. cols

Re: [R] read.spss, locale and encodings

2009-04-08 Thread Hans Ekbrand
On Wed, Apr 08, 2009 at 07:12:23PM +0200, Peter Dalgaard wrote: > Apparently, you can work around it like this > > lc <- Sys.setlocale("LC_CTYPE") > Sys.setlocale("LC_CTYPE", "da_DK") > x <- read.spss("~/Desktop/downloads/test.sav", reencode = "latin1") > Sys.setlocale("LC_CTYPE", lc) > > -- which

Re: [R] predict "interval" for lmRob?

2009-04-08 Thread Galkowski, Jan
Hi Greg, Thanks for your guidance. In this case, the evidence is that the primary subpopulation of the data, accounting for observes the standard statistical model in the sense that Rice uses the term. It may by all accounts be normally distributed, and a Q-Q shows a large portion of the pr

[R] Display a very low p-value

2009-04-08 Thread Bhoom Suktitipat
Hello R-Help, I ran some analysis and were hit with some low Z-score. I tried to convert it to a p-value, however, it seems like the ceiling is around 1e-16. > 1-pnorm(8) [1] 6.661338e-16 > 1-pnorm(9) [1] 0 Do you have any suggestion how I can display a very low p-value in the form of scientific

[R] xyplot - show values of a series on graph

2009-04-08 Thread taz9
Hi All, I have a very simple graph: cars <- c(1, 3, 6, 4, 9) trucks <- c(2, 5, 4, 5, 12) year <- c(2004, 2005, 2006, 2007, 2008) df2<-data.frame(cars,trucks,year) xyplot(cars+trucks~year, data=df2, type="o") I need to show the values of "cars" on the graph. How can I do this? Thanks. -- View

Re: [R] help with random forest package

2009-04-08 Thread Liaw, Andy
The source code of the whole package is available on CRAN. All packages are submitted to CRAN is source form. There's no "rule" per se that gives the final prediction, as the final prediction is the result of plural vote by all trees in the forest. You may want to look at the varUsed() and getTr

Re: [R] Display a very low p-value

2009-04-08 Thread stephen sefick
?options look at scipen On Wed, Apr 8, 2009 at 2:38 PM, Bhoom Suktitipat wrote: > Hello R-Help, > > I ran some analysis and were hit with some low Z-score. I tried to convert > it to a p-value, however, it seems like the ceiling is around 1e-16. > >> 1-pnorm(8) > [1] 6.661338e-16 >> 1-pnorm(9) >

Re: [R] Display a very low p-value

2009-04-08 Thread Dimitris Rizopoulos
in this case you need to use the 'lower.tail' argument, e.g., pnorm(8:15, lower.tail = FALSE) I hope it helps. Best, Dimitris Bhoom Suktitipat wrote: Hello R-Help, I ran some analysis and were hit with some low Z-score. I tried to convert it to a p-value, however, it seems like the ceiling

  1   2   >