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

2008-07-25 Thread S. M. Niaz Arifin
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 commercial packages. For example, see the Matlab link:

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

[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.

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,

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:

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

[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('Headache','Stomach

[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

[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 'model'

[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

[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)

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

[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

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,

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 generally

[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 version

[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 know what I

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

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] 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)

[R] extracting Prltl 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

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

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)

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

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 agianst

[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

[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

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]

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

[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

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

[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

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,

[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 a0 e b0 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 tried

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

2008-07-25 Thread Hans W. Borchers
S. M. Niaz Arifin niazarifin at 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

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

Re: [R] melting a list: basic question

2008-07-25 Thread Dieter Menne
baptiste auguie ba208 at 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) this

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

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] mailto:[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 Prltl 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 (Prltl). It is obviously calculating it because the call: It's calculated in print.ols(). See extract below. To see the whole

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 below

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)

Re: [R] Maximization under constraits

2008-07-25 Thread Ben Bolker
Daniela Garavaglia danygaravaglia84 at virgilio.it writes: I'm looking for a R function which can maximise this logliklihood function, under the constraits a0 e b0 f-function(param){ a-param[1] b -param[2]

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$sd data -

[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

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

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 can

[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

[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

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

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

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 PROTECTED]

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 107 109

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 Quoting Alessandro

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) g -

[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

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 you

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.

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)

Re: [R] plot zoo custom panel help

2008-07-25 Thread Gabor Grothendieck
Please clarify what the problem is. If its the lack of content in the plot that was already addressed. You mention ylim but its not clear what your comment refers to since the plot command does not use ylim. Also make sure you are using the latest version of zoo and identify the version in your

[R] s-plus in R... simpler code

2008-07-25 Thread Fotis Papailias
Dear R-users, I have sent another mail some hour ago about a matlab Code I was trying to translate in R. Actually I have found a simpler code originally written in S-PLUS for the same function. Author's page - http://math.bu.edu/people/murad/methods/locwhitt/

[R] Pairs() function: selective changing of ylim; use of key

2008-07-25 Thread David Afshartous
All, Two questions RE scatterplot matrices produced via pairs() function: 1) Is it possible to selectively change the ylim of one of the subplots? 2) Is a key allowed? I don't seem to be able to insert a manual key. Code below: dat = data.frame(Hour= rep(c(0:3), 4), Y1 = rnorm(16,1), Y2 =

[R] R-pmg (poor man gui) question

2008-07-25 Thread Ferry
Hello, I hope I am reaching the appropriate channel for asking question. I am a newbie with R and pmg. I am trying to create two gdroplist as the following: First list: West, South, North, East, MidWest Second list: States in the U.S For example, if on the first gdroplist I select value

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

2008-07-25 Thread Alessandro
Hi I have a problem with par(mfrow=c(2,2)) code, because I don’t understand this: par(mfrow=c(2,2)) plot(v1) plot(v2) plot(v3) plot(v4) it opens a v1 window and after close that window to open next v2 plot Da: stephen sefick [mailto:[EMAIL PROTECTED] Inviato: venerdì 25 luglio

Re: [R] plot zoo custom panel help

2008-07-25 Thread stephen sefick
zoo 1.5-4 package version R 2.7.1 Mac OS X 10.3.5 and Windows XP #from data contained in my second post #this works fine plot(d) plot(d[,1]) #gives me this error message Error in plot.window(...) : invalid 'ylim' value I downloaded the latest version of zoo today as to out previous conversation.

Re: [R] Bug in gap.plot

2008-07-25 Thread Carl Witthoft
Jim L: I tried your example under R 2.2.1, and sure enough it plotted points on the right-hand section. Sounds like a bug that got fixed in the newer versions. (BTW, I get a warning from plotrix about being built under 2.7, but it does seem to execute OK under 2.2.1). -- example used

Re: [R] plot zoo custom panel help

2008-07-25 Thread Gabor Grothendieck
I can't reproduce this. Put it all in a .R file, source it into a fresh session and see if you still get the problem. If you do still get an error email it to me and I'll try sourcing the file as well. On Fri, Jul 25, 2008 at 4:28 PM, stephen sefick [EMAIL PROTECTED] wrote: zoo 1.5-4 package

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

2008-07-25 Thread ctu
par(mfrow=c(2,2)) is trying to open a 2*2 figures in one window, so you could see your v1,..v4 in one windows at the same time if you want they plot separately then you could use x11() for each plot() Chunhao Quoting Alessandro [EMAIL PROTECTED]: Hi I have a problem with par(mfrow=c(2,2))

Re: [R] Numerical question

2008-07-25 Thread stephen sefick
If it is in a data frame with the variables as columns try f - cbind(a*b, b*c, c*d) sapply(f, function(x)var(x)) On Fri, Jul 25, 2008 at 5:06 PM, Zhang Yanwei - Princeton-MRAm [EMAIL PROTECTED] wrote: Hi all, I have n independent variables A_1, A_2, A_3,..,A_n, and each with known

Re: [R] Numerical question

2008-07-25 Thread Ted Harding
On 25-Jul-08 21:06:38, Zhang Yanwei - Princeton-MRAm wrote: Hi all, I have n independent variables A_1, A_2, A_3,..,A_n, and each with known variances var(A_1), var(A_2),..., but unknown mean. How can I get the approximation of the variance of the product of the variables using

[R] fit.dist gnlm question, NaN and Inf results

2008-07-25 Thread Richard and Barbara Males
I am attempting to fit discrete data (daily counts of arrivals of recreational vessels at locks on a river) using the fit.dist package. Some distributions return values of NaN and Inf for certain situations, an example with Inf values is shown below. # of vessels:

[R] graphing regression coefficients and standard errors

2008-07-25 Thread Murali K
Hello, I am interested in plotting my regression analysis results(regression coefficients and standard errors obtained through OLS and Tobit models) in the form of graphs.What is the best way to accomplish this? Thanks. Murali Kuchibhotla [[alternative HTML version deleted]]

Re: [R] How to pass function argument of same name to internal call?

2008-07-25 Thread Duncan Murdoch
On 25/07/2008 4:28 PM, Carl Witthoft wrote: I ran across this problem when playing with ccf(). Its function call is function (x, y, lag.max = NULL, type = c(correlation, covariance), plot = TRUE, na.action = na.fail, ...) Internally, ccf() calls plot(), which digs up plot.acf() whose

[R] Selecting the first measurement only from a longitudinal sequence

2008-07-25 Thread john james
Dear R-help mailing list,   I have this problem, I have a joint  longitudinal and survival data of the form say   ID Time Failuretime Censoringind longitudinalmeasure 1  0 35  0    123 1  10    35 0 120  1   25   35 1 

Re: [R] Numerical question

2008-07-25 Thread Duncan Murdoch
On 25/07/2008 5:06 PM, Zhang Yanwei - Princeton-MRAm wrote: Hi all, I have n independent variables A_1, A_2, A_3,..,A_n, and each with known variances var(A_1), var(A_2),..., but unknown mean. How can I get the approximation of the variance of the product of the variables using

[R] [R-pkgs] Package np version 0.20-0 released to CRAN

2008-07-25 Thread Jeffrey S. Racine
Dear R users, An updated version of the np package has recently been uploaded to CRAN (version 0.20-0). Version 0.20-0 is documented in Tristen Hayfield and Jeffrey S. Racine (2008). Nonparametric Econometrics: The np Package. Journal of Statistical Software 27(5). URL

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

2008-07-25 Thread Momin, Amin A
Thankyou the curl-devel installation helped solve the error with RCurl and GEOquery. - Original Message - From: Prof Brian Ripley [EMAIL PROTECTED] To: Amin A Momin [EMAIL PROTECTED] Cc: r-help@r-project.org Sent: Friday, July 25, 2008 3:19:41 AM GMT -05:00 US/Canada Eastern Subject:

Re: [R] R-package install

2008-07-25 Thread cindy Guo
Thank you, Brian and Mark, I tried the win-builder on http://win-builder.r-project.org/. Is this what you mean? I uploaded the source code, and I didn't get any email after couple of hours. It should arrive after half an hour, as it is said on the webpage. Do you know what can happen? Cindy On

[R] parametric bootstrap

2008-07-25 Thread laila khalfan
Hi I am trying to find a parametric bootstrap confidence interval and when I used the boot function I get zero bias and zero st.error? What could be my mistake? Thank you and take care. Laila [[alternative HTML version deleted]] __

[R] 64-bit R on Mac OS X 10.4.5

2008-07-25 Thread joseph
Hello I have a Mac OS X 10.4.5. I am trying to build a 64-bit R by following the directions on this page: http://r.research.att.com/building.html r_arch=x86_64 \ CC=gcc -arch x86_64 -std=gnu99 \ CXX=g++ -arch x86_64 \ OBJC=gcc -arch x86_64 \ F77=gfortran -arch x86_64 \ FC=gfortran -arch x86_64

[R] parametric bootstrap

2008-07-25 Thread laila khalfan
Hi I am using the boot function in boot package. I am facing a problem in getting the values of bias and st.error in the output. r-36n-40shape-2theta11-exp(1) # (=2.718282)theta21-exp(.5) #( =1.648721) m0- function(Ti,Tj) #a function that generates the estimates{

Re: [R] 64-bit R on Mac OS X 10.4.5

2008-07-25 Thread Steven McKinney
Hello I haven't found better instructions, it's just not an easy thing to do. You might also consider joining the r-sig-mac group and reviewing threads there for additional information. Rather than try to configure, make and install with one giant command, I'd suggest breaking the task down

Re: [R] melting a list: basic question

2008-07-25 Thread hadley wickham
On Fri, Jul 25, 2008 at 9:49 AM, baptiste auguie [EMAIL PROTECTED] wrote: 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)) )

Re: [R] melting a list: basic question

2008-07-25 Thread hadley wickham
On Fri, Jul 25, 2008 at 8:50 PM, hadley wickham [EMAIL PROTECTED] wrote: On Fri, Jul 25, 2008 at 9:49 AM, baptiste auguie [EMAIL PROTECTED] wrote: 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

Re: [R] Interactive plot using playwith() and abline

2008-07-25 Thread Felix Andrews
Indeed, the call you pass to playwith() must be a self-contained plot function. Try one of these: playwith( {plot(x,y); abline(lm(y~x)} ) playwith(plot(x,y, panel.last=abline(lm(y~x playwith(xyplot(y ~ x, type=c(p, r))) On Sat, Jul 26, 2008 at 1:52 AM, Christoph Scherber [EMAIL PROTECTED]

Re: [R] Matrix from List

2008-07-25 Thread jim holtman
This gets you close to what you want. The 31/33 are row names that you can extract and store as actual columns, x - list('1995'=list('31'=1, '33'=2), '2006'=list('31'=3, '33'=4)) y - lapply(names(x), function(.L1){ + cbind(as.numeric(.L1),do.call(rbind, x[[.L1]])) + }) (z - do.call(rbind,

[R] Help with matrix

2008-07-25 Thread Van Wyk, Jaap
Hi I have 3 vectors, say g1, g2 and f, where g1 and g2 contain the row and column indices of a matrix, with corresponding elements in f. How can I create a matrix containing the values in f ? For example: g1 g2 f 3 4 10 2 1 30 4 4 50 How can then get a matrix that looks as follows: 0

  1   2   >