Re: [R] Integer vs numeric

2008-01-30 Thread Gabor Grothendieck
The : operator does give a numeric, non-integer result when integer would not be sufficient: 1.1:10.1 On Jan 30, 2008 9:28 AM, [EMAIL PROTECTED] wrote: Ok, I get your point. On the other hand, R is not only for high level programmer. On low level, the fact that : change the type is

Re: [R] boxplot and number of observations per box

2008-01-30 Thread Gabor Grothendieck
Here is a variation in which the sample sizes appear under the labels: set.seed(1) y - rnorm(50) x - factor(sample(letters[1:5], 50, replace = TRUE)) bp - boxplot(y ~ x, varwidth = TRUE) mtext(paste((n=, bp$n, ), sep = ), at = seq_along(bp$n), line = 2, side = 1) On Jan 30, 2008 7:30 AM, S

Re: [R] Integer vs numeric

2008-01-30 Thread Henrik Bengtsson
On Jan 29, 2008 10:40 PM, Christophe Genolini [EMAIL PROTECTED] wrote: x[c(2,4)] work as well My point is that that at the native-code level subsetting/enumeration is done by integer indices and coercion from double to integer is always going to less efficient than working directly with

[R] How to run interaction between to categoric variables in lme()?

2008-01-30 Thread Falco tinnunculus
Hello, How do I run interaction between to categoric variables in lme()? I tried this: lmefit1- lme(Handling ~Mass+factor(Prey)+factor (Decap)+ factor(Prey)*factor(Decap), random = ~ 1 |Place, data=nestling1) Error in MEEM(object, conLin, control$niterEM) : Singularity in backsolve at level

Re: [R] boxplot and number of observations per box

2008-01-30 Thread Henrique Dallazuanna
Try this also: y-rnorm(50) x-factor(sample(letters[1:5],50,replace=T)) bp - boxplot(y~x) text(1:5, bp$stats[3,]+.1, paste(n, bp$n, sep==)) On 30/01/2008, Marc Bernard [EMAIL PROTECTED] wrote: Dear all, How can I plot the number of observations per box in a boxplot. Many thanks, Bernard

Re: [R] How to run interaction between to categoric variables in lme()?

