Re: [R] maps does not work

2007-10-12 Thread Prof Brian Ripley
I think the problem is that tempdir() has been set somewhere invalid. However, does help() work at all, since that uses the same mechanism? Here are some diagnostic hints: Start an R session, printout tempdir() and see if it looks right. Search for the directory on your file system and see if

[R] random forest mtry and mse

2007-10-12 Thread David Rogowski
I have been using random forest on a data set with 226 sites and 36 explanatory variables (continuous and categorical). When I use tune.randomforest to determine the best value to use in mtry there is a fairly consistent and steady decrease in MSE, with the optimum of mtry usually equal to 1.

Re: [R] accessing ylim set by xyplot

2007-10-12 Thread Duncan Mackay
At 22:48 12/10/07, you wrote: Hello, I would like to know if there is a clever way to avoid the problem illustrated below within the xyplot function. x - seq(1:10) y - seq(1:10) pr1 - xyplot(x ~ y) u - seq(1:12) v - seq(1:12) pr2 - xyplot(u ~ v, col = red, more = FALSE) prts - list(pr1, pr2)

Re: [R] Anybody has ever met the problem to add a legend to a figure generated by image()

2007-10-12 Thread Katharine Mullen
have you tried the function image.plot in the package fields? On Fri, 12 Oct 2007, zhijie zhang wrote: Dear friends, Anybody has ever met the problem to add a legend to a figure generated by image()? I have three variables,x,y and z. x and y are the coordinates, and z is the third values.

Re: [R] collapsing a data frame

