Re: [R] R-package install

2008-07-25 Thread Prof Brian Ripley
We write manuals so that you can know how to do things in R. Package installation is covered in the 'R Installation and Administration' manual. We don't have the attachment, but assuming this was a source package I sugest you look into Uwe Ligges' win-builder service mentioned in that manual

Re: [R] Installation error for RCurl in Redhat enterrpise 5

2008-07-25 Thread Prof Brian Ripley
On Thu, 24 Jul 2008, Momin, Amin A wrote: I am getting the following error while trying to install the RCurl library. I have checked that the curl and the libcurl.so.3 is already installed in the /usr/bin You are almost surely missing the curl-devel RPM. On most Linux distros third-party pa

[R] problem in choosing cran mirror !

2008-07-25 Thread deepti nigam
Dear Sir/Madam     why during choosing the cran mirror of India on my Vista PC gives an error of like this   > chooseCRANmirror() Warning message:  In open.connection(con, "r") : unable to resolve 'cran.r-project.org'         pls help me             Thanks From Chandigarh to Chennai -

Re: [R] problem in choosing cran mirror !

2008-07-25 Thread Uwe Ligges
deepti nigam wrote: Dear Sir/Madam why during choosing the cran mirror of India on my Vista PC gives an error of like this chooseCRANmirror() Warning message: In open.connection(con, "r") : unable to resolve 'cran.r-project.org' chooseCRANmirror() tries to contact the CRAN master

Re: [R] problem in choosing cran mirror !

