Re: [R] finite difference scheme for 2D differential equations

2010-05-12 Thread Thomas Petzoldt
Hello Subodh Acharya, I've been away for a field trip for two weeks, and I guess you have already found a solution for your problem. If your question is still open, you may consider to look into package deSolve that now provides functions (ode1D, ode2D and ode3D) for solving 1-3 dimensional

Re: [R] How to generate Mackey-Glass time series with ddesolve package?

2010-05-12 Thread Thomas Petzoldt
Hello Mike, please provide a reproducible example, so that we can see why and how ddesolve hangs. In addition you may consider using function dede from package deSolve which allows to choose between different solver methods for dealing with delay differential equations. Thomas Petzoldt Am

[R] Package RPostgreSQL : Problem with dbWriteTable

2010-05-12 Thread PALMIER Patrick - CETE NP/INFRA/TRF
Hello, I have a probem with dbWriteTable method of package RPostrgreSQL The table is well added in the database but R doesn't succeed in inserting rows But If I send the COPY FROM as an sql query in R, the rows are then well added I think it is a problem with the temp file create by

Re: [R] make: Nothing to be done for `all'.

2010-05-12 Thread Romain Francois
Le 12/05/10 00:23, Elizabeth Lawson a écrit : Why would I want to remove (rm) the file. I am trying to compile it. make thinks : Why would I compile this file, the result is already there First time : rom...@naxos /tmp $ R CMD SHLIB hello.c gcc-4.2 -arch x86_64 -std=gnu99

Re: [R] Revolution R and the R Community?

2010-05-12 Thread Tal Galili
Thanks for the corrections Duncan, I didn't know about Bill Dunlap affiliation with Tibco. Best, Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) |

Re: [R] RWinEdt in WinEdt 6

2010-05-12 Thread Uwe Ligges
On 11.05.2010 22:00, Gregoire wrote: Thanks for your reply Uwe. I'll just have to keep up with the cutting and pasting, Well, using WinEdt 5.x is the other option. which isn't so bad. But it's a useful little plugin. Thanks for your willingness to continue to develop it. All the best,

Re: [R] Gantt chart - more than one colour on a line

2010-05-12 Thread Jim Lemon
On 05/12/2010 01:52 AM, D Holl wrote: Dear all I would like to plot a Gantt chart type plot, but with more than one colour on a line. The gantt.chart function will allow me to add more than one bar on a line, but it is in the same colour as the first bar on that line. For example (using the

Re: [R] Whiskers on the default boxplot {graphics}

2010-05-12 Thread Dennis Murphy
Hi: Let's do some math :) On Tue, May 11, 2010 at 8:55 PM, Jason Rupert jasonkrup...@yahoo.comwrote: Okay...Let me see if I've got it... I'm just trying to use the default boxplot {graphics} capability in R... So I call something like the following: boxplot(mpg~cyl,data=mtcars, main=Car

Re: [R] summing items within a row

2010-05-12 Thread Dennis Murphy
Hi: Does the following work? xx - matrix(1:5, nrow = 4, ncol = 10) colnames(xx) - paste(rep(LETTERS[1:5], 2), rep(1:2, each = 5), sep = '') xx A1 B1 C1 D1 E1 A2 B2 C2 D2 E2 [1,] 1 5 4 3 2 1 5 4 3 2 [2,] 2 1 5 4 3 2 1 5 4 3 [3,] 3 2 1 5 4 3 2 1 5 4 [4,] 4 3

Re: [R] Gasoline Data in pls package

2010-05-12 Thread Bjørn-Helge Mevik
Ravi Ramaswamy raram...@gmail.com writes: I am using pls package for some pcr computations. There is a data set called gasoline. Would someone be able to tell me what command(s) could be used to produce this graph in R? I presume you are talking about Figure 1 in the pls article in R news

Re: [R] sorting rows of dataframe

2010-05-12 Thread Dennis Murphy
Hi: First of all, look at str(dataframename) It sounds as though you need to convert Month to an ordered factor, something like df$Month - ordered(df$Month, levels = month.abb) df$Month The second command is to check that the newly created factor orders the months appropriately. Here's a small

[R] paste two columns of a matrix by rows

2010-05-12 Thread Assa Yeroslaviz
Hello, I'm trying to paste two columns of a matrix GB_ACCGENEGENE_SYMBOL NM_010657NM_010657 NM_027162NM_027162 NM_198863NM_198863 NM_010727NM_010727 These two column are a part of a 41,000 x 26 matrix. I wanted these two column to be pasted into one (the firstone,

Re: [R] make: Nothing to be done for `all'.