2007-10-12 Thread jim holtman
Here is one way. Not sure what you wanted done with some of the other variables, so I just chose the first one; you could do max/min: z - by(h, h$BROOD, function(x){ + # take first value of elements you don't want to change + data.frame(BROOD=x$BROOD[1], TICKS.mean=mean(x$TICKS),

Re: [R] Basic plot question: Figure 1.1 Pinheiro Bates

2007-10-12 Thread Douglas Bates
On 10/12/07, David Afshartous [EMAIL PROTECTED] wrote: All, Sorry for overly simplistic question, but I can't seem to remember how to create the basic plot shown in Figure 1.1 of Pinheiro Bates (2004; p.4). The y-axis delineates a factor (Rail) while the x-axis displays the distribution of a

Re: [R] Automating binning for chisq.test()

2007-10-12 Thread Marc Schwartz
On Fri, 2007-10-12 at 11:16 -0600, D. R. Evans wrote: The standard chisq.test() and fisher.test() functions, when applied to two distributions (to determine whether the same underlying distribution applies to both) requires one to pre-bin the distributions. Is there a library function

Re: [R] Automating binning for chisq.test()

2007-10-12 Thread Duncan Murdoch
On 10/12/2007 1:16 PM, D. R. Evans wrote: The standard chisq.test() and fisher.test() functions, when applied to two distributions (to determine whether the same underlying distribution applies to both) requires one to pre-bin the distributions. Is there a library function (either built-in

[R] collapsing a data frame

2007-10-12 Thread Ben Bolker
Trying to find a quick/slick/easily interpretable way to collapse a data set. Suppose I have a data set that looks like this: h - structure(list(INDEX = structure(1:6, .Label = c(1, 2, 3, 4, 5, 6), class = factor), TICKS = c(0, 0, 0, 0, 0, 3 ), BROOD = structure(c(1L, 1L, 2L, 3L, 3L, 3L),

[R] Batch-Plot Histograms

2007-10-12 Thread Thomas Schwander
Hi everyone, anybody’s got an idea why the following script doesn’t produce batch-histograms? I’m using Windows XP and R 2.5.1. Here’s the script: matrix-read.csv(C:\\Stadtwerke_mit_Umlage.csv, header=TRUE,sep=;,dec=.) Stadtwerke-colnames(matrix) Bereich_blau-66.67

Re: [R] calculate impulse responses

2007-10-12 Thread sj
Perhaps the VAR and irf functions in the vars library will allow you to do what you want. good luck, spencer On 10/12/07, Martin Ivanov [EMAIL PROTECTED] wrote: Dear R users, I need perform structural analysis on a no intercept VAR model. Unfortunately the functions irf.VAR and dfev

[R] embedding plots

2007-10-12 Thread Josue G. Martinez
Hello! I am trying to embed a plot of a curve(say x^2) on a matrix that I am viewing using the image(matrix) command. I was wondering if someone could give me some idea of how to do this. Thanks, J. [[alternative HTML version deleted]] __

Re: [R] Basic plot question: Figure 1.1 Pinheiro Bates

2007-10-12 Thread Stefan Grosse
On Friday 12 October 2007 17:31:22 David Afshartous wrote: DA All, DA Sorry for overly simplistic question, but I can't seem to remember how to DA create the basic plot shown in Figure 1.1 of Pinheiro Bates (2004; p.4). DA The y-axis delineates a factor (Rail) while the x-axis displays

[R] Disregard my previous question

2007-10-12 Thread Leeds, Mark (IED)
I did ?par and it looks switching to mfrow will fix my problem so thanks but disregard my previous message and I apologize for not checking ?par first. I never thought it would be that simple. This is not an offer (or solicitation of an

[R] hist () x-axis

2007-10-12 Thread Birgit Lemcke
Hello all together, I (R Beginner) think the answer for my question is easy but anyway I have not found the solution. I am using hist for a frequency histogramm. But the divisions of the xaxis is to large How can I change the division (I am not sure if this is the right name for what I

[R] Problem with two libraries

2007-10-12 Thread Michael Kubovy
Hi, I'm running sessionInfo() R version 2.6.0 (2007-10-03) i386-apple-darwin8.10.1 locale: en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1] stats graphics grDevices utils datasets methods base I have two libraries: (1)

Re: [R] how to know whether Vector B is a subset of Vector A

2007-10-12 Thread Marc Schwartz
On Fri, 2007-10-12 at 18:47 +0800, Samuel wrote: Hi, I'm quite fresh to R, and a layman of English as well. I hope I can make you understood. Now I have two vectors A and B. Is there any quick way to know whether B is a subset of A? and If B is a subset of A, can I know easily which

Re: [R] how to know whether Vector B is a subset of Vector A

2007-10-12 Thread Peter Dalgaard
Samuel wrote: Hi, I'm quite fresh to R, and a layman of English as well. I hope I can make you understood. Now I have two vectors A and B. Is there any quick way to know whether B is a subset of A? and If B is a subset of A, can I know easily which elements in A (the index of A) equals to

[R] Anybody has ever met the problem to add a legend to a figure generated by image()?

2007-10-12 Thread zhijie zhang
Dear friends, Anybody has ever met the problem to add a legend to a figure generated by image()? I have three variables,x,y and z. x and y are the coordinates, and z is the third values. we can use image(x, y, z,...) to generate a figure according to the z-values, but the problem is the figure

[R] Q-type factor analysis

2007-10-12 Thread Julia Kröpfl
Hallo! Is there a package in R that does Q-type factor analysis? I know how to do principal component analysis, but haven't found any application of Q-type factor analysis. Thx, Julia -- Pt! Schon vom neuen GMX MultiMessenger gehört? Der kanns mit allen:

[R] irfs from a no intercept VAR

2007-10-12 Thread Martin Ivanov
Dear R users, I need perform structural analysis on a no intercept VAR model. Unfortunately the functions irf.VAR and dfev that come with the MSBVAR package only work with objects output by the reduced.form.var function, which seems to only evaluate VAR models with intercept. Is there a way to

[R] Basic plot question: Figure 1.1 Pinheiro Bates

2007-10-12 Thread David Afshartous
All, Sorry for overly simplistic question, but I can't seem to remember how to create the basic plot shown in Figure 1.1 of Pinheiro Bates (2004; p.4). The y-axis delineates a factor (Rail) while the x-axis displays the distribution of a continuous variable (time) according to each level of the

[R] how to know whether Vector B is a subset of Vector A

2007-10-12 Thread Samuel
Hi, I'm quite fresh to R, and a layman of English as well. I hope I can make you understood. Now I have two vectors A and B. Is there any quick way to know whether B is a subset of A? and If B is a subset of A, can I know easily which elements in A (the index of A) equals to B's elements

Re: [R] random forest mtry and mse

2007-10-12 Thread Kuhn, Max
Dave, I have been using random forest on a data set with 226 sites and 36 explanatory variables (continuous and categorical). When I use tune.randomforest to determine the best value to use in mtry there is a fairly consistent and steady decrease in MSE, with the optimum of mtry usually

[R] Differencing data by groups

2007-10-12 Thread Thomas Miller
Colleagues, I am analyzing data collected during oceanographic cruises. We have conducted many cruises over the last decade. On each cruise we visit ~50 stations. At each station (termed EventNum)we lower an instrument that measures depth, temperature, salinity and oxygen every few seconds as it

[R] Plotting question

2007-10-12 Thread Leeds, Mark (IED)
I am constructing plots ( regular not lattice ) and my initial command is par(mar=c(3,4,2,2), mfcol=c(5,2)) and then I create 10 plots on the page. It looks great but the plots on the page go in the order 16 27 38 49 510 Where the numbers denote decile breakdowns. Is there

Re: [R] Plotting question

2007-10-12 Thread hadley wickham
Have you looked at layout() ? Hadley On 10/12/07, Leeds, Mark (IED) [EMAIL PROTECTED] wrote: I am constructing plots ( regular not lattice ) and my initial command is par(mar=c(3,4,2,2), mfcol=c(5,2)) and then I create 10 plots on the page. It looks great but the plots on the page go in

Re: [R] variance explained by each term in a GAM

2007-10-12 Thread Julian Burgos
Dear Prof. Wood, Just another quick question. I am doing model selection following Wood and Augustin (2002). One of the criteria for retaining a term is to see if removing it causes an increase in the GCV score. When doing this, do I also need to fix the smooth parameters? Thanks, Julian

Re: [R] wireframe shade=T colorkey

2007-10-12 Thread Duncan Murdoch
On 10/11/2007 6:32 PM, Deepayan Sarkar wrote: On 10/11/07, Karim Rahim [EMAIL PROTECTED] wrote: Thank you for your reply. In this graphics context, I'm not sure what the incident or reflected light rays are. May I ask for an example of using a colour key with the volcano data using the

Re: [R] wireframe shade=T colorkey

2007-10-12 Thread Deepayan Sarkar
On 10/12/07, Duncan Murdoch [EMAIL PROTECTED] wrote: On 10/11/2007 6:32 PM, Deepayan Sarkar wrote: On 10/11/07, Karim Rahim [EMAIL PROTECTED] wrote: Thank you for your reply. In this graphics context, I'm not sure what the incident or reflected light rays are. May I ask for an

Re: [R] collapsing a data frame

2007-10-12 Thread Chris Stubben
On 10/12/07, Ben Bolker bolker at ufl.edu wrote: Trying to find a quick/slick/easily interpretable way to collapse a data set. Another alternative for SQL fans is the sqldf package. I used the MySQL driver here since SQLite does not support standard deviation. sqldf(select BROOD,

Re: [R] Q-type factor analysis

2007-10-12 Thread Kenn Konstabel
On 10/12/07, Julia Kröpfl [EMAIL PROTECTED] wrote: Is there a package in R that does Q-type factor analysis? I know how to do principal component analysis, but haven't found any application of Q-type factor analysis. Q-mode factor analysis is not a separate type of factor analysis but (in

Re: [R] Addition operation based on specific columns and rows of twodata frames

2007-10-12 Thread Leeds, Mark (IED)
My guess is that there's an easier way but this gives what you want. newY.df-aggregate(Y.df$Counts, list(Y.df[,1],Y.df[,2]), FUN=sum) names(newY.df)-names(X.df) temp.df-merge(newY.df, X.df, by=intersect(names(X.df),names(newY.df)),all=TRUE) almost.df-aggregate(temp.df$Counts,

Re: [R] use 'lapply' to creat 2 new columns based on old ones in a data frame

2007-10-12 Thread Sundar Dorai-Raj
runner said the following on 10/12/2007 4:46 PM: There is a dataset 'm', which has 3 columns: 'index', 'old1' and 'old2'; I want to create 2 new columns: 'new1' and 'new2' on this condition: if 'index'==i, then 'new1'='old1'+add[i]. 'add' is a vector of numbers to be added to old columns,

Re: [R] Differencing data by groups

2007-10-12 Thread jim holtman
What problem are you actually having with 'diff'? Now if you are using 'diff', you will get a vector that is shorter by one than the original. Now do you want to do do something like: Xbar = Sum{c(Depth[1], diff(Depth))*temp}/Sum(c(Depth[1], diff(Depth)) On 10/12/07, Thomas Miller [EMAIL

[R] TLCA Admin Email Connectivity Re: Returned mail: Data format error

2007-10-12 Thread TLCA Admin
Due to an intermittent Broadband connection, I cannot check email as often as I'd like. Please be assured that all your emails are being received I will respond to those that require attention as my ISP Connection allows. CIncinnati Bell cannot advise as to when this will be fixed, so I ask that

Re: [R] collapsing a data frame

2007-10-12 Thread hadley wickham
On 10/12/07, Ben Bolker [EMAIL PROTECTED] wrote: Trying to find a quick/slick/easily interpretable way to collapse a data set. Suppose I have a data set that looks like this: h - structure(list(INDEX = structure(1:6, .Label = c(1, 2, 3, 4, 5, 6), class = factor), TICKS = c(0, 0, 0, 0,

Re: [R] collapsing a data frame

2007-10-12 Thread hadley wickham
Here's a solution that takes the first element of each factor and the mean of each numeric variable. I can imagine there are more general/flexible solutions. (One might want to specify more than one summary function, or specify that factors that vary within group should be dropped.)

Re: [R] Image analysis and image questions

2007-10-12 Thread Henrik Bengtsson
See the EBImage package on Bioconductor.org. It builds on top of ImageMagick. /Henrik On 10/12/07, Bio7 [EMAIL PROTECTED] wrote: Dear R users, in my application i can transfer images to R with the help of Rserve. The images come from a java application. When i plot a greyscale image