2008-07-25 Thread Prof Brian Ripley
Oh, please: that is a warning, not an error and not a problem! R looks on the CRAN master for an up-to-date list of mirrors, and your machine cannot see the CRAN mirror. It falls back to the list of mirrors knwon when the R version was released. If this persists, set e.g. options(repos=c(CR

Re: [R] Bug in gap.plot

2008-07-25 Thread Uwe Ligges
This is a bug in that function which does not respect the type="" argument in the subsequent call to points() inetrnally. Please report such bugs in functions of contributed packages to the corresponding package maintainer. Best wishes, Uwe Ligges Arthur Roberts wrote: Hi, all I am trying

Re: [R] Integrating R and Textmate

2008-07-25 Thread Uwe Ligges
Arthur Roberts wrote: To Whom It May Concern: I need to use various packages in R and I also want to use Textmate. Problem 1: Textmate doesn't seem to recognize the packages that are already installed on R. Problem 2: When I execute the following command: install.packages("ade4", repos="

Re: [R] Fit a 3-Dimensional Line to Data Points

2008-07-25 Thread Richard . Cotton
> I am new to R, and was wondering how to do 3D linear > regression in R. In other words, I need to Fit a > 3-Dimensional Line to Data Points (input). > > I googled before posting this, and found that it is > possible in Matlab and other commercial packages. For > example, see the Matlab link: > h

Re: [R] Error - unable to load shared library

2008-07-25 Thread Prof Brian Ripley
This is an installation problem. As the configure script checks for the presence of that function, has something changed since fastICA was installed? (E.g. have there been system updates?) I recommend re-installation. On Thu, 24 Jul 2008, Youngik Yang wrote: Hi, I'm trying to use fastICA pa

[R] Package Hmisc, functions summary.formula() and latex(), options pdig, pctdig, eps and prmsd

2008-07-25 Thread David Hajage
Hello R users, I have several problems with the functions summary.formula and latex in package Hmisc. Here an example : library(Hmisc) sex <- factor(sample(c("m","f", "?"), 50, rep=TRUE)) age <- rnorm(50, 50, 5) treatment <- factor(sample(c("Drug","Placebo"), 50, rep=TRUE)) symp <- c('Headac

Re: [R] path and R CMD check

2008-07-25 Thread Uwe Ligges
Christophe Genolini wrote: Hi the list, When I developpe my code, I put the file that define all the functions in ./MyPack/R/prog.R and the tests in ./MyPack/tests/testsProg.R The test files start by load("../data/myData.rda") source("../R/prog.R") #test function number one... But "R CMD c

[R] discrete event simulation - "factory" with rework

2008-07-25 Thread seanpor
Good morning, I wonder could somebody help me bridge the gap? I want to try and simulate a "factory" type environment with an object moving between stages of production with errors and re-work. The intent of this is to demonstrate the effect of error rates and re-work at various stages in the '

[R] Help with rep

2008-07-25 Thread Van Wyk, Jaap
Hi Is it possible to use the rep command (or maybe some other "shortcut") to create a vector with the following format: 4 3 4 2 3 4 1 2 3 4 Any help is much appreciated. Thanks Jacob Jacob L van Wyk Department of Statistics University of Johannesburg, APK Box 524 Auckland Park 2006

Re: [R] Help with rep

2008-07-25 Thread Peter Dalgaard
Van Wyk, Jaap wrote: Hi Is it possible to use the rep command (or maybe some other "shortcut") to create a vector with the following format: 4 3 4 2 3 4 1 2 3 4 I don't see a rep() solution, but > unlist(lapply(4:1, seq, to=4)) [1] 4 3 4 2 3 4 1 2 3 4 -- O__ Peter Dalgaa

Re: [R] Help with rep

2008-07-25 Thread Gabor Csardi
Jacob, yes, e.g. rep( c(4,3,4,2,3,4,1,2,3,4), 1 ) :) Seriously, your question reminds me of (rather silly) television contents, when one should find _the_ rule in a series of numbers. :) Here is a solution, assuming I've found the "correct" rule: unlist(lapply(4:1, seq, 4)) Best, Gabor On Fri

Re: [R] Help with rep

2008-07-25 Thread Dimitris Rizopoulos
try this: st <- 5 unlist(lapply(st:1, seq, to = st)) I hope it helps. Best, Dimitris Dimitris Rizopoulos Biostatistical Centre School of Public Health Catholic University of Leuven Address: Kapucijnenvoer 35, Leuven, Belgium Tel: +32/(0)16/336899 Fax: +32/(0)16/337015 Web: http://med.ku

[R] glht after lmer with "$S4class-" and "missing model.matrix-" errors

2008-07-25 Thread Anna Radtke
Hello everybody. In my case, calculating multiple comparisons (Tukey) after lmer produced the following two errors: > sv.mc <- glht(model.sv,linfct=mcp(comp="Tukey")) Error in x$terms : $ operator not defined for this S4 class Error in factor_contrasts(model) : no 'model.matrix' method for 'mode

[R] cannot allocate vector of size...

2008-07-25 Thread silvia narduzzi
Hi the list, I have a problem of memory space while running step() function: Error: cannot allocate vector of size 50.9 Mb I've tried with: > memory.size(max = FALSE) [1] 803.4714 #which should be the amount of memory currently in use > memory.limit(size = NA) [1] 1015.480 #which should

Re: [R] glht after lmer with "$S4class-" and "missing model.matrix-" errors with DATA

2008-07-25 Thread Anna Radtke
maybe it's in the data? So here it comes. > sv.growth Grouped Data: length ~ meas | box_id meas speccomp water box_id sprouts leaveslength long.sprout 1 1 Sv control moist 1 8.80 37.80 211.2000 60.6 2 1 Sv xfull moist 2

[R] Three contrast matrices on the same linear model

2008-07-25 Thread Christoph Scherber
Dear R users, Suppose I want to look at three different types of contrasts after fitting a linear model: P1=contr.treatment(7) P2=contr.helmert(7) P3=contr.sdif(7) #from library(MASS) contrasts(A)=P1 model1=aov(y~A) summary(model1) contrasts(A)=P2 model2=aov(y~A) summary(model2) contrasts(A)

Re: [R] cannot allocate vector of size...

2008-07-25 Thread Uwe Ligges
See the FAQs and ?Memory. Uwe Ligges silvia narduzzi wrote: Hi the list, I have a problem of memory space while running step() function: Error: cannot allocate vector of size 50.9 Mb I've tried with: memory.size(max = FALSE) [1] 803.4714 #which should be the amount of memory currently

Re: [R] Rolling range and regression calculations

2008-07-25 Thread Achim Zeileis
On Thu, 24 Jul 2008, rcoder wrote: Hi everyone, I want to calculate a min and max (i.e. range) on a rolling time frame of 50 periods for a matrix with the number of periods extending along the row direction. So for 300 periods, there will be 6 time frame windows per column, and 6 min max pairs.

[R] Tutorial on rgl Graphics

2008-07-25 Thread Tom La Bone
Can anyone point me towards a tutorial on using the rgl graphics package? Something with lots of examples would be nice. Thanks. Tom -- View this message in context: http://www.nabble.com/Tutorial-on-rgl-Graphics-tp18649114p18649114.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] Bug in gap.plot

2008-07-25 Thread Jim Lemon
On Thu, 2008-07-24 at 20:19 -0700, Arthur Roberts wrote: > Hi, all > > I am trying to make a plot with a axis break and I want the whole plot > to be line, not points. However, when I execute the following command > half of the graph is points and the other lines. > > gap.plot(Xdata, Ydata,g

Re: [R] Relying on R to generate html tables with hyperlinks and pictures ?

2008-07-25 Thread Jim Lemon
On Fri, 2008-07-25 at 02:03 +, Daren Tan wrote: > Any packages that can do that ? Hi Daren, The R2HTML & prettyR packages will get you tables and plots. I am not that familiar with R2HTML, but you would have to manually add hyperlinks to the output of htmlize (prettyR) as it is only intended

Re: [R] Dividing by 0

2008-07-25 Thread Jim Lemon
On Thu, 2008-07-24 at 06:57 -0700, nmarti wrote: > I'm trying to calculate the percent change for a time-series variable. > Basically the first several observations often look like this, > > x <- c(100, 0, 0, 150, 130, 0, 0, 200, 0) > > and then later in the life of the variable they're are gene

[R] Building a data frame with missing data

2008-07-25 Thread Natalia Quinteros
Hi List, I'm trying to built a list where there are some missing data in some columns, then I would like to know what I should put in these blank spaces when building the vector. eg: color<- c("red",?,"orange","green",?,?,?) size<- c(2,1,?,3,?,?,8) Thanks, Natalia [[alternative HTML ve

[R] Write lower half of distance matrix only

2008-07-25 Thread pgseye
Hi, I'm very new to R. I want to know if there is any way to write only the lower half of a distance matrix created in R to a csv file for example. I get the 'cannot coerce class "dist" into a data.frame' message when I try. I have used as.matrix and can write to a file this way, but as a full

Re: [R] Building a data frame with missing data

2008-07-25 Thread Henrique Dallazuanna
Try: color<- c("red",NA,"orange","green",NA,NA,NA) size<- c(2,1,NA,3,NA,NA,8) data.frame(color, size) On Fri, Jul 25, 2008 at 7:33 AM, Natalia Quinteros <[EMAIL PROTECTED]> wrote: > Hi List, > > I'm trying to built a list where there are some missing data in some > columns, then I would like to

Re: [R] Fit a 3-Dimensional Line to Data Points

2008-07-25 Thread Prof Brian Ripley
On Fri, 25 Jul 2008, [EMAIL PROTECTED] wrote: I am new to R, and was wondering how to do 3D linear regression in R. In other words, I need to Fit a 3-Dimensional Line to Data Points (input). I googled before posting this, and found that it is possible in Matlab and other commercial packages. Fo

Re: [R] Tutorial on rgl Graphics

2008-07-25 Thread Duncan Murdoch
On 25/07/2008 6:29 AM, Tom La Bone wrote: Can anyone point me towards a tutorial on using the rgl graphics package? Something with lots of examples would be nice. Thanks. The manual has lots of examples, and there are some papers about it, but I don't know of a tutorial. I think the most rel

Re: [R] Write lower half of distance matrix only

2008-07-25 Thread jim holtman
How do you want the lower half written out? can you give us an example of the input matrix and then what you would expect to see on the output. Is it still a matrix with the upper half set to zero/NA? Do you want it as a vector? What is the other program expecting as input? You need to provide

[R] Matrix barplot

2008-07-25 Thread Andreas Tille
Hi, as a bloody R beginner I failed to solve the probably simple problem to create a barplot of the following data read from a file Year A BC 2000 4 30 2001 2 13 2002 1 25 The Barplot should look like 5 |

Re: [R] Package Hmisc, functions summary.formula() and latex(), options pdig, pctdig, eps and prmsd

2008-07-25 Thread Frank E Harrell Jr
David Hajage wrote: Hello R users, I have several problems with the functions summary.formula and latex in package Hmisc. Here an example : library(Hmisc) sex <- factor(sample(c("m","f", "?"), 50, rep=TRUE)) age <- rnorm(50, 50, 5) treatment <- factor(sample(c("Drug","Placebo"), 50, rep=TR

Re: [R] path and R CMD check

2008-07-25 Thread Christophe Genolini
Uwe Ligges-3 wrote: > > > > Christophe Genolini wrote: >> Hi the list, >> >> When I developpe my code, I put the file that define all the functions >> in ./MyPack/R/prog.R and the tests in ./MyPack/tests/testsProg.R >> The test files start by >> >> load("../data/myData.rda") >> source("../

Re: [R] Matrix barplot

2008-07-25 Thread Nutter, Benjamin
> data <- data.frame(Year=c(2000,2001,2002), A=c(4,2,1), B=c(3,1,2), C=c(0,3,5)) > data.mat <- as.matrix(data)[,2:4] > rownames(data.mat) <- data$Year > data.mat <- t(data.mat) > barplot(data.mat,beside=TRUE) -Original Message--

[R] pca

2008-07-25 Thread Alphonse Monkamg
dear all, does anyone know whether one can perform Principal Component Analysis (PCA)  with some variables that are uncorrelated. How to do it with R Regards Alphonse   _ o.fr [[alternative HTML ver

Re: [R] Matrix barplot

2008-07-25 Thread Jim Lemon
On Fri, 2008-07-25 at 14:13 +0200, Andreas Tille wrote: > Hi, > > as a bloody R beginner I failed to solve the probably simple problem > to create a barplot of the following data read from a file > > Year A BC > 2000 4 30 > 2001 2 13 >

Re: [R] Package Hmisc, functions summary.formula() and latex(), options pdig, pctdig, eps and prmsd

2008-07-25 Thread David Hajage
2008/7/25 Frank E Harrell Jr <[EMAIL PROTECTED]> > David Hajage wrote: > >> Hello R users, >> >> I have several problems with the functions summary.formula and latex in >> package Hmisc. Here an example : >> >> >> library(Hmisc) >> sex <- factor(sample(c("m","f", "?"), 50, rep=TRUE)) >> age <

Re: [R] pca

2008-07-25 Thread Zhang Yanwei - Princeton-MRAm
Try ?princomp. Or you can just do it manually. eigen(data) Then the eigen vector corresponding to the biggest eigen value is the first principal component. It goes on. Sincerely, Yanwei Zhang Department of Actuarial Research and Modeling Munich Re America Tel: 609-275-2176 Email: [EMAIL PROTECTE

Re: [R] Write lower half of distance matrix only

2008-07-25 Thread pgseye
Thanks Jim, The morphometry software I mentioned outputs distance matrices in the format: 0. 7.1598 0. 8.7241 8.3506 0. 9.5217 7.2457 2.5642 0. I would have liked to write to a file the same type of matrix in R, to ensure the same data format. Mantel for Windows is optimally set

[R] Errror in running R2.7.1 version to R2.6.2 version

2008-07-25 Thread Lazarus Mramba
Dear all, I get an error shown below when i run the command "use" found in package epicalc on R2.7.1 and R2.7.0 but dont get the error when i run it on R 2.6.2 What is likely to be the problem? library(epicalc) Loading required package: foreign Loading required package: survival Loading required

Re: [R] Rolling range and regression calculations

2008-07-25 Thread rcoder
Hi Achim, Thanks for your reply. rollmean and rollmax functions exist, but is there anything for returning the minima on a rolling basis? I know there is no rollmin in the zoo library. Thanks, rcoder Achim Zeileis wrote: > > On Thu, 24 Jul 2008, rcoder wrote: > >> Hi everyone, >> >> I want

Re: [R] Matrix barplot

2008-07-25 Thread Andreas Tille
On Fri, 25 Jul 2008, Nutter, Benjamin wrote: data <- data.frame(Year=c(2000,2001,2002), A=c(4,2,1), B=c(3,1,2), C=c(0,3,5)) data.mat <- as.matrix(data)[,2:4] rownames(data.mat) <- data$Year data.mat <- t(data.mat) barplot(data.mat,be

[R] extracting Pr>ltl from robcov/ols (Design)

2008-07-25 Thread ldb
I am trying to extract significance levels out of a robcov+ols call. For background: I am analysing data where multiple measurements(2 per topic) were taken from individuals(36) on their emotional reaction (dependent variable) to various topics (3 topics). Because I have several emotions and a rot

[R] Plink bed files

2008-07-25 Thread Federico Calboli
Hi All, does anyone know how to import binary .bed files generated by Plink (http://pngu.mgh.harvard.edu/~purcell/plink/ ) into R? the Plink FAQ explains how to conver other types of files, not the .bed. Cheers, Federico -- Federico C. F. Calboli Department of Epidemiology and Public Healt

Re: [R] Rolling range and regression calculations

2008-07-25 Thread stephen sefick
how about rollapply in the zoo package? On Fri, Jul 25, 2008 at 8:37 AM, rcoder <[EMAIL PROTECTED]> wrote: > > Hi Achim, > > Thanks for your reply. rollmean and rollmax functions exist, but is there > anything for returning the minima on a rolling basis? I know there is no > rollmin in the zoo li

Re: [R] Parallel Processing and Linear Regression

2008-07-25 Thread Martin Morgan
Hi Alan -- "Alan Spearot" <[EMAIL PROTECTED]> writes: > Does anybody have any suggestions regarding applying standard regression > packages lm(), hccm(), and others within a parallel environment? Most of > the packages I've found only deal with iterative processes (bootstrap) or > simple linear

[R] Scatterplot matrix one column vs. the rest of the dataset

2008-07-25 Thread stephen sefick
have a data frame composed of many columns. I would like to hold one column constant and scatter plot it agianst all of the other columns? how do I do this? I have only been able to plot(x) and use indexes to create an entire scatterplot matrix, but not hold one constant. -- Let's not spend ou

Re: [R] glht after lmer with "$S4class-" and "missing model.matrix-" errors

2008-07-25 Thread Douglas Bates
You have a mismatch between glht and the model fit by lmer. A model fit by lmer is an object of an S4 class (that's what the "4" in the package name "lme4" is to indicate). The glht function, or possibly a default method for that generic, is treating the model as an S3 class object. Also, you sh

Re: [R] Matrix barplot

2008-07-25 Thread ajay ohri
As a beginner also try downloading the rattle GUI , with all dependecies =true , or R Cmdr GUI.. these are both packages go to rattle.togaware.com for the rattle instructions and installations .its very very user friendly even though the purists think its infra dig.(kidding- Friday humour) Reg

Re: [R] extracting Pr>ltl from robcov/ols (Design)

2008-07-25 Thread Mark Difford
ldb (?), >> I am trying to extract significance levels out of a robcov+ols call >> However, I can't figure out how to get to the significance (Pr>ltl). >> It is obviously calculating it because the call: It's calculated in print.ols(). See extract below. To see the whole function, do print.

Re: [R] Plink bed files

2008-07-25 Thread Robert Gentleman
Hi Frederico, You will likely have more luck asking about Bioinformatics related questions on the Bioconductor list, you might look at the rtracklayer package which can import bed files, if they really are bed files, and otherwise you would have to get the file format and write your own par

Re: [R] Scatterplot matrix one column vs. the rest of the dataset

2008-07-25 Thread stephen sefick
I figured it out- always include the numbers of the columns in the plot statement that you want to scatter. On Fri, Jul 25, 2008 at 9:23 AM, stephen sefick <[EMAIL PROTECTED]> wrote: > have a data frame composed of many columns. I would like to hold one > column constant and scatter plot it agia

[R] "Multiple" Regressions indexed by goodness of fit

2008-07-25 Thread stephen sefick
I would like do batch linear regression and then only have the results with high R-squared's returned. Is there such a data mining package in R. thanks stephen -- Let's not spend our time and resources thinking about things that are so little or so large that all they really do for us is puff u

[R] Chi-square parameter estimation

2008-07-25 Thread Julio Rojas
Hi. I have made 100 experiments of an M/M/1 queue, and for each one I have calculated both, mean and variance of the queue size. Now, a professor has told me that variance is usually chi-squared distributed. Is there a way in R that I can find the parameter that best fits a chi-square to the var

[R] Insert rows into a pre-existing data frame

2008-07-25 Thread naw3
Hi, I'm sorry if this is a simple question. How do you insert a blank row into a data frame? I basically need to do this: old table: new table: C1 C2 C3 C1 C2 C3 1 32 34 1 32 34 2 52 23 54 2 52 23 _

[R] Saving a workspace with "extras"?

2008-07-25 Thread J . delasHeras
Hi everyone, I hope there's a simple way to achieve what I want, but I haven't found the way. I do microarray analysis using R and a number of packages as well as some functions created my myself. When I save the workspace, it saves all the data structures, that's great... But when I cli

Re: [R] Saving a workspace with "extras"?

2008-07-25 Thread Sarah Goslee
Functions you've loaded using source() should be saved. For loading packages automatically, create a function called .First and save it in that workspace. Anything in that function will be carried out when the workspace is loaded. Sarah On Fri, Jul 25, 2008 at 10:27 AM, <[EMAIL PROTECTED]> wrot

Re: [R] Saving a workspace with "extras"?

2008-07-25 Thread J . delasHeras
Excellent! Thanks for the pointers. Although the functions were indeed loaded with a source() call... I'll recheck the behaviour and see if I get this to work how I want it. thanks again! Jose Quoting Sarah Goslee <[EMAIL PROTECTED]>: Functions you've loaded using source() should be sa

[R] melting a list: basic question

2008-07-25 Thread baptiste auguie
Dear list, I'm trying to use the reshape package to perform a merging operation on a list of data.frames as illustrated below, a <- 1:10 example <- list( data.frame(a=a, b=sin(a)), data.frame(a=a, b=cos(a)) ) melt(example, id = a) this produces the desired result, where the data.fram

Re: [R] Insert rows into a pre-existing data frame

2008-07-25 Thread milton ruser
Hi "somebody" I hope this helps: df1<-data.frame(cbind(va=runif(3), vb=runif(3))) df1 df2<-data.frame(cbind(va=runif(3), vb=runif(3))) df2 df.blank<-data.frame(cbind(va=NA, vb=NA)) df.blank df.join<-rbind(df1, df.blank, df2) df.join Miltinho astronauta brazil On 7/25/08, [EMAIL PROTECTED

Re: [R] Tutorial on rgl Graphics

2008-07-25 Thread Tom La Bone
After looking around a bit more I found the example I was looking for -- plotlm3d, which I found on the R wiki http://wiki.r-project.org/rwiki/doku.php?id=graph_gallery:new-graphics The original author was John Fox, and it was modified by Jose Claudio Faria and Duncan Murdoch. Below is a si

Re: [R] Integrating R and Textmate

2008-07-25 Thread Rob Goedman
Art, Could it be the case TextMate is activating the wrong version of R (2.6 vs. 2.7.1). Are you using R.app? If so, and if the R.app is in the dock, does the correct R dance when you send a file to R without R running? Rob On Jul 24, 2008, at 3:07 PM, Arthur Roberts wrote: To Whom It

[R] S4 class and Package NAMESPACE [NC]

2008-07-25 Thread Sylvain ARCHENAULT
Hello, I am trying to make a R package with S4 classes. To do so, i do as usual (when no S4 were involved, i.e without NAMESPACE file) and I've got errors in class refering to other classes in the package. So I use a NAMESPACE file to declare classes, it works fine, but now I have to declare ea

Re: [R] Integrating R and Textmate

2008-07-25 Thread Hans-Jörg Bibiko
On 25.07.2008, at 17:06, Rob Goedman wrote: Art, Could it be the case TextMate is activating the wrong version of R (2.6 vs. 2.7.1). I do not believe this. TextMate is using the normal R Terminal. I invoked the following command in a Rdaemon environment: install.packages("ade4", repos="htt

[R] Maximization under constraits

2008-07-25 Thread Daniela Garavaglia
I'm looking for a R function which can maximise this logliklihood function, under the constraits a>0 e b>0 f<-function(param){ a<-param[1] b <-param[2] log(prod)-(a*s2)-(b*s)-n*log(1-((0.5*b/sqrt(a))*(exp((b^2)/(4*a)))*((sqrt(pi ))*(1-pnorm(-b/(2*sqrt(a)), mean=0, sd=1)} I've tri

Re: [R] Fit a 3-Dimensional Line to Data Points

2008-07-25 Thread Hans W. Borchers
S. M. Niaz Arifin yahoo.com> writes: > > Hi Experts, > I am new to R, and was wondering how to do 3D linear > regression in R. In other words, I need to Fit a > 3-Dimensional Line to Data Points (input). > > I googled before posting this, and found that it is > possible in Matlab and other comme

Re: [R] Tutorial on rgl Graphics

2008-07-25 Thread Duncan Murdoch
On 7/25/2008 11:01 AM, Tom La Bone wrote: After looking around a bit more I found the example I was looking for -- plotlm3d, which I found on the R wiki http://wiki.r-project.org/rwiki/doku.php?id=graph_gallery:new-graphics The original author was John Fox, and it was modified by Jose Clau

Re: [R] melting a list: basic question

2008-07-25 Thread Dieter Menne
baptiste auguie exeter.ac.uk> writes: > > I'm trying to use the reshape package to perform a merging operation > on a list of data.frames as illustrated below, > > > a <- 1:10 > > example <- list( data.frame(a=a, b=sin(a)), data.frame(a=a, > > b=cos(a)) ) > > > > melt(example, id = a) > >

[R] Interactive plot using playwith() and abline

2008-07-25 Thread Christoph Scherber
Dear all, Is it possible to use abline() after calling playwith(plot(...)))? x=1:10 y=x^2 playwith(plot(x,y)) # works fine playwith({abline(lm(y~x))}) # doesn?t work Thanks! Christoph __ R-help@r-project.org mailing list https://stat.ethz.ch/mailm

Re: [R] S4 class and Package NAMESPACE [NC]

2008-07-25 Thread Martin Morgan
Sylvain ARCHENAULT wrote: Hello, I am trying to make a R package with S4 classes. To do so, i do as usual (when no S4 were involved, i.e without NAMESPACE file) and I've got errors in class refering to other classes in the package. Probably because the files are collated in such a way that s

[R] plot zoo custom panel help

2008-07-25 Thread stephen sefick
#the below code is the way that I would like the plot to look. I have tried to write a panel function: my.panel <- function(x, y, ..., pf = parent.frame()) { axis(side=1, at = seq(rng[1], rng[2], 1/12), labels = n, tcl = -0.3) } #but it does not work and I am at a loss and help would be apprec

Re: [R] Tutorial on rgl Graphics

2008-07-25 Thread Tom La Bone
On further experimentation I find that "points" (via points3d) serve my purpose well (instead of the much prettier but more troublesome spheres). The default "point" appears to be a square. Is there a way to make it a circle? Tom Duncan Murdoch-2 wrote: > > On 7/25/2008 11:01 AM, Tom La Bone

Re: [R] Write lower half of distance matrix only

2008-07-25 Thread jim holtman
Does this do what you want: > x <- matrix(1:25,5) > x [,1] [,2] [,3] [,4] [,5] [1,]16 11 16 21 [2,]27 12 17 22 [3,]38 13 18 23 [4,]49 14 19 24 [5,]5 10 15 20 25 > x[upper.tri(x)] <- NA > write.table(x, na="", row.names=FALSE,

Re: [R] Package Hmisc, functions summary.formula() and latex(), options pdig, pctdig, eps and prmsd

2008-07-25 Thread Frank E Harrell Jr
David Hajage wrote: 2008/7/25 Frank E Harrell Jr <[EMAIL PROTECTED] > David Hajage wrote: Hello R users, I have several problems with the functions summary.formula and latex in package Hmisc. Here an example :

Re: [R] extracting Pr>ltl from robcov/ols (Design)

2008-07-25 Thread Frank E Harrell Jr
Mark Difford wrote: ldb (?), I am trying to extract significance levels out of a robcov+ols call However, I can't figure out how to get to the significance (Pr>ltl). It is obviously calculating it because the call: It's calculated in print.ols(). See extract below. To see the whole functi

Re: [R] plot zoo custom panel help

2008-07-25 Thread Gabor Grothendieck
BB.zoo is missing so I can't run it but note that the panel funtion must draw the points or lines or whatever or else there will be nothing in the plot. See the examples in ?plot.zoo and in vignette("zoo-faq") On Fri, Jul 25, 2008 at 12:13 PM, stephen sefick <[EMAIL PROTECTED]> wrote: > #the bel

Re: [R] melting a list: basic question

2008-07-25 Thread baptiste auguie
Given that I cannot arbitrarily change the data to make "a" an integer, can I still use "a" as a grouping variable? I tried melt(example, id = factor(a)) but it does not work either. Must this change from numeric values to factors be done before applying melt? Thanks, baptiste On 25 Jul

Re: [R] Matrix barplot

2008-07-25 Thread Andreas Tille
On Fri, 25 Jul 2008, Jim Lemon wrote: library(plotrix) Well, if I try this in the example of the previous poster I get nicely rendered fonts - which is the only difference I noticed. # barp groups data in columns, not rows, so transpose barp(t(atdat[,2:4]),names.arg=atdat[,1],col=2:4) Whil

Re: [R] Maximization under constraits

2008-07-25 Thread Ben Bolker
Daniela Garavaglia virgilio.it> writes: > > I'm looking for a R function which can maximise this logliklihood function, > under the constraits a>0 e b>0 > > f<-function(param){ > > a<-param[1] > > b <-param[2] > > log(prod)-(a*s2)-(b*s)-n*log(1-((0.5*b/sqrt(a))*(exp((b^2)/(4*a)))*((sqrt(

Re: [R] plot zoo custom panel help

2008-07-25 Thread stephen sefick
I am still having the can't draw a plot without putting in a ylim value when trying to draw a plot. I have included reproducible code sorry for the previous post > #the below code is the way that I would like the plot to look. I have > tried > to write a panel function: > my.panel <- function(x

Re: [R] R2WinBUGS problem

2008-07-25 Thread Uwe Ligges
Dear Troels, it is possible to start without inits if the problem to solve is appropriate, here is the changed "schools" example from the help page: model.file <- system.file(package="R2WinBUGS", "model", "schools.txt") data(schools) J <- nrow(schools) y <- schools$estimate sigma.y <- schools

[R] Minor Bug in Documentation of merge()

2008-07-25 Thread Roland Rau
Dear all, I would like to point to a minor bug in the documentation of merge(). The documentation (?merge) says all logical; all = L is shorthand for all.x = L and all.y = L. I think the correct description should be all logical; all = T is shorthand for all.x = T and all.y = T. The so

Re: [R] Minor Bug in Documentation of merge()

2008-07-25 Thread Duncan Murdoch
On 7/25/2008 2:13 PM, Roland Rau wrote: Dear all, I would like to point to a minor bug in the documentation of merge(). The documentation (?merge) says all logical; all = L is shorthand for all.x = L and all.y = L. I think the correct description should be all logical; all = T is short

Re: [R] Tutorial on rgl Graphics

2008-07-25 Thread Duncan Murdoch
On 7/25/2008 12:20 PM, Tom La Bone wrote: On further experimentation I find that "points" (via points3d) serve my purpose well (instead of the much prettier but more troublesome spheres). The default "point" appears to be a square. Is there a way to make it a circle? Not very easily. Now you c

[R] transcript a matlab code in R

2008-07-25 Thread Fotis Papailias
Dear R-users, I am trying to translate a matlab code for calculating the Local Whittle estimator in time series with long memory originally written by Shimotsu and available free in his webpage ( http://www.econ.queensu.ca/pub/faculty/shimotsu/ ) The Matlab code is ==

[R] need help in parametric bootstrap

2008-07-25 Thread laila khalfan
Hi I need help in understanding how does the parametric bootstrap confidence interval works. I have a step-stress model from gamma distribution, I plugged in the log-likelihood function to get the MLE`s of the three parameters alpha, theta1 and theta2. Now I need to find the parametric bootstrap

[R] create multi windows plot at the same time

2008-07-25 Thread Alessandro
Ciao All I'd like to generate 4 windows plot to compare different relationship at the same time in R. Each plot code is : Plot(v1) Plot(v2) Plot(v4) Plot(v4) But I did not find a right code in R. Ale [[alternative HTML version deleted]]

Re: [R] Rolling range and regression calculations

2008-07-25 Thread rcoder
You mean embedding something like a range() function in a rollapply function? I'm just not sure how it will handle outputting max and min values in sequence and in the correct columns. On a parallel topic, I would like to find some way of generating a matrix containing rows that are the product o

Re: [R] Dividing by 0

2008-07-25 Thread nmarti
I'm well aware these are not errors, I guess I miss-wrote. I understand your concern. Thanks for passionately looking out for my well being, you saved my life. My variable has about 10,000 elements and sometime for the first 100 to 500 elements there is lots of 0's, so I end up with lots of NA/N

Re: [R] create multi windows plot at the same time

2008-07-25 Thread ctu
Hi, you only need to add x11() in front of plot(); such as x11() Plot(v1) x11() Plot(v2) .. then R will open multi windows for you Chunhao Quoting Alessandro <[EMAIL PROTECTED]>: Ciao All I'd like to generate 4 windows plot to compare different relationship at the same time in R. Each p

Re: [R] Rolling range and regression calculations

2008-07-25 Thread stephen sefick
d <- cbind(rollapply(x, FUN="max", width=96), rollapply(x, FUN="min", width=96)) if you have fifteen minute interval data 1day is equal to 96 time steps. the brute force method would be cbind((x[,1]*x[,2]), (x[,2]*x[,3])) this should work On Fri, Jul 25, 2008 at 1:10 PM, rcoder <[EMAIL PROTECTE

Re: [R] Rolling range and regression calculations

2008-07-25 Thread Gabor Grothendieck
> library(zoo) > z <- zoo(101:110) > rollapply(z, 3, min) 2 3 4 5 6 7 8 9 101 102 103 104 105 106 107 108 > rollapply(z, 3, max) 2 3 4 5 6 7 8 9 103 104 105 106 107 108 109 110 > rollapply(z, 3, range) 2 101 103 3 102 104 4 103 105 5 104 106 6 105 107 7 106 108 8 10

Re: [R] create multi windows plot at the same time

2008-07-25 Thread stephen sefick
or quartz() or windows() you could also use par(mfrow=c(2,2)) On Fri, Jul 25, 2008 at 3:05 PM, <[EMAIL PROTECTED]> wrote: > Hi, you only need to add x11() in front of plot(); > such as > x11() > Plot(v1) > x11() > Plot(v2) > .. > then R will open multi windows for you > > Chunhao > > > Quotin

Re: [R] transcript a matlab code in R

2008-07-25 Thread Berend Hasselman
Fotis Papailias wrote: > > > > local.whittle <- function(d, x, m) > { > n <- length(x) > t <- matrix(c(0:n1), nrow = n, ncol=1) > lambda <- (2*pi*t)/n > wx <- (2*pi*n)^(-1/2)*Conj(fft( Conj(x)))*exp(1i*lambda) > M1 <- m+1 > lambda2 <- lambda[2:M1] > wx2 <- wx[2:M1] > ix <- wx2*Conj(wx2) >

[R] Percentile Estimation From Kernel Density Estimate

2008-07-25 Thread Jeffrey_Bromaghin
Has anyone developed a defensible method of estimating percentiles from a univariate kernel density estimate? I am working on a problem in which the density estimate is of interest, but I would also like to estimate the value of the variable for which the distribution was, say, 0.20. I spent som

Re: [R] Dividing by 0

2008-07-25 Thread Roland Rau
Hi, what about: mydata <- c(1,2,3,NA, Inf, -Inf, NaN, 5, 6, 7) mydata2 <- ifelse(is.na(mydata) | is.infinite(mydata), 0, mydata) mydata mydata2 nmarti wrote: I know I can use x <- na.omit(x), and other forms of this, to get rid of some of these errors. I know what y

Re: [R] Dividing by 0

2008-07-25 Thread Patrick Burns
I would think that the result of your rolling calculation should be NA if there are NAs or NaNs in the window. Producing an error given NAs seems like a broken function to me. One of the main purposes of NA is so that you can do operations like what you want to do and get reasonable answers. P

Re: [R] Matrix barplot

2008-07-25 Thread Andreas Tille
On Fri, 25 Jul 2008, Nutter, Benjamin wrote: data <- data.frame(Year=c(2000,2001,2002), A=c(4,2,1), B=c(3,1,2), C=c(0,3,5)) data.mat <- as.matrix(data)[,2:4] rownames(data.mat) <- data$Year data.mat <- t(data.mat) barplot(data.mat,be

  1   2   >