2010-05-12 Thread Benilton Carvalho
Have you removed the *.so and *.o files prior to R CMD SHLIB hello.c? b On Tue, May 11, 2010 at 11:39 PM, Elizabeth Lawson lawson.elizab...@gmail.com wrote: I recently bought a new macbook pro 10.6.3 and I am trying to compile some C code I have.  I reinstalled R and Xcode on the Mac but I

[R] slot assignment in S4 classes

2010-05-12 Thread Albert-Jan Roskam
Hi R friends,   I'm still studying S4 classes and I have a question about slot assignment. Why would I have to use a special setter method [example 2 below] if I can assign data to a slot directly when I call new() [example 1 below]?   ## first way to do it (the idiosyncratic way?)

Re: [R] Creating data frames in a loop

2010-05-12 Thread sayan dasgupta
Well you can try for(i in 1:20) { assign(paste(ddat,i,sep=_),data) other processing... } -- View this message in context: http://r.789695.n4.nabble.com/Creating-data-frames-in-a-loop-tp2195527p2195681.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] ANCOVA in R, single CoVar, two Variables

2010-05-12 Thread Tom W
Thankyou all for the replies! I am sure you can guess the next question that is coming... I expanded the code (and the data set) to now include a third type C, which I made VERY similar to A: anco - read.table(tmp, header=TRUE) close.connection(tmp) wind - data.frame(day=rep(anco$day, 3),

Re: [R] help! - spectral analysis - spec.pgram

2010-05-12 Thread vikrant
Dear Prof Brian, I am new to spectral analysis. I dont know how to obtain period from spectral periodogram. If u could explain me about how to obtain the period from periodogram it will be very helpful. U can explain using the above two examples in the discussiion. Thanks in advance.. -- View

[R] How to Add background color to title

2010-05-12 Thread Venkat Karthik
Hi, I have been searching alot on how to add background color to the title alone. I have not been able to find a solution for that. Pls could you help me out with this Regards, Karthik [[alternative HTML version deleted]] __

Re: [R] How to Add background color to title

2010-05-12 Thread Jim Lemon
On 05/12/2010 04:38 PM, Venkat Karthik wrote: Hi, I have been searching alot on how to add background color to the title alone. I have not been able to find a solution for that. Pls could you help me out with this Hi Karthik, Maybe you want something like the tab.title function in the

[R] Finding different hues for a mosaic plot compatible with grayscale printing

2010-05-12 Thread Simon Kiss
I'm working with the following code below to generate a how do I set the h,c, and l values such that the significant, positive residuals appear different on a grayscale printer from significant grayscale residuals. The challenge as I see it is that one can only distinguish the positive and

[R] bwplot: how to draw smooth curve through medians?

2010-05-12 Thread Marius Hofert
Dear R experts, Is there an easy way how to combine the black dots (i.e., the medians) in the bwplot bwplot(voice.part ~ height, data=singer, xlab=Height (inches)) by a smooth curve? Cheers, Marius __ R-help@r-project.org mailing list

Re: [R] Whiskers on the default boxplot {graphics}

2010-05-12 Thread Jason Rupert
Fantastic! It would be great if the description could be modified to include the mysterious bit about the upper and lower bound whisker positions: upper whisker = min(max(x), Q_3 + 1.5 * IQR) lower whisker = max(min(x), Q_1 - 1.5 * IQR) Maybe that is clearly written in the description of

Re: [R] How to extract sum of particular months in a monthly data series

2010-05-12 Thread Gabor Grothendieck
Try this: library(zoo) z - as.zoo(AirPassengers) time(z) - as.yearmon(time(z)) ix - cycle(as.ts(z)) %in% c(3:5, 10:11) aggregate(z[ix], floor, sum) or this: ix - format(time(z), %m) %in% c(03, 04, 05, 10, 11) aggregate(z[ix], floor, sum) It would be best if next time you posted some sample

Re: [R] dbSendQuery with R variables

2010-05-12 Thread Gabor Grothendieck
Try this. If fn$ prefaces the function name, subject to certain rules string which determine which arguments are re-interpreted, interpolation somewhat like in perl occurs. Here we have enclosed stations[[1]] in back quotes. library(gsubfn) stations - c(stationA, stationB) rs_stations -

Re: [R] Table and Sweave

2010-05-12 Thread Silvano
Ista, I have a dataset with 148 observations and 17 variables. I used EpiData to create the database DATANASC SEXO IDADE PESO ESTATURA IMC 1955-01-20F 54.4 136 1.52 58.9 1971-04-20F 38.2 73 1.68 25.9 1919-04-25F 90.2 62 1.58 24.8 1943-07-12F 66.0 65

Re: [R] median of two groups

2010-05-12 Thread cheba meier
Thank you very much. These is no statistician where I am! It was clear for me from the previous email that it is possible to do permutation on the median differences even if we have unpaired and unbalanced samples. I was only confused about the null hypothesis ( median difference or difference of

Re: [R] paste two columns of a matrix by rows

2010-05-12 Thread jim holtman
Have you tried: combined[,19] - paste(combined[,19], combined[,20], sep=' ') On Wed, May 12, 2010 at 4:40 AM, Assa Yeroslaviz fry...@gmail.com wrote: Hello, I'm trying to paste two columns of a matrix GB_ACCGENEGENE_SYMBOL NM_010657NM_010657 NM_027162NM_027162 NM_198863

Re: [R] Vectorized expression to extrapolate matrix columns with columns of another matrix

2010-05-12 Thread Jeffrey J. Hallman
Abiel X Reinhart abiel.x.reinh...@jpmchase.com writes: I have two identically sized matrices of data that represent time series (I am storing the data in zoo objects, but the idea should apply to any matrix of data). The time series in the second matrix extend further than in the first

[R] compiling an R script

2010-05-12 Thread Jean-Christophe Domenge
Dear R gurus, some guy at my company would like to compile a script written in R. In short he would like to create an execution directory containing only binaries resulting from the compilation of R and C++ sources, while keeping the said sources on another machine. Thanks for any help,

Re: [R] Vectorized expression to extrapolate matrix columns with columns of another matrix

2010-05-12 Thread Gabor Grothendieck
Try this using the zoo package. See ?na.approx for more and note that this functionality requires zoo 1.6-3 or later. . m - zoo(cbind(c(1, 2, NA, NA, 5, NA, 7), seq(7)^2), as.Date(1:7)) na.approx(m[, 1], x = m[, 2]) 1970-01-02 1970-01-03 1970-01-04 1970-01-05 1970-01-06 1970-01-07 1970-01-08

Re: [R] Finding different hues for a mosaic plot compatible with grayscale printing

2010-05-12 Thread Jim Lemon
On 05/12/2010 07:34 PM, Simon Kiss wrote: I'm working with the following code below to generate a how do I set the h,c, and l values such that the significant, positive residuals appear different on a grayscale printer from significant grayscale residuals. The challenge as I see it is that one

Re: [R] How to extract sum of particular months in a monthly data series

2010-05-12 Thread Zablone Owiti
Thanks Dr. Gabor, the commands you gave worked. ZABLONE OWITI GRADUATE STUDENT College of Atmospheric Science Nanjing University of Information, Science and Technology Add: 219 Ning Liu Rd, Nanjing, Jiangsu, 21004, P.R. China Tel: +86-25-58731402 Fax:

[R] Input encoding problem when using sweave with xetex

2010-05-12 Thread Erich Studerus
Hello Because I want to use different true type fonts with latex, I'm using the XeTeX typesetting engine for my sweave-documents. I'm using Lyx with Sweave on a Windows 7 PC and have set up LyX to work with XeTeX according to the following instructions: http://wiki.lyx.org/LyX/XeTeX

[R] Henrique Dallazuanna quer ficar em contato no LinkedIn

2010-05-12 Thread Henrique Dallazuanna
LinkedIn Henrique Dallazuanna requested to add you as a connection on LinkedIn: -- Arnaud, Eu gostaria de adicioná-lo(a) à minha rede profissional no LinkedIn. - Henrique Dallazuanna Accept invitation from Henrique Dallazuanna

Re: [R] paste two columns of a matrix by rows

2010-05-12 Thread Assa Yeroslaviz
THX, it's working now. On Wed, May 12, 2010 at 13:54, jim holtman jholt...@gmail.com wrote: Have you tried: combined[,19] - paste(combined[,19], combined[,20], sep=' ') On Wed, May 12, 2010 at 4:40 AM, Assa Yeroslaviz fry...@gmail.com wrote: Hello, I'm trying to paste two columns of a

[R] Convert data.frame or matrix to list

2010-05-12 Thread Dror
Hi, i have the following data.frame : Data[1:3,] dt amt geoTree merTree ref 1 0.71002484 3.334570 A2b B2b 0 2 0.49074936 2.544464 A2b B1a 0 3 0.06223433 3.617133 A1b B2a 0 i want to convert it to a list, like this:

[R] fisher's posthock test or fisher's combination test

2010-05-12 Thread Knut Krueger
Hi to all is there a fisher's post hock test or fisher's combination test in R available? Maybe not -- its very easy to do it in excel ... Kind regards Knut __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

[R] Removing points

2010-05-12 Thread Blue.Egg
I have a some data, and imagine a column of how many parasitic eggs found in the stool of some children some of the children we do not have this data so we put -1 in stead. How can you remove the people with -1, to calculate means and do box plots. Thank you! -- View this message in context:

Re: [R] Convert data.frame or matrix to list

2010-05-12 Thread Henrique Dallazuanna
Try this: split(Data, 1:nrow(Data)) On Wed, May 12, 2010 at 9:13 AM, Dror droryo...@hotmail.com wrote: Hi, i have the following data.frame : Data[1:3,] dt amt geoTree merTree ref 1 0.71002484 3.334570 A2b B2b 0 2 0.49074936 2.544464 A2b B1a

Re: [R] Splines under tension

2010-05-12 Thread Terry Therneau
---begin included message --- Does anyone know if R has a function for splines under tension. I know there are numerous packages for spline interpolation within R i just can't find one that lets you determine the tension factor. -- In the statistics literature these are called

[R] Data Mining Survey

2010-05-12 Thread Muenchen, Robert A (Bob)
Dear R-Helpers, SAS Institute just mailed out the notice below regarding a survey of people who do data mining. To help keep the survey from becoming biased toward commercial software, I thought it would be good to post it here as well. Cheers, Bob Fourth Annual Data Miner Survey Rexer

[R] data frame subscription

2010-05-12 Thread arnaud Gaboury
Dear group, Here is my df : pose16 - structure(list(DESCRIPTION = structure(c(1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 12L), .Label = c(COPPER May/10, COTTON NO.2 Jul/10, CRUDE OIL miNY May/10, GOLD Jun/10, ROBUSTA COFFEE (10) Jul/10, SOYBEANS Jul/10, SUGAR NO.11 Jul/10, SUGAR NO.11 May/10, WHEAT

Re: [R] Removing points

2010-05-12 Thread Tal Galili
Hi Egg, please read this: http://www.statmethods.net/management/subset.html Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) |

Re: [R] Removing points

2010-05-12 Thread jim holtman
It would be helpful to post some actual data. You can do: mean(x[x != -1]) On Wed, May 12, 2010 at 8:33 AM, Blue.Egg avonpfe...@gmail.com wrote: I have a some data, and imagine a column of how many parasitic eggs found in the stool of some children some of the children we do not have this

Re: [R] Removing points

2010-05-12 Thread John Kane
?subset --- On Wed, 5/12/10, Blue.Egg avonpfe...@gmail.com wrote: From: Blue.Egg avonpfe...@gmail.com Subject: [R] Removing points To: r-help@r-project.org Received: Wednesday, May 12, 2010, 8:33 AM I have a some data, and imagine a column of how many parasitic eggs found in the stool

Re: [R] slot assignment in S4 classes

2010-05-12 Thread Martin Morgan
On 05/12/2010 01:48 AM, Albert-Jan Roskam wrote: Hi R friends, I'm still studying S4 classes and I have a question about slot assignment. Why would I have to use a special setter method [example 2 below] if I can assign data to a slot directly when I call new() [example 1 below]? ## first

Re: [R] compiling an R script

2010-05-12 Thread Duncan Murdoch
On 12/05/2010 8:34 AM, Jean-Christophe Domenge wrote: Dear R gurus, some guy at my company would like to compile a script written in R. In short he would like to create an execution directory containing only binaries resulting from the compilation of R and C++ sources, while keeping the said

Re: [R] Input encoding problem when using sweave with xetex

2010-05-12 Thread Duncan Murdoch
On 12/05/2010 8:37 AM, Erich Studerus wrote: Hello Because I want to use different true type fonts with latex, I'm using the XeTeX typesetting engine for my sweave-documents. I'm using Lyx with Sweave on a Windows 7 PC and have set up LyX to work with XeTeX according to the following

[R] Boxplot position on X-axis relative to it's value

2010-05-12 Thread Mächler Marc Jaques
Dear R-Experts. I collected different datas about Nitrogen content (mg/ml) in Dung. The dung was eighter fresh (day=0) or had different ages (15,29,47) to observe nutrient changes over time. Now I like to draw a boxplot. boxplot(nmgml~day) abline((nmgml~day) The Problem is, that the boxplot

Re: [R] data frame subscription

2010-05-12 Thread Henrique Dallazuanna
Try this: transform(pose16, prix = POSITION * SETTLEMENT, SETTLEMENT = NULL, POSITION = POSITION * -1) On Wed, May 12, 2010 at 9:50 AM, arnaud Gaboury arnaud.gabo...@gmail.comwrote: Dear group, Here is my df : pose16 - structure(list(DESCRIPTION = structure(c(1L, 2L, 3L, 4L, 5L, 6L, 7L,

Re: [R] Input encoding problem when using sweave with xetex

2010-05-12 Thread Erich Studerus
Thanks. Since the encoding of x is unknown (Encoding(x) gives unknown), I tried iconv(x, , UTF-8) Unfortunately, accented letters are still not printed in the final PDF output. Regards, Erich -Ursprüngliche Nachricht- Von: Duncan Murdoch [mailto:murdoch.dun...@gmail.com] Gesendet:

Re: [R] fisher's posthock test or fisher's combination test

2010-05-12 Thread Ted Harding
On 12-May-10 10:14:41, Knut Krueger wrote: Hi to all is there a fisher's post hock test or fisher's combination test in R available? Maybe not -- its very easy to do it in excel ... Kind regards Knut ... Which is the best of all possible reasons for having it available in R. And indeed it

Re: [R] Random walk

2010-05-12 Thread Giovanni Petris
Oops, I forgot the 'cumsum' stuff. Here it is again, hopefully working this time. require(MASS) fz - function(n, t, rho){ + f - array(dim = c(t, 2, n)) + V - matrix(c(1, rho, rho, 1), ncol = 2) + for(i in 1 : n){ + f[,, i] - apply(mvrnorm(n = t, mu = c(0,0), Sigma = V), +

Re: [R] Vectorized expression to extrapolate matrix columns with columns of another matrix

2010-05-12 Thread Gabor Grothendieck
Use rule = 2 as in the extrapolation examples in the na.approx help file. On Wed, May 12, 2010 at 10:10 AM, Abiel X Reinhart abiel.x.reinh...@jpmchase.com wrote: Gabor, This comes close to solving my problem, but I am still left with the problem of how I can extrapolate, not just

Re: [R] Table and Sweave

2010-05-12 Thread Ista Zahn
And what exactly is the problem? -Ista On Wednesday 12 May 2010 7:32:20 am Silvano wrote: Ista, I have a dataset with 148 observations and 17 variables. I used EpiData to create the database DATANASC SEXO IDADE PESO ESTATURA IMC 1955-01-20F 54.4 136 1.52 58.9 1971-04-20F

Re: [R] Input encoding problem when using sweave with xetex

2010-05-12 Thread Duncan Murdoch
On 12/05/2010 9:48 AM, Erich Studerus wrote: Thanks. Since the encoding of x is unknown (Encoding(x) gives unknown), I tried iconv(x, , UTF-8) Unfortunately, accented letters are still not printed in the final PDF output. I think I gave you incomplete advice. The line above will

[R] F-statistic in ARIMA model

2010-05-12 Thread Shubha Vishwanath Karanth
Hi all, Can I get the F-statistic from the arima() option? Or at least the residual degrees of freedom in the arima()? Or do I have to convert the ARIMA model back to the regression model and then get the F-statistic? Thanks. Thanks, Shubha This e-mail may contain confidential and/or

Re: [R] data frame subscription

2010-05-12 Thread Henrique Dallazuanna
But: pose16$POSITION * pose16$SETTLEMENT is [1] -702.90 244.77 166.48 2273.80 24876.00 2985.0080.90 -15.95 2512.50 -2423.00 not: c(702.9, -244.77, -166.48, -2273.8, -24876, -2985, -80.9, 15.95, -2512.5, 2423) On Wed, May 12, 2010 at 11:53 AM, arnaud Gaboury

Re: [R] Table and Sweave

2010-05-12 Thread David Winsemius
Is it possible that we do not have the full session code and that attach(df) was executed off-stage so to speak, or perhaps the OP is following an example where attach(df) was executed several pages earlier. The column names are being treated in the code as first class objects. -- David.

Re: [R] data frame subscription

2010-05-12 Thread arnaud Gaboury
I was just adding the minus sign to the line when I got your mail. Yes, it works that way. TY for the transform function. -Original Message- From: David Winsemius [mailto:dwinsem...@comcast.net] Sent: Wednesday, May 12, 2010 5:07 PM To: Henrique Dallazuanna Cc: arnaud Gaboury;

Re: [R] Input encoding problem when using sweave with xetex

2010-05-12 Thread Erich Studerus
Putting \usepackage[cp1252]{inputenc} into my preamble is not an option, because XeTeX unlike LaTeX needs UTF-8 has input encoding. My goal is also to have a LyX document that can be compiled both on Mac and Windows. I usually compile my Lyx-Sweave documents by one click of a button from within

[R] Regressions with fixed-effect in R

2010-05-12 Thread Millo Giovanni
Dear Liviu, we're still working on measures of fit for panels. If I get you right, what you mean is the R^2 of the demeaned, or within, regression. A quick and dirty function to do this is: pmodel.response-plm:::pmodel.response.plm # needs this to make the method accessible r2-function(x,

[R] analysing categorical explanatory variable effects

2010-05-12 Thread amatoallah ouchen
Good day R -users, I've a general question, I have a quantitative dependant variable and categorical explanatory variables my aim is to identify the most significant variables that explain my dependant variable behavior, I know this isn't the right forum for a such question but any helps

[R] snow makeCluster (makeSOCKcluster) not working in R-2.11

2010-05-12 Thread Abhijit Dasgupta
Hello, I was using snow to parallel-process some code in R-2.10 (32-bit windows. ). The code is as follows: require(foreach) require(doSNOW) cl - makeCluster(6, type='SOCK') registerDoSNOW(cl) bl2 - foreach(i=icount(length(unqmrno))) %dopar% { (some code here) } stopCluster(cl) When I run the

Re: [R] Vectorized expression to extrapolate matrix columns with columns of another matrix

2010-05-12 Thread Gabor Grothendieck
Yes, that is what it does. Note that na.approx interpolates and does not work precisely as you discussed but its easy, does use m[,2] and may be good enough. If you really do want something precisely as you discussed try this. It NAs out the rows of m for which column 1 is NA and then uses

[R] plot error

2010-05-12 Thread Mohsen Jafarikia
Hello All: I am having the following error message when I increase the resolution (res=30 to res=350) of my graph: Error in plot.xy(xy, type, ...) : ignoring SIGPIPE signal Calls: plot - plot.default - plot.xy Execution halted Here is the code: ofn - MAY11.png bitmap(ofn, type = png256, width

Re: [R] Summarizing counts by multiple factors

2010-05-12 Thread William Dunlap
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Noah Silverman Sent: Tuesday, May 11, 2010 5:38 PM To: r-help@r-project.org Subject: [R] Summarizing counts by multiple factors Hi, An example data set is: grouplevelcolor A1

[R] Using plyr and segmented together - output problem

2010-05-12 Thread Ken Minns
I am using the package segmented to fit a simple breakpoint regression to a large number of sets of x,y data. I have used ddply in the package plyr to allow me to run many data sets and gather the results into a data.frame. When I run it I get 3 rows inserted in the output data.frame for each

[R] R version of SAS/IntrNet

2010-05-12 Thread Mark Lamias
Does an R package exist that is similar to SAS/Intrnet (http://support.sas.com/documentation/onlinedoc/intrnet/index.html) that will allow users to take parameters passed to it by a web request, produce results and return them to the web-browser in HTML format?  I tried looking through the

[R] Reading R code help--Beginner

2010-05-12 Thread Makada Henry
Hi, I am brand new to R and not familiar with the language, though I have been reading the manuals and making some slow going progress. I am working with some source code from a Global Vector Auto -Regressive program written by Ranier Puhr from the R-forge group. I need help interpreting

Re: [R] Vectorized expression to extrapolate matrix columns with columns of another matrix

2010-05-12 Thread Abiel X Reinhart
Gabor, This comes close to solving my problem, but I am still left with the problem of how I can extrapolate, not just interpolate. In our example, if I define m as, m - zoo(cbind(c(1, 2, NA, NA, 5, NA, NA), seq(7)^2), as.Date(1:7)) instead of m - zoo(cbind(c(1, 2, NA, NA, 5, NA, 7),

Re: [R] data frame subscription

2010-05-12 Thread arnaud Gaboury
The result is different with your code. My result is : pose16 - structure(list(DESCRIPTION = structure(c(1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 12L), .Label = c(COPPER May/10, COTTON NO.2 Jul/10, CRUDE OIL miNY May/10, GOLD Jun/10, ROBUSTA COFFEE (10) Jul/10, SOYBEANS Jul/10, SUGAR NO.11 Jul/10,

Re: [R] data frame subscription

2010-05-12 Thread arnaud Gaboury
TY. Didn't know this function. From: Henrique Dallazuanna [mailto:www...@gmail.com] Sent: Wednesday, May 12, 2010 3:32 PM To: arnaud Gaboury Cc: r-help@r-project.org Subject: Re: [R] data frame subscription Try this: transform(pose16, prix = POSITION * SETTLEMENT, SETTLEMENT = NULL,

Re: [R] data frame subscription

2010-05-12 Thread David Winsemius
Couldn't you just put a minus sign in from of the derived prix expression? transform(pose16, prix = - POSITION * SETTLEMENT, SETTLEMENT = NULL, POSITION = POSITION * -1) On May 12, 2010, at 10:59 AM, Henrique Dallazuanna wrote: But: pose16$POSITION * pose16$SETTLEMENT is [1] -702.90

[R] what the problem could be if i am suddenly unable to add abline to the scatter plot?

2010-05-12 Thread xin wei
I am doing very regular stuff like the following: attach(wtana) fm- lm(Body.Wt.on.SD1~Heart.Wt, data=wtana) #fm- lm(wtana$Body.Wt.on.SD1~wtana$Heart.Wt) lrf- loess(Body.Wt.on.SD1~Heart.Wt, wtana) #lrf- loess(wtana$Body.Wt.on.SD1~wtana$Heart.Wt) plot(Body.Wt.on.SD1,Heart.Wt)

Re: [R] Using plyr and segmented together - output problem

2010-05-12 Thread Hadley Wickham
Hi Ken, Could you please provide a small reproducible example? There are some hints on how to do so at http://gist.github.com/270442. Hadley On Wed, May 12, 2010 at 11:22 AM, Ken Minns k...@minns.ca wrote: I am using the package segmented to fit a simple breakpoint regression to a large

Re: [R] Vectorized expression to extrapolate matrix columns with columns of another matrix

2010-05-12 Thread Abiel X Reinhart
Gabor, Maybe I am doing this wrong, but rule=2 does not look like it is growing the series out, but rather just carrying the last value forward. It looks like na.approx() followed by na.locf(). For instance: m - zoo(cbind(c(1, 2, NA, NA, 5, NA, NA), seq(7)^2), as.Date(1:7)) na.approx(m[, 1], x

Re: [R] Input encoding problem when using sweave with xetex

2010-05-12 Thread Duncan Murdoch
On 12/05/2010 11:36 AM, Erich Studerus wrote: Putting \usepackage[cp1252]{inputenc} into my preamble is not an option, because XeTeX unlike LaTeX needs UTF-8 has input encoding. My goal is also to have a LyX document that can be compiled both on Mac and Windows. I usually compile my Lyx-Sweave

Re: [R] Whiskers on the default boxplot {graphics}

2010-05-12 Thread Robert Baer
- Original Message - Fantastic! It would be great if the description could be modified to include the mysterious bit about the upper and lower bound whisker positions: upper whisker = min(max(x), Q_3 + 1.5 * IQR) lower whisker = max(min(x), Q_1 - 1.5 * IQR) -- snip --

Re: [R] RWinEdt in WinEdt 6

2010-05-12 Thread Gregoire
Yes, I could do that. But the license for WinEdt 6 is not the same as the license for WinEdt 5.x, so I would have to buy WinEdt 5.x to use RWinEdt, which is a bit unfortunate. Maybe I'll do that though. Gregory -- View this message in context:

[R] function

2010-05-12 Thread n.via...@libero.it
Dear list, I'm trying to implement the following function, but what I get is an error message and I don't understand where is the error: #outliers'identification: iqr=lapply(bb,function(){ inner_fencesl=quantile(x,0.25)-1.5*IQR(x) inner_fencesh=quantile(x,0.75)+1.5*IQR(x)

Re: [R] P values

2010-05-12 Thread Greg Snow
Bert, I think that you are missunderstanding my point. At least part of the blame for that is mine, I should have put more time into my post, but I had to catch my bus. Se inline below: -Original Message- From: Bert Gunter [mailto:gunter.ber...@gene.com] Sent: Tuesday, May 11,

Re: [R] what the problem could be if i am suddenly unable to add abline to the scatter plot?

2010-05-12 Thread David Winsemius
On May 12, 2010, at 11:57 AM, xin wei wrote: I am doing very regular stuff like the following: attach(wtana) fm- lm(Body.Wt.on.SD1~Heart.Wt, data=wtana) #fm- lm(wtana$Body.Wt.on.SD1~wtana$Heart.Wt) lrf- loess(Body.Wt.on.SD1~Heart.Wt, wtana) #lrf- loess(wtana$Body.Wt.on.SD1~wtana$Heart.Wt)

Re: [R] function

2010-05-12 Thread Daniel Malter
There is too little information to answer your question definitively. However, an obvious reason is that you want to apply the function over columns of a data.frame, which is done with apply(), but you try to apply the function over elements of a list using lapply(). A list is not a data.frame

Re: [R] what the problem could be if i am suddenly unable to add abline to the scatter plot?

2010-05-12 Thread Erik Iverson
David Winsemius wrote: On May 12, 2010, at 11:57 AM, xin wei wrote: I am doing very regular stuff like the following: attach(wtana) fm- lm(Body.Wt.on.SD1~Heart.Wt, data=wtana) #fm- lm(wtana$Body.Wt.on.SD1~wtana$Heart.Wt) lrf- loess(Body.Wt.on.SD1~Heart.Wt, wtana) #lrf-

Re: [R] function

2010-05-12 Thread Sarah Goslee
I missed the original query, but here am replying to the respondent. On Wed, May 12, 2010 at 1:28 PM, Daniel Malter dan...@umd.edu wrote: There is too little information to answer your question definitively. However, an obvious reason is that you want to apply the function over columns of a

Re: [R] bwplot: how to draw smooth curve through medians?

2010-05-12 Thread Deepayan Sarkar
On Wed, May 12, 2010 at 3:24 AM, Marius Hofert m_hof...@web.de wrote: Dear R experts, Is there an easy way how to combine the black dots (i.e., the medians) in the bwplot bwplot(voice.part ~ height, data=singer, xlab=Height (inches)) by a smooth curve? Depends on what you mean by smooth.

Re: [R] what the problem could be if i am suddenly unable to add abline to the scatter plot?

2010-05-12 Thread David Winsemius
On May 12, 2010, at 1:30 PM, Erik Iverson wrote: David Winsemius wrote: On May 12, 2010, at 11:57 AM, xin wei wrote: I am doing very regular stuff like the following: attach(wtana) fm- lm(Body.Wt.on.SD1~Heart.Wt, data=wtana) #fm- lm(wtana$Body.Wt.on.SD1~wtana$Heart.Wt) lrf-

Re: [R] what the problem could be if i am suddenly unable to add abline to the scatter plot?

2010-05-12 Thread Daniel Malter
Xin, you plot the scatterplot wrongly. Note that the lm (your OLS regression) has a wiggle, whereas you plot command has a comma. The plot command also should have a wiggle so that you plot y against x and not x against y. See example below: x=rnorm(100);e=rnorm(100) y=2*x+e reg=lm(y~x)

Re: [R] Data Mining Survey

2010-05-12 Thread Muenchen, Robert A (Bob)
Oops! I forgot that R-help strips out HTML. When I checked the link, it referenced SAS.COM. I've written Karl Rexer for a more appropriate one. More soon. -Bob -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Muenchen, Robert A (Bob)

Re: [R] function

2010-05-12 Thread David Winsemius
On May 12, 2010, at 1:28 PM, Daniel Malter wrote: There is too little information to answer your question definitively. However, an obvious reason is that you want to apply the function over columns of a data.frame, which is done with apply(), but you try to apply the function over

Re: [R] what the problem could be if i am suddenly unable to add abline to the scatter plot?

2010-05-12 Thread Daniel Malter
Just a quick addendum: You actually plot the line. If it is not in the graph then just because it is outside the limits of the plotting region. But since it's the right line on the wrong plot, it does not matter anyway. You need to get the plot right first, which you do in the way I described

Re: [R] Boxplot position on X-axis relative to it's value

2010-05-12 Thread RICHARD M. HEIBERGER
You can use the bwplot panel in the HH package. You might need to install HH first, by uncommenting the line below. girafe.txt - textConnection( day nmgml 1 29 2.72655 2 29 2.48820 3 15 2.85945 4 15 2.58915 5 15 2.88345 6 15 2.66675 7 47 3.29125 8 15 2.44085 9 29 2.43065

Re: [R] function

2010-05-12 Thread William Dunlap
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of David Winsemius Sent: Wednesday, May 12, 2010 10:41 AM To: Daniel Malter Cc: r-help@r-project.org Subject: Re: [R] function On May 12, 2010, at 1:28 PM, Daniel Malter

Re: [R] Boxplot position on X-axis relative to it's value

2010-05-12 Thread Henrique Dallazuanna
One option could be: # Using Richard's example boxplot(nmgml ~ factor(day, levels = do.call(seq, as.list(range(girafe$day, data = girafe, xaxt = 'n') axis(1, at = unique(girafe$day)) On Wed, May 12, 2010 at 10:30 AM, Mächler Marc Jaques ma...@student.ethz.ch wrote: Dear R-Experts.

Re: [R] Input encoding problem when using sweave with xetex

2010-05-12 Thread Erich Studerus
Thank you! I edited the Sweave.sh file and it works now for reading data stored as R data files, but the read.xls function from the gdata-package does no longer work. options('encoding'='UTF-8') require(gdata) read.xls(http://www.schwerhoerigkeit.pop.ch/hoergeraete_test.xls;, stringsAsFactors

[R] R 2.11 on redhat el5/x86_64?

2010-05-12 Thread Dick Beyer
Hi, Will compiled R 2.11 be made available for redhat el5/x86_64 soon? The download link: http://cran.fhcrc.org/bin/linux/redhat/el5/x86_64/ is still at R 2.10.0. Thanks much, Dick *** Richard P. Beyer, Ph.D.

Re: [R] Reading R code help--Beginner

2010-05-12 Thread Steve Lianoglou
Hi, On Wed, May 12, 2010 at 12:11 PM, Makada Henry mhenry_...@msn.com wrote: Hi, I am brand new to R and not familiar with the language, though I have been reading the manuals and making some slow going progress. I am working with some source code from a Global Vector Auto -Regressive

Re: [R] Reading R code help--Beginner

2010-05-12 Thread Erik Iverson
Hi, I am brand new to R and not familiar with the language, though I have been reading the manuals and making some slow going progress. I am working with some source code from a Global Vector Auto -Regressive program written by Ranier Puhr from the R-forge group. I need help interpreting the

Re: [R] Splines under tension

2010-05-12 Thread Greg Snow
I think this last line is a fortune candidate: It's not just that different disciplines rediscover the same ideas, they also relabel them. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 -Original Message- From:

  1   2   >