2008-01-30 Thread Dieter Menne
Falco tinnunculus kestrel78 at gmail.com writes: How do I run interaction between to categoric variables in lme()? I tried this: lmefit1- lme(Handling ~Mass+factor(Prey)+factor (Decap)+ factor(Prey)*factor(Decap), random = ~ 1 |Place, data=nestling1) Error in MEEM(object, conLin,

Re: [R] R loess vs. Matlab loess

2008-01-30 Thread Prof Brian Ripley
On Wed, 30 Jan 2008, Stuart Leask wrote: hits=-2.6 tests=BAYES_00 X-USF-Spam-Flag: NO Hi there. Some years ago, I was trying to get loess to behave like lowess, so I could repeat some old analyses but 'predict.loess' into some reference data (R lowess and loess have different defaults).

[R] numeric coercion when one or more elements is non numerice

2008-01-30 Thread Arthur Steinmetz
I don't understand this behavior. Why does the every data point get trashed by data.matrix when there is one non-numeric element in the array? Thanks. temp GDP CPIYOY 19540 2098.1 garbage 19632 2085.4 0.9 19724 2052.5 0.8 19814 2042.4 1.1

Re: [R] increasing smoothing in GAMM (package mgcv)

2008-01-30 Thread Simon Wood
On Sat, 26 Jan 2008, J. Scott Olsson wrote: Is there a way in GAMM to increase the amount of smoothing (something like min.sp in GAM)? -- There is nothing built in I'm afraid - the only way I can think of doing this would involve re-writing the pdMat classes that mgcv supplies in order to

Re: [R] Concatenate xyplots

2008-01-30 Thread eite2335
OK - here is an example: ## Create example data data = matrix(1:8, nrow=4, ncol=2) ## Name columns x and y colnames(data) = c(x, y) data = data.frame(data) ## Create 5 graphs with the xyplot command graph1= xyplot(y~x, data = data) graph2 = xyplot(y~x, data = data) graph3 = xyplot(y~x,

Re: [R] Concatenate xyplots

2008-01-30 Thread Gabor Grothendieck
xyplot.zoo uses xyplot and will displays graphs of times series without space: library(zoo) z - with(data, zoo(y, x)) xyplot(cbind(z, z, z, z, z)) On Jan 30, 2008 11:17 AM, eite2335 [EMAIL PROTECTED] wrote: OK - here is an example: ## Create example data data = matrix(1:8, nrow=4, ncol=2)

[R] re stricting points in a data frame

2008-01-30 Thread dxc13
useR's, Consider some variables and a data frame of points: x1 - c(1,2,3) x2 - c(3,4,5) xk1 - seq(min(x1)-.5, max(x1)+.5,.5) xk2 - seq(min(x2)-.5, max(x2)+.5,.5) expand.grid(xk1=xk1,xk2=xk2) xk1 xk2 1 0.5 2.5 2 1.0 2.5 3 1.5 2.5 4 2.0 2.5 5 2.5 2.5 6 3.0 2.5 7 3.5 2.5 ... 46 2.0 5.5

[R] job ad: Marketing Statistician, Cleveland OH

2008-01-30 Thread bogdan romocea
AmTrust Bank headquartered in Cleveland OH (founded in 1889, one of the 50 largest banks in the US, with more than $18 billion in assets) has an opening for a Marketing Statistician in the Business Intelligence group. ===Essential Job Duties: - Apply various data analysis techniques to address

Re: [R] on trellis.par.set/get (reproducing figures from Pinheiro Bates)

2008-01-30 Thread Deepayan Sarkar
On 1/30/08, Dr. Ottorino-Luca Pantani [EMAIL PROTECTED] wrote: Deepayan Sarkar ha scritto: On 1/29/08, Dr. Ottorino-Luca Pantani [EMAIL PROTECTED] wrote: Dear R users, I would like to exactly reproduce a figure like the 1.5 or 1.9 or 4.13 from the book Mixed effects models in S and

Re: [R] Concatenate xyplots

2008-01-30 Thread Deepayan Sarkar
On 1/30/08, eite2335 [EMAIL PROTECTED] wrote: OK - here is an example: ## Create example data data = matrix(1:8, nrow=4, ncol=2) ## Name columns x and y colnames(data) = c(x, y) data = data.frame(data) ## Create 5 graphs with the xyplot command graph1= xyplot(y~x, data = data)

Re: [R] Concatenate xyplots

2008-01-30 Thread Attiglah, Mama
Hi room, Is there any R package that solves a non linear objective pb, with linear equality constraint? A simple example a =c (2, 5, 6, 7, 2) b = c (7, 1, 4, 5, 6) a and b are vectors of length 5 minimise f(x, a) = sum( (x-a)^2) such that sum( x*b) = 50. where x is the control

[R] Cross Spectral Density

2008-01-30 Thread stephen sefick
I would like to compute the CSD of two finite time series. Is this implemented in R. Spectrum can handle multivariate input, but computes the coherence and the phase, but not the cross spectral density. Are there any packages out there that can do what I am asking? thanks Stephen Sefick --

Re: [R] numeric coercion when one or more elements is non numerice

2008-01-30 Thread Gavin Simpson
hits=-2.6 tests=BAYES_00 X-USF-Spam-Flag: NO On Wed, 2008-01-30 at 07:53 -0800, Arthur Steinmetz wrote: I don't understand this behavior. Why does the every data point get trashed by data.matrix when there is one non-numeric element in the array? Thanks. I suspect it is because your data

[R] help on establishing a matrix

2008-01-30 Thread Gator Connection
I am a beginner and this is a naive question. I have the following data set. row column height 1 2 96 3 7 67 9 25 77 .. I have a matrix of 50*100 data points and about 60% of them are zeros. I want to put the height data into the matrix according to their row and column numbers. does anybody

[R] Non linear optimising with a linear equality constraints

2008-01-30 Thread Attiglah, Mama
Hi room, Is there any R package that solves a non linear objective pb, with linear equality constraint? A simple example a =c (2, 5, 6, 7, 2) b = c (7, 1, 4, 5, 6) a and b are vectors of length 5 minimise f(x, a) = sum( (x-a)^2) such that sum( x*b) = 50. where x is the control

Re: [R] boxplot and number of observations per box

2008-01-30 Thread David Hewitt
How can I plot the number of observations per box in a boxplot. As usual, there's probably a more elegant solution, but this will do it: p - rnorm(100) diddy - boxplot(z) text(1, diddy$stats[3]+0.4, paste(n = , diddy$n)) see ?text and ?boxplot - David Hewitt Virginia Institute of

[R] model parameters: independent enough?

2008-01-30 Thread Dylan Beaudette
Hi, Is there a good approach to working with multiple predictors in a linear model which are in some ways related? In other words, is there a procedure, test, or general rule for determining if predictor variables are independent enough? An example from soil science could be the notion of

Re: [R] Non linear optimising with a linear equality constraints

2008-01-30 Thread Gabor Grothendieck
Try adding a penalty term, e,g, lambda - 1e3 f - function(x) crossprod(x-a) + lambda * (crossprod(x, b) - 50)^2 optim(a, f) On Jan 30, 2008 12:01 PM, Attiglah, Mama [EMAIL PROTECTED] wrote: Hi room, Is there any R package that solves a non linear objective pb, with linear equality

Re: [R] re stricting points in a data frame

2008-01-30 Thread Attiglah, Mama
Let's A = expand.grid(xk1=xk1,xk2=xk2) B = A[A[,1] %in% x1 A[,2] %in% x2, ] Should in principle produce the desired result. Mama - Mama Attiglah, PhD Advanced Research Center Quantitative Research Analyst State Street Bank +44(0)20 7698 6290 (Direct Line) +44 (0)207 004 2968 (Direct

[R] Waiting bar

2008-01-30 Thread tintin_et_milou
Hi, I would like to know if it is possible to generate a waiting bar in R when you execute your programs like in Matlab, to make the program more living. Particularly for the loops, it can be useful to know how many time left... Thanks in advance, Loïc Joffre -- View this message in context:

[R] 95% confidence and prediction intervals for linear mixed models

2008-01-30 Thread Jorge Iván Vélez
Hi R-users, From the last week I've been working fitting a linear mixed model with random intercept and fixed shape (model4) for a data set with 37 individuals measured over time, using lme package. Results are at the end of this message. The outcome is score and the covariate is age. My

Re: [R] Concatenate xyplots

2008-01-30 Thread eite2335
OK, this was a silly example. This one should be not as silly: ## Created example dataset data1 = matrix(1:12, nrow=4, ncol=3) data1 = data.frame(matrix(data1, 4, 3, byrow = T)) colnames(data1) = c(y1, y2,x) data2 = data.frame(c(1,1,2,2)) colnames(data2) =c(z) data = cbind(data1,data2)

Re: [R] Waiting bar

2008-01-30 Thread Henrik Bengtsson
For text-based progress bars see the ProgressBar class in R.utils, e.g. # A faster progress bar with default step length 1.4. pb - ProgressBar(max=42, stepLength=1.4) reset(pb) while (!isDone(pb)) { x - rnorm(3e4) increase(pb) Sys.sleep(0.02) } cat(\n) Output:

Re: [R] help on establishing a matrix

2008-01-30 Thread Henrique Dallazuanna
Perhaps like this: diag(mat[data$row, data$column]) - data$height On 29/01/2008, Gator Connection [EMAIL PROTECTED] wrote: I am a beginner and this is a naive question. I have the following data set. row column height 1 2 96 3 7 67 9 25 77 .. I have a matrix of 50*100 data points

[R] data.frame transformation

2008-01-30 Thread Christian Hof
Dear all, maybe somebody can provide some help for this problem: Example: I've got the following dataframe data: grid.id-c(1:4) lat-c(10,12,13,15) species1-c(0,0,0,1) species2-c(1,1,0,0) species3-c(1,1,1,1) data-data.frame(cbind(grid.id,lat,species1,species2,species3)) How can I, out of data

Re: [R] R-help going to become subscriber-only

2008-01-30 Thread Marc Schwartz
Martin Maechler wrote: Dear R-help mailing list readers, After some discussion among R foundation members (and friends), we have agreed that ``the spammer mafia (*)'' has momentarily won a battle: After more than ten years of open and free mailing lists devoted to R (development, use,

Re: [R] data.frame transformation

2008-01-30 Thread Peter Alspach
Christian Try: data.frame(data[,1:2], data[,3:5]*data[,2]) Peter Alspach -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Christian Hof Sent: Thursday, 31 January 2008 7:48 a.m. To: r-help@r-project.org Subject: [R] data.frame transformation

[R] Using the value of a variable as a variable

2008-01-30 Thread Ramon Hidalgo
Hello, How can I make the following expressions are equivalent datos$Col1 and datos$var when I define var - Col1? I am trying to get the same result with datos$Col1 [1] 0 1 1 0 1 0 1 1 0 And datos$var NULL Thank's , Ramón [[alternative HTML version deleted]]

[R] Loop with variable index

2008-01-30 Thread cvandy
I have a list of 20 values. The first time through a loop I want to find the mean and stnd.dev. of the first two values; the second time through the loop I want to find the mean and stnd. dev. of the first 3 values, etc. until the last time through the loop I want to find the mean and stnd.

Re: [R] Loop with variable index

2008-01-30 Thread Rolf Turner
On 31/01/2008, at 8:58 AM, cvandy wrote: I have a list of 20 values. ***NO***! You have (or should have) a *vector* of 20 values. Vectors and lists are different concepts. Learn and understand the difference, else the world will come to an end. The first time

[R] hist combines two lowest categories -- is there a workaround?

2008-01-30 Thread Ben Fairbank
When preparing a series of histograms I found that hist was combining the two lowest categories or bins, 1 and 2. Specifying breaks, as illustrated below, resulted in the correct histogram: values - sample(10,500,replace=TRUE) hist(values) hist(values,breaks = 0:10) Apparently,

Re: [R] Form Pairs of Variables for a paired t-test

2008-01-30 Thread Muenchen, Robert A (Bob)
That's a dandy little program but the apply with lapply blew my mind! I had to pick it apart to figure out what it was doing. Perhaps others will find this expanded version useful: # Make up some repeated measures data with measures at 4 times. t1-c(1,2,3,4,5) t2-c(2,3,3,5,5) t3-c(3,3,4,4,4)

Re: [R] R-help going to become subscriber-only

2008-01-30 Thread Ted Harding
On 30-Jan-08 18:46:52, Marc Schwartz wrote: Martin Maechler wrote: Dear R-help mailing list readers, After some discussion among R foundation members (and friends), we have agreed that ``the spammer mafia (*)'' has momentarily won a battle: After more than ten years of open and free

Re: [R] Loop with variable index

2008-01-30 Thread Henrique Dallazuanna
Try this: x - rnorm(20) sapply(c(sd, mean), function(fun)lapply(lapply(lapply(2:20, seq, from=1), function(.x)x[.x]), fun)) On 30/01/2008, cvandy [EMAIL PROTECTED] wrote: I have a list of 20 values. The first time through a loop I want to find the mean and stnd.dev. of the first two

[R] Connecting from Excel to running R session?

2008-01-30 Thread Werner Wernersen
Hi, I haven't used RExcel before but from what I've read in the instructions so far it seems like I cannot connect from RExcel to an already running R session, can I? The background is that usually I use Tinn-R and start R from there but occasionally I get the sudden desire to push the data to

Re: [R] Concatenate xyplots

2008-01-30 Thread Deepayan Sarkar
On 1/30/08, eite2335 [EMAIL PROTECTED] wrote: OK, this was a silly example. This one should be not as silly: ## Created example dataset data1 = matrix(1:12, nrow=4, ncol=3) data1 = data.frame(matrix(data1, 4, 3, byrow = T)) colnames(data1) = c(y1, y2,x) data2 = data.frame(c(1,1,2,2))

Re: [R] Using the value of a variable as a variable

2008-01-30 Thread Ted Harding
On 30-Jan-08 19:47:55, Ramon Hidalgo wrote: Hello, How can I make the following expressions are equivalent datos$Col1 and datos$var when I define var - Col1? I am trying to get the same result with datos$Col1 [1] 0 1 1 0 1 0 1 1 0 And datos$var NULL It will work if you use [],

Re: [R] B-W stacked area chart with pattern

2008-01-30 Thread Greg Snow
I think I would use lines for this, notice in your barplots how the higher species seem to bounce around more than the ones at the bottom of the plot even though they come from the same random process, this is because you are adding the effects of the randomness as you go up and this makes it

Re: [R] Using the value of a variable as a variable

2008-01-30 Thread Henrik Bengtsson
On Jan 30, 2008 1:15 PM, Ted Harding [EMAIL PROTECTED] wrote: On 30-Jan-08 19:47:55, Ramon Hidalgo wrote: Hello, How can I make the following expressions are equivalent datos$Col1 and datos$var when I define var - Col1? I am trying to get the same result with datos$Col1 [1] 0 1 1

Re: [R] Loop with variable index

2008-01-30 Thread Bill.Venables
y - sort(rnorm(20)) # say... m - s - numeric(19) for(i in 2:20) { m[i-1] - mean(y[1:i]) s[i-1] - sd(y[1:i]) } Easy peasy, ... Bill Venables CSIRO Laboratories PO Box 120, Cleveland, 4163 AUSTRALIA Office Phone (email preferred): +61 7 3826 7251 Fax (if absolutely necessary):

Re: [R] Direct adjusted survival?

2008-01-30 Thread Peter Jepsen
Thank you for your reply, Thomas. I'm not quite sure whether survexp() does that. It seems that the idea of survexp() is to take the ratetable from a mortality table or Cox model based on one dataset and apply it to another dataset. I'm trying to adjust for confounding, so I want to take the

Re: [R] Loop with variable index

2008-01-30 Thread Ken Knoblauch
Bill.Venables at csiro.au writes: y - sort(rnorm(20)) # say... m - s - numeric(19) for(i in 2:20) { m[i-1] - mean(y[1:i]) s[i-1] - sd(y[1:i]) } -Original Message- On Behalf Of cvandy Subject: [R] Loop with variable index I have a list of 20 values. The first

[R] difficulties computing a simple anova

2008-01-30 Thread Will Holcomb
My grasp of R and statistics are both seriously lacking, so if this question is completely naive, I apologize in advance. I've hunted for a couple hours on the internet and none of the methods I've found have produced the result I'm looking for. I'm currently a student in a Statistics class and

Re: [R] difficulties computing a simple anova

2008-01-30 Thread Simon Blomberg
Your data setup is wrong. You have one factor (Drug) with 3 levels (Zoloft, Naltrexone, Valium). So your data should be: spiderdata - data.frame(Drug=rep(c(Zoloft, Naltrexone, Valium), each=10), Response=c(9, 11, 5, 12, 15, 14, 13, 12, 7, 6, 15, 16, 12, 12, 18, 19, 23, 20, 13, 17, 9, 11, 12, 5,

Re: [R] data.frame transformation

2008-01-30 Thread Gavin Simpson
hits=-2.6 tests=BAYES_00 X-USF-Spam-Flag: NO Hi Christian, Use the fact that 0 * lat[i] == 0 and 1 * lat[i] == lat[i], where lat[i] is one of your lat values. Also use the fact that R is vectorized. So we have: grid.id-c(1:4) lat-c(10,12,13,15) species1-c(0,0,0,1) species2-c(1,1,0,0)

[R] dates in French format

2008-01-30 Thread Denis Chabot
Hello R users, I have to import a file with one column containing dates written in French short format, such as: 7-déc-07 11-déc-07 14-déc-07 18-déc-07 21-déc-07 24-déc-07 26-déc-07 28-déc-07 31-déc-07 2-janv-08 4-janv-08 7-janv-08 9-janv-08 11-janv-08

[R] rpart error when constructing a classification tree

2008-01-30 Thread Randy Griffiths
I am trying to make a decision tree using rpart. This is my code and output. data - read.table(/Users/randygriffiths/Desktop/data, header=T) attach(data) library(rpart) bookings.cart - rpart(totalRev~., data=data, method=class) bookings.cart n= 50 node), split, n, loss, yval, (yprob)

[R] Memory problem?

2008-01-30 Thread Eleni Christodoulou
Hello R users, I am trying to run a cox model for the prediction of relapse of 80 cancer tumors, taking into account the expression of 17000 genes. The data are large and I retrieve an error: Cannot allocate vector of 2.4 Mb. I increase the memory.limit to 4000 (which is the largest supported by

Re: [R] Memory problem?

2008-01-30 Thread 宋时歌
I have a similar problem, saying cannot allocate vector size of 300MB. I would also appreciate if someone can offer some suggestion on this. Best, Shige On Jan 31, 2008 2:48 PM, Eleni Christodoulou [EMAIL PROTECTED] wrote: Hello R users, I am trying to run a cox model for the prediction of

Re: [R] dates in French format

2008-01-30 Thread Prof Brian Ripley
The output from sessionInfo() the posting guide asked for would have been very helpful here. I think the problem is likely to be that these are not standard French abbreviations according to my systems. On Linux I get format(Sys.Date(), %d-%b-%y) [1] 31-jan-08 format(Sys.Date()-50,

Re: [R] Memory problem?

2008-01-30 Thread Prof Brian Ripley
On Thu, 31 Jan 2008, Eleni Christodoulou wrote: Hello R users, I am trying to run a cox model for the prediction of relapse of 80 cancer tumors, taking into account the expression of 17000 genes. The data are large and I retrieve an error: Cannot allocate vector of 2.4 Mb. I increase the

Re: [R] B-W stacked area chart with pattern

2008-01-30 Thread Markus Didion
Thank you Greg for your comments. Here is a (very) simple example of what my data might look like: res - matrix(sample(20:25, 41*12, replace=T), nrow=12, ncol=41, dimnames=list(c(paste(sp,1:12)), c(seq(0, 200, by=5 barplot(res, space=0, legend.text=T, beside=F, col=c(white,grey50),

Re: [R] Concatenate xyplots

2008-01-30 Thread Deepayan Sarkar
On 1/29/08, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Dear R-community, I created 5 different xyplots and graphed all of them with the print command on one page (e.g. print(graph1, split=c(1,1,1,5), more = T) ... print(graph5, split=c(1,5,1,5), more =T) Using the above commands

[R] = in functions and matlab (was: Multiplying each row of a big matrix with a vector)

2008-01-30 Thread Robin Hankin
hits=-2.6 tests=BAYES_00 X-USF-Spam-Flag: NO [this after a mistakenly private email to Megh] As others have said, %*% is sufficiently vectorized to do what you want. Speaking as a reformed Matlab user, it might be as well to add that the definition of function fu() that you give looks like

Re: [R] on trellis.par.set/get (reproducing figures from Pinheiro Bates)

2008-01-30 Thread Dr. Ottorino-Luca Pantani
Deepayan Sarkar ha scritto: On 1/29/08, Dr. Ottorino-Luca Pantani [EMAIL PROTECTED] wrote: Dear R users, I would like to exactly reproduce a figure like the 1.5 or 1.9 or 4.13 from the book Mixed effects models in S and S-Plus. Not for the sake of it, but because I have my own data I

Re: [R] How to get two y-axises in a bar plot?

2008-01-30 Thread Jim Lemon
Gustaf Granath wrote: Hi, I have measured two response variables (y1, y2) at each treatment level (x = 0, 1.5 or 3). Now I would like to show the y1 and y2 against x in a bar plot. However, y1 and y2 differ in scale so I need two y-axises, one on the left side and one on the right side

Re: [R] rpart error when constructing a classification tree

2008-01-30 Thread Uwe Ligges
Randy Griffiths wrote: I am trying to make a decision tree using rpart. The function runs very quickly considering the size of the data (1742, 163). When I call the summary command I get this: summary(bookings.cart) Call: rpart(formula = totalRev ~ ., data = bookings, method = class)

Re: [R] Logit Regressions, Clustering etc

2008-01-30 Thread Paul Sweeting
Fantastic - I new it would be straightforward if I could only find the function! Many thanks Paul -Original Message- From: Frank E Harrell Jr [mailto:[EMAIL PROTECTED] Sent: 29 January 2008 20:30 To: Paul Sweeting Cc: r-help@r-project.org Subject: Re: [R] Logit Regressions, Clustering

[R] Two warning messages after loading package 'coda'...

2008-01-30 Thread Petar Milin
Hello! Recently I updated my R and all packages, under Linux (Ubuntu 6.06). After that, I started to receive warning messages: 1: In namespaceImportFrom(self, asNamespace(ns)) : replacing previous import: cov2cor 2: In namespaceImportFrom(self, asNamespace(ns)) : replacing previous import:

[R] This is Brilliant

2008-01-30 Thread Cecil Heathe
Hi there, I've just finished looking at Ben Edwards' latest developments to his guitar learning package, Jamorama - the Ultimate Guitar Learning Kit. I get approached by people all the time wanting me to market their products, and believe me, it can get tiresome looking at the same type of stuff

[R] boxplot and number of observations per box

2008-01-30 Thread Marc Bernard
Dear all, How can I plot the number of observations per box in a boxplot. Many thanks, Bernard - [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] Multiplying each row of a big matrix with a vector

2008-01-30 Thread Attiglah, Mama
I understood that you only need to multiply each row of Ret by the vector Pos but it seems that you would like to sum the resulting vector element in order to have a vector of length 500. That is merely the matrix multiplication in R!!! i.e. Ret %*% Pos. Am I getting the question wrong? Mama

[R] boxplot and number of observations per box

2008-01-30 Thread Marc Bernard
Dear all, How can I plot the number of observations per box in a boxplot. Many thanks, Bernard - [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] boxplot and number of observations per box

2008-01-30 Thread Chuck Cleland
On 1/30/2008 6:42 AM, Marc Bernard wrote: Dear all, How can I plot the number of observations per box in a boxplot. Many thanks, Bernard Something like this? X - boxplot(count ~ spray, data = InsectSprays, col = lightgray) mtext(side=1, line = 2, at =

Re: [R] boxplot and number of observations per box

2008-01-30 Thread S Ellison
Do you mean something like y-rnorm(50) x-factor(sample(letters[1:5],50,replace=T)) boxplot(y~x) text(1:5,rep(min(y),5),paste(n=,tapply(y,x,length)) ) ? (You can fiddle about with the text placement easily enough). Also note that boxplot's varwidth parameter provides a graphical indication of

Re: [R] Multiplying each row of a big matrix with a vector

2008-01-30 Thread Megh Dal
Yes definitely it is just matrix multiplication. However I was interested why those code going wrong. Attiglah, Mama [EMAIL PROTECTED] wrote: I understood that you only need to multiply each row of Ret by the vector Pos but it seems that you would like to sum the resulting vector element in

Re: [R] B-W stacked area chart with pattern

2008-01-30 Thread hadley wickham
On Jan 30, 2008 2:15 AM, Markus Didion [EMAIL PROTECTED] wrote: Thank you Greg for your comments. Here is a (very) simple example of what my data might look like: res - matrix(sample(20:25, 41*12, replace=T), nrow=12, ncol=41, dimnames=list(c(paste(sp,1:12)), c(seq(0, 200, by=5

[R] R loess vs. Matlab loess

2008-01-30 Thread Stuart Leask
hits=-2.6 tests=BAYES_00 X-USF-Spam-Flag: NO Hi there. Some years ago, I was trying to get loess to behave like lowess, so I could repeat some old analyses but 'predict.loess' into some reference data (R lowess and loess have different defaults). loess(X~Y,span=sp, family=(symmetric),