Re: [R] ggplot2 / reshape / Question on manipulating data

2007-07-12 Thread hadley wickham
On 7/12/07, Pete Kazmier [EMAIL PROTECTED] wrote: I'm an R newbie but recently discovered the ggplot2 and reshape packages which seem incredibly useful and much easier to use for a beginner. Using the data from the IMDB, I'm trying to see how the average movie rating varies by year. Here is

[R] ggplot doesnt work in loops?

2007-07-12 Thread Steve Powell
Dear list members I am still a newbie so might be asking a stupid question, but I can't get ggplot to work in a loop (or a while statement for that matter). # to take a minimal example - mydata$varc = c(1,2,3) for (i in 1:1){ jpeg(test3.jpg) plot(mydata$varc)

Re: [R] ggplot doesnt work in loops?

2007-07-12 Thread hadley wickham
Hi Steve, You need to explicitly print the ggplot object: ggplot(mydata, aes(x=mydata$varc)) + geom_bar() (this is a R-faq for lattice plots, and ggplot works the same way) In the latest version of ggplot (0.5.4) you can construct the plot before hand and modify the aesthetics in each instance

[R] How to get weekly Covariance with R

2007-07-12 Thread Felipe Carrillo
Hi: I am trying to migrate from Systat to R but I am facing my first challenge. While I easily can get weekly co-variance for my data, I can't seem to acomplish this with R ( I can't figure out how is done) If interested in looking a sample of my data, please check the data below. In Systat

[R] how to get the p-values from an lm function ?

2007-07-12 Thread Benoit Chemineau
Hi, dear R-users, I am computing a liner regression by rating category using the 'by' function as stated below: tmp - by(projet, rating, function(x) lm(defaults ~ CGDP+CSAVE+SP500, data = x)) I would like to get not only the coefficients but also their p-values. I can't find the command in the

Re: [R] how to get the p-values from an lm function ?

2007-07-12 Thread hadley wickham
On 7/12/07, Benoit Chemineau [EMAIL PROTECTED] wrote: Hi, dear R-users, I am computing a liner regression by rating category using the 'by' function as stated below: tmp - by(projet, rating, function(x) lm(defaults ~ CGDP+CSAVE+SP500, data = x)) I would like to get not only the

Re: [R] aov() question

2007-07-12 Thread Christophe Pallier
On 7/11/07, Leigh E Alexander [EMAIL PROTECTED] wrote: i have a 3 x 4 x 2 repeated measures design. All of the IVs are within subjects.I do also have missing values (unequal N), as I have to remove any incorrect trials for each subject. Hum, you mean there are empty cells in table(sid,

Re: [R] how to get the p-values from an lm function ?

2007-07-12 Thread Dimitris Rizopoulos
try the following: tmp - by(projet, rating, function (x) Thursday, 12.July.2007{ fit - lm(defaults ~ CGDP + CSAVE + SP500, data = x) summary(fit)$coefficients }) I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health

[R] problems with memory in Mac

2007-07-12 Thread Carlos Guerra
Dear friends, I am having some doubts about the amount of memory that is being used by R in my Mac (MacBook Pro, 2Gig). Is there a way to increase the amount of memory used? When I type: mem.limits() the result is: nsize vsize NANA and I can't change it, tough my computing in R

Re: [R] type III ANOVA for a nested linear model

2007-07-12 Thread S Ellison
The aliasing problem arises in alias(), which is what Anova uses to detect aliasing. It is simply the fact that anova more or less blithely ignores the NA's that makes anova behave apparently more 'sensibly' than Anova. But like Carsten, I found this difficult to understand. Unordered factors

Re: [R] Subsetting problem

2007-07-12 Thread Mark Difford
Hi Massimo, Professor Ripley has given you your answer. It may help you further to know that factor levels aren't automatically dropped when you subset a data set; you have to do it manually. Some time ago I scrounged the following command from Andy Liaw's randomForest package: it removes all

Re: [R] how to get the p-values from an lm function ?

2007-07-12 Thread Prof Brian Ripley
On Thu, 12 Jul 2007, hadley wickham wrote: On 7/12/07, Benoit Chemineau [EMAIL PROTECTED] wrote: Hi, dear R-users, I am computing a liner regression by rating category using the 'by' function as stated below: tmp - by(projet, rating, function(x) lm(defaults ~ CGDP+CSAVE+SP500, data = x))

Re: [R] problems with memory in Mac

2007-07-12 Thread Rod
2007/7/12, Carlos Guerra [EMAIL PROTECTED]: Dear friends, I am having some doubts about the amount of memory that is being used by R in my Mac (MacBook Pro, 2Gig). Is there a way to increase the amount of memory used? When I type: mem.limits() the result is: nsize vsize NANA

Re: [R] how to get the p-values from an lm function ?

2007-07-12 Thread hadley wickham
On 7/12/07, Prof Brian Ripley [EMAIL PROTECTED] wrote: On Thu, 12 Jul 2007, hadley wickham wrote: On 7/12/07, Benoit Chemineau [EMAIL PROTECTED] wrote: Hi, dear R-users, I am computing a liner regression by rating category using the 'by' function as stated below: tmp -

[R] dose-response on a grid

2007-07-12 Thread William Simpson
I have the following problem. I have measured a dose response curve (binary response, continuous dose) on a grid of x,y positions. I would like to produce a grey-level plot that shows the LD50 at each (x,y) position. I am thinking that I have to do something like fit-glm(resp ~ x*y + dose, family

Re: [R] RWeka control parameters classifiers interface

2007-07-12 Thread strinz
Hi, many thanks for the answer. It ist true, that for example m1 - SMO(Species ~ ., data = iris, control = Weka_control( K = weka.classifiers.functions.supportVector.PolyKernel)) m2 - SMO(Species ~ ., data = iris, control = Weka_control( K =

[R] time-varying recursive filter - vectorized

2007-07-12 Thread Felix Andrews
A question about vectorized operations (avoiding loops, for speed)... I need to run a simple recursive (autoregressive) filter with a time-varying coefficient. It is just a one-step recursive filter, so it would be an exponential decay if the filter was constant. I just want to do this, where

[R] matrix of scatterplots

2007-07-12 Thread livia
Hi, I would like to use the function pairs() to plot a matrix of scatterplots. For each scatterplot, the data are plotted in circles, can I add some argument to change the circles into dots? Could anyone give me some advice?Many thanks -- View this message in context:

[R] How to activate the R commands in SciViews

2007-07-12 Thread Liviu Andronic
Hello everybody, I have a problem similar to that reported by Felipe. I installed R 2.5.0, Rcmdr from CRAN and SciViews-R 0.8-9 (with all the required and optional components). When accessing the R Commander menu from within SciViews, the links cannot be clicked. When pointing at them, the mouse

[R] Please Help

2007-07-12 Thread Tanya Li
Hello, I got this email address from http://tolstoy.newcastle.edu.au/R/e2/help/06/10/2516.html, I got started to use R recently, Can I ask you a question ? this is what I am using: platform i686-pc-linux-gnu arch i686 os linux-gnu system i686, linux-gnu status

Re: [R] matrix of scatterplots

2007-07-12 Thread Adaikalavan Ramasamy
m - matrix( rnorm(300), nc=3 ) pairs(m, pch=20) or pairs(m, pch=.) See help(par) for more details. livia wrote: Hi, I would like to use the function pairs() to plot a matrix of scatterplots. For each scatterplot, the data are plotted in circles, can I add some argument to change the circles

Re: [R] How to activate the R commands in SciViews

2007-07-12 Thread Philippe Grosjean
As explained on the web page from where you downloaded SciViews 0.8-9, this version is not compatible with R 2.5.0. Best, Philippe Grosjean ..∞})) ) ) ) ) ) ( ( ( ( (Prof. Philippe Grosjean ) ) ) ) ) ( ( ( ( (Numerical Ecology of

[R] lead

2007-07-12 Thread Aydemir, Zava \(FID\)
Hi, is there any function in R that shifts elements of a vector to the opposite direction of what Lag() of the Hmisc package does? (something like, Lag(x, shift = -1) ) Thanks Zava This is not an offer (or solicitation of an offer)

Re: [R] elementary statistics with R (rkward?)

2007-07-12 Thread John Kane
--- Donatas G. [EMAIL PROTECTED] wrote: Hi, I am trying to learn some basic statistics stuff but I cannot find any elementary statistics exercises using R language. Using RKward would be even better... I need that in analysing sociological data, obtained through questionnairres -

Re: [R] dose-response on a grid

2007-07-12 Thread Christian Ritz
Hi Bill, have a look at the following artificial example: ## Loading the package 'drc' (on CRAN) library(drc) ## Generating dataset with four dose-response curves finneyx4 - rbind(finney71, finney71, finney71, finney71) ## Generating artificial points (x,y) ## different pairs for each of the 4

Re: [R] Please Help

2007-07-12 Thread Adaikalavan Ramasamy
This is the R-help mailing list. See help(BATCH). You will need to write the required R commands in a separate script, say script.R and then execute it as R --no-save script.R logfile You may need to augment the code above to include directory paths etc. There are other useful

[R] [Fwd: Re: How to activate the R commands in SciViews]

2007-07-12 Thread Philippe Grosjean
Well.. plans are there from a long time to rewrite SciViews completely and make it platform independent (to work on Linux/Unix and MacOS X, as well as Windows). I have done some work in this direction when time permitted, but I am pretty busy with other work. During the holidays, I will continue

Re: [R] matrix of scatterplots

2007-07-12 Thread livia
Thank you very much for your help. Adaikalavan Ramasamy wrote: m - matrix( rnorm(300), nc=3 ) pairs(m, pch=20) or pairs(m, pch=.) See help(par) for more details. livia wrote: Hi, I would like to use the function pairs() to plot a matrix of scatterplots. For each scatterplot, the

[R] How to activate the R commands in SciViews

2007-07-12 Thread Liviu Andronic
Thank you for the pointer. On the SciViews official site (http://www.sciviews.org/SciViews-R/index.html) I could not find any indications on this incompatibility. At any rate, I would have two questions related to the future of SciViews-R. Are there any developments planned in some near future

[R] eMail results out of R

2007-07-12 Thread thomas.schwander
Hi everyone, I did my homework and read the posting guideline :-) I want to eMail the results of a computing automatically. So I get the results (the parameters of a garch process) and I want to eMail them to another person. How can I do that? Thx __ Thomas

Re: [R] lead

2007-07-12 Thread Adaikalavan Ramasamy
How about revLag - function(x, shift=1) rev( Lag(rev(x), shift) ) x - 1:5 revLag(x, shift=2) As a matter of fact, here is a generalized version of Lag to include negative shifts. myLag - function (x, shift = 1){ xLen - length(x) ret - as.vector(character(xLen), mode =

[R] XAML

2007-07-12 Thread gordon . morrison
Hi I wonder if anyone has had any thoughts about rendering R graphical output into XAML? Gordon M. Morrison HSBC Bank plc 8 Canada Square London E14 5HQ - SAVE PAPER - THINK

Re: [R] type III ANOVA for a nested linear model

2007-07-12 Thread Mendiburu, Felipe \(CIP\)
Dear Carsten In this test, factor B would be representing to a factor of block or repetition according to as the levels of A, B, and C are in the data. Factor C this nested in A, then the model should include: B, A and C nested in A, the difference it is the error. Model: B 1 A 2

Re: [R] p-value from survreg

2007-07-12 Thread Terry Therneau
The question was how to get the p-value from the fit below, as an S object sr-survreg(s~groups, dist=gaussian) Coefficients: (Intercept) groups -0.02138485 0.03868351 Scale= 0.01789372 Loglik(model)= 31.1 Loglik(intercept only)= 25.4 Chisq= 11.39 on 1 degrees of freedom, p=

[R] Fitting a Gamma Curve

2007-07-12 Thread TIMMMAY
Hi there, I hope someone can help me before I tear all my hair out. I have a set transition intensities and when plotted the curve looks like a gamma density. I want to fit a gamma density curve to these intensities. It is just a curve fitting problem but whats causing the trouble is that I need

Re: [R] lead

2007-07-12 Thread Gabor Grothendieck
The lag.zoo method of lag in the zoo package supports positive, negative and multiple lags and has an na.pad= argument. (zoo also has a lag.zooreg method, not shown, for zooreg objects): library(zoo) z - zoo(11:15) z 1 2 3 4 5 11 12 13 14 15 lag(z, na.pad = TRUE) 1 2 3 4 5 12 13 14

[R] Package for .632 (and .632+) bootstrap and the cross-validation of ROC Parameters

2007-07-12 Thread spime
Hi users, I need to calculate .632 (and .632+) bootstrap and the cross-validation of area under curve (AUC) to compare my models. Is there any package for the same. I know about 'ipred' and using it i can calculate misclassification errors. Please help. It's urgent. -- View this message in

Re: [R] p-value from survreg

2007-07-12 Thread hadley wickham
On 7/12/07, Terry Therneau [EMAIL PROTECTED] wrote: The question was how to get the p-value from the fit below, as an S object sr-survreg(s~groups, dist=gaussian) Coefficients: (Intercept) groups -0.02138485 0.03868351 Scale= 0.01789372 Loglik(model)= 31.1 Loglik(intercept only)=

Re: [R] ggplot2 / reshape / Question on manipulating data

2007-07-12 Thread Pete Kazmier
hadley wickham [EMAIL PROTECTED] writes: On 7/12/07, Pete Kazmier [EMAIL PROTECTED] wrote: I'm an R newbie but recently discovered the ggplot2 and reshape packages which seem incredibly useful and much easier to use for a beginner. Using the data from the IMDB, I'm trying to see how the

Re: [R] eMail results out of R

2007-07-12 Thread Scillieri, John
We use a program called Blat (www.blat.net) on Windows to email out results of overnight runs. If you're on Unix/Linux you can definitely do a similar thing using one of the hundreds of command line utils. The R code is similar to below: sendEmail - function(from, to, subject, body) { BLAT -

Re: [R] eMail results out of R

2007-07-12 Thread Duncan Murdoch
On 7/12/2007 9:52 AM, [EMAIL PROTECTED] wrote: Hi everyone, I did my homework and read the posting guideline :-) I want to eMail the results of a computing automatically. So I get the results (the parameters of a garch process) and I want to eMail them to another person. How can I do

Re: [R] eMail results out of R

2007-07-12 Thread Romain Francois
Hi, There is a paper in the April 2007 issue of R News that might be of help here. http://##cran mirror##/doc/Rnews/Rnews_2007-1.pdf Romain Duncan Murdoch wrote: On 7/12/2007 9:52 AM, [EMAIL PROTECTED] wrote: Hi everyone, I did my homework and read the posting guideline :-) I want to

Re: [R] eMail results out of R

2007-07-12 Thread Stéphane Dray
Here is a small function that I used on Debian. It requires exim4 : send.mail-function(addr='[EMAIL PROTECTED]',subject='A message from R', text=paste(I have finished to work ,Sys.time(),coll=)){ # send an email # it requires the reconfiguration of exim4 # you

[R] Difference in linear regression results for Stata and R

2007-07-12 Thread kdestler
Hi I recently imported data from r into Stata. I then ran the linear regression model I've been working on, only to discover that the results are somewhat (though not dramatically different). the standard errors vary more between the two programs than do the coefficients themselves. Any

Re: [R] Stepwise GLM selection by LRT?

2007-07-12 Thread Lutz Ph. Breitling
Thank you very much for the prompt reply. Seems like I had not fully understood what the k-parameter to stepAIC is doing. Your suggested approach looks indeed fine to me, actually I do not quite understand why you say that it's only an approximation to the LRT? Best wishes- Lutz On 7/11/07, Ravi

Re: [R] eMail results out of R

2007-07-12 Thread Ted Harding
On 12-Jul-07 13:52:56, [EMAIL PROTECTED] wrote: Hi everyone, I did my homework and read the posting guideline :-) I want to eMail the results of a computing automatically. So I get the results (the parameters of a garch process) and I want to eMail them to another person. How can I do

Re: [R] eMail results out of R

2007-07-12 Thread Prof Brian Ripley
On Thu, 12 Jul 2007, Duncan Murdoch wrote: On 7/12/2007 9:52 AM, [EMAIL PROTECTED] wrote: Hi everyone, I did my homework and read the posting guideline :-) But failed to follow it, and not telling us the OS makes this very much harder to answer adequately. I want to eMail the results of a

Re: [R] eMail results out of R

2007-07-12 Thread Ted Harding
On 12-Jul-07 16:10:46, Stéphane Dray wrote: Here is a small function that I used on Debian. It requires exim4 : send.mail-function(addr='[EMAIL PROTECTED]',subject='A message from R', text=paste(I have finished to work ,Sys.time(),coll=)){ # send an email #

[R] error problem with glht

2007-07-12 Thread Peter Furey
Can anyone help me? I'm having problems with the following code where I want to test the null hypothesis that regression slopes are the same among regressions. Here's the code I've written with comments that include the final error I get. ... initial.dir - getwd() library(systemfit)

Re: [R] ggplot doesnt work in loops?

2007-07-12 Thread hadley wickham
On 7/12/07, hadley wickham [EMAIL PROTECTED] wrote: Hi Steve, You need to explicitly print the ggplot object: ggplot(mydata, aes(x=mydata$varc)) + geom_bar() (this is a R-faq for lattice plots, and ggplot works the same way) In the latest version of ggplot (0.5.4) you can construct the

[R] contour and filled contour plots

2007-07-12 Thread Andrea Storto
Hello, I'm trying to overlap a contour and a filled.contour: as I read in a previous post this can be done calling contour() in the plot.axes of filled.contour. When I do it (see example below) the contour is placed instead of the color bar, while the filled.contour is not drawn at all, which is

Re: [R] Package for .632 (and .632+) bootstrap and the cross-validation of ROC Parameters

2007-07-12 Thread Frank E Harrell Jr
spime wrote: Hi users, I need to calculate .632 (and .632+) bootstrap and the cross-validation of area under curve (AUC) to compare my models. Is there any package for the same. I know about 'ipred' and using it i can calculate misclassification errors. Please help. It's urgent. See

Re: [R] Generating bivariate or multivariate data with known parameter values

2007-07-12 Thread thelozee_x
David Kaplan-2 wrote: Greetings, I'm interested in generating data from various bivariate or mulitivariate distributions (e.g. gamma, t, etc), where I can specify the parameter values, including the correlations among the variables. I haven't been able to dig anything up on the

[R] Error in dyn.load()

2007-07-12 Thread Tae-Hoon Chung
Hi, All; I tried to load the 'genetics' library but it failed with the following message. Can you help me with this? Thanks in advance. library(genetics) Loading required package: gdata Error in dyn.load(x, as.logical(local), as.logical(now)) : unable to load shared library

[R] multiple plots in a graph

2007-07-12 Thread Ajay Singh
Hi, I have to generate 10 cdfs in a graph. I need to compare the cdf's nature by plotting ten cdfs in a graph. Thus, I need multiple plots in a graph. I would appreciate if you could give some solution to the problem asap. Thanking you, Sincerely, Ajay. -- Ajay Singh Research Scientist,

[R] calculating percent error from 2 vectors

2007-07-12 Thread Scott Bearer
Hello, I believe this is an easy scripting problem, but one I am stumbling on. I have a known vector of 3 colors with nrow=10: known-c(red, blue, red, red, yellow, blue, yellow, blue, blue, yellow) and a model output vector: modelout-c(red, red, red, blue, yellow, blue, blue, red, blue, yellow)

[R] Interpreting a string as a variable in a column header

2007-07-12 Thread rosa clements
This must be a very simple question, but I can't find any information on it elsewhere, sorry. When extracting information from a list using column headers, how do I get R to interpret something as a variable rather than a string? For example: xx$YAL002 works, but this doesn't: gene - YAL002

[R] ggplot2 / histogram / y-axis

2007-07-12 Thread Pete Kazmier
Is there a way in ggplot to make a histogram with the left-hand y-axis label as frequency, and a right-hand y-axis label as percentage? Thanks! Pete __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

[R] Compute rank within factor groups

2007-07-12 Thread Ken Williams
Hi, I have a data.frame which is ordered by score, and has a factor column: Browse[1] wc[c(report,score)] report score 9 ADEA 0.96 8 ADEA 0.90 11 Asylum_FED9 0.86 3 ADEA 0.75 14 Asylum_FED9 0.60 5 ADEA 0.56 13 Asylum_FED9 0.51 16

Re: [R] ggplot2 / reshape / Question on manipulating data

2007-07-12 Thread hadley wickham
On 7/12/07, Pete Kazmier [EMAIL PROTECTED] wrote: hadley wickham [EMAIL PROTECTED] writes: On 7/12/07, Pete Kazmier [EMAIL PROTECTED] wrote: I'm an R newbie but recently discovered the ggplot2 and reshape packages which seem incredibly useful and much easier to use for a beginner. Using

Re: [R] Interpreting a string as a variable in a column header

2007-07-12 Thread Greg Snow
Use xx[[gene]] instead of xx$gene (the $ is a shorthand for [[ with some extra magic to be more convenient, the magic is getting in your way, so go back to the [[ syntax (make sure you double the braces)). Hope this helps, -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain

Re: [R] calculating percent error from 2 vectors

2007-07-12 Thread Greg Snow
Try something like: mytable - table(known, modelout) prop.table( mytable, 1 ) Also look at ?addmargins and the CrossTable function in the gmodels package. Hope this helps, -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare [EMAIL PROTECTED] (801) 408-8111

[R] Resolved: Error in dyn.load()

2007-07-12 Thread Tae-Hoon Chung
Hi, All; I simply upgraded my R from version 2.5.0 to 2.5.1 and the whole problems disappeared. So I am closing the question myself. It could have been the R version problem. Tae-Hoon Chung Post-Doctoral Researcher Computational Biology Division, TGEN 445 N 5th St. Phoenix, AZ 85004 USA O:

Re: [R] Compute rank within factor groups

2007-07-12 Thread Greg Snow
Look at ?ave and try something like: wc$rank - ave( wc$score, wc$report, FUN=rank ) This works even if the dataframe is not pre sorted. Hope this helps, -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare [EMAIL PROTECTED] (801) 408-8111 -Original

Re: [R] Stepwise GLM selection by LRT?

2007-07-12 Thread Prof Brian Ripley
On Thu, 12 Jul 2007, Lutz Ph. Breitling wrote: Thank you very much for the prompt reply. Seems like I had not fully understood what the k-parameter to stepAIC is doing. Your suggested approach looks indeed fine to me, actually I do not quite understand why you say that it's only an

Re: [R] ggplot2 / histogram / y-axis

2007-07-12 Thread hadley wickham
On 7/12/07, Pete Kazmier [EMAIL PROTECTED] wrote: Is there a way in ggplot to make a histogram with the left-hand y-axis label as frequency, and a right-hand y-axis label as percentage? Not currently. I did a quick exploration to see if it was feasible to draw another axis on with grid, but it

Re: [R] multiple plots in a graph

2007-07-12 Thread Uwe Ligges
Ajay Singh wrote: Hi, I have to generate 10 cdfs in a graph. I need to compare the cdf's nature by plotting ten cdfs in a graph. Thus, I need multiple plots in a graph. I would appreciate if you could give some solution to the problem asap. plot(ecdf(rnorm(10)))

Re: [R] is.null doesn't work

2007-07-12 Thread Atte Tenkanen
Seems to work, if I unlist the argument at first ;-) Atte Hi, What's wrong here?: v=c(`-`,`+`,1,`^`,`^`,NA,NA,X,9,X,2) i2=16 v[i2] [[1]] NULL is.null(v[i2]) [1] FALSE Is it a bug or have I misunderstood something? Atte Tenkanen University of Turku, Finland

Re: [R] calculating percent error from 2 vectors

2007-07-12 Thread Ted Harding
On 12-Jul-07 17:32:03, Scott Bearer wrote: Hello, I believe this is an easy scripting problem, but one I am stumbling on. I have a known vector of 3 colors with nrow=10: known-c(red, blue, red, red, yellow, blue, yellow, blue, blue, yellow) and a model output vector: modelout-c(red,

Re: [R] Compute rank within factor groups

2007-07-12 Thread jim holtman
Is this what you are looking for: x report score 9 ADEA 0.96 8 ADEA 0.90 11 Asylum_FED9 0.86 3 ADEA 0.75 14 Asylum_FED9 0.60 5 ADEA 0.56 13 Asylum_FED9 0.51 16 Asylum_FED9 0.51 2 ADEA 0.42 7 ADEA 0.31 17 Asylum_FED9 0.27 1

[R] is.null doesn't work

2007-07-12 Thread Atte Tenkanen
Hi, What's wrong here?: v=c(`-`,`+`,1,`^`,`^`,NA,NA,X,9,X,2) i2=16 v[i2] [[1]] NULL is.null(v[i2]) [1] FALSE Is it a bug or have I misunderstood something? Atte Tenkanen University of Turku, Finland __ R-help@stat.math.ethz.ch mailing list

[R] how to estimate treatment-interaction contrasts

2007-07-12 Thread szhan
Hello, R experts, Sorry for asking this question again again since I really want a help! I have a two-factor experiment data and like to calculate estimates of interation contrasts say factor A has levels of a1, a2, and B has levels of b1, b2, b3, b4, and b5 with 3 replicates. I am not sure the

Re: [R] ggplot2 / histogram / y-axis

2007-07-12 Thread Pete Kazmier
hadley wickham [EMAIL PROTECTED] writes: On 7/12/07, Pete Kazmier [EMAIL PROTECTED] wrote: Is there a way in ggplot to make a histogram with the left-hand y-axis label as frequency, and a right-hand y-axis label as percentage? Not currently. I did a quick exploration to see if it was

Re: [R] Compute rank within factor groups

2007-07-12 Thread Greg Snow
Why are you using order instead of rank? If the data is pre sorted then they tend to give the same result (unless there are ties), but if your data is not presorted, then the results will be different. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare [EMAIL

[R] automatically generating and accessing data frames of varying dimensions

2007-07-12 Thread Drescher, Michael (MNR)
Hi All, I want to automatically generate a number of data frames, each with an automatically generated name and an automatically generated number of rows. The number of rows has been calculated before and is different for all data frames (e.g. c(4,5,2)). The number of columns is known a priori

[R] JRI problem on 64bit Linux

2007-07-12 Thread chuckanut
Sorry if this isn't the correct list, but I couldn't find any mailing lists on the JRI site. I am able to install JRI on a 32 bin linux machine without any problem, but I am unable to isntall on a 64 bit machine. I have R installed with the correct option, R_HOME is set up and libR.so is in

Re: [R] Compute rank within factor groups

2007-07-12 Thread Peter Dalgaard
Ken Williams wrote: Hi, I have a data.frame which is ordered by score, and has a factor column: Browse[1] wc[c(report,score)] report score 9 ADEA 0.96 8 ADEA 0.90 11 Asylum_FED9 0.86 3 ADEA 0.75 14 Asylum_FED9 0.60 5 ADEA

Re: [R] automatically generating and accessing data frames of varying dimensions

2007-07-12 Thread Julian Burgos
Replace assign(nam, 1:auto.length[i]) with assign(nam,data.frame(matrix(1:auto.length[i], ncol=3))) Verify if the matrix (and hence the data frame) is filled the way you intended. Otherwise, use the argument byrow=T. Julian M. Burgos Fisheries Acoustics Research Lab School of Aquatic and

[R] (no subject)

2007-07-12 Thread Drescher, Michael (MNR)
Hi All, I want to automatically generate a number of data frames, each with an automatically generated name and an automatically generated number of rows. The number of rows has been calculated before and is different for all data frames (e.g. c(4,5,2)). The number of columns is known a priori

Re: [R] is.null doesn't work

2007-07-12 Thread Douglas Bates
On 7/12/07, Atte Tenkanen [EMAIL PROTECTED] wrote: Seems to work, if I unlist the argument at first ;-) Atte Hi, What's wrong here?: v=c(`-`,`+`,1,`^`,`^`,NA,NA,X,9,X,2) i2=16 v[i2] [[1]] NULL is.null(v[i2]) [1] FALSE Is it a bug or have I misunderstood something?

[R] sub-function default arguments

2007-07-12 Thread Talbot Katz
Hi. I have defined a function, f1, that calls another function, f2. Inside f1 an intermediate variable called nm1 is created; it is a matrix. f2 takes a matrix argument, and I defined f2 (schematically) as follows: f2-function(nmArg1=nm1,...){nC-ncol(nmArg1); ... } so that it expects nm1 as

Re: [R] sub-function default arguments

2007-07-12 Thread Duncan Murdoch
On 12/07/2007 7:23 PM, Talbot Katz wrote: Hi. I have defined a function, f1, that calls another function, f2. Inside f1 an intermediate variable called nm1 is created; it is a matrix. f2 takes a matrix argument, and I defined f2 (schematically) as follows:

Re: [R] (no subject)

2007-07-12 Thread jim holtman
Is this what you want to do: auto.length - c(12,15,6) for(i in 1:3) { + nam - paste(auto.data,i, sep=.) + assign(nam, as.data.frame(matrix(1:auto.length[i], ncol=3))) + } auto.data.1 V1 V2 V3 1 1 5 9 2 2 6 10 3 3 7 11 4 4 8 12 auto.data.2 V1 V2 V3 1 1 6 11 2 2 7 12 3 3 8 13

Re: [R] is.null doesn't work

2007-07-12 Thread jim holtman
'v' appears to be a list: v=c(`-`,`+`,1,`^`,`^`,NA,NA,X,9,X,2) i2=16 v[i2] [[1]] NULL str(v) List of 11 $ :function (e1, e2) $ :function (e1, e2) $ : num 1 $ :function (e1, e2) $ :function (e1, e2) $ : logi NA $ : logi NA $ : chr X $ : num 9 $ : chr X $ : num 2 because you

Re: [R] automatically generating and accessing data frames of varying dimensions

2007-07-12 Thread Gabor Grothendieck
Its desirable to put the data frames into a list so they can be easily iterated over in the future. Try this: auto.length - 2:4 # replace with desired row lengths f - function(names, nr) { x - rep(0, nr) data.frame(X1 = x, X2 = x, X3 = x) } auto.names - paste(auto.data,

[R] R and HTTP get 'has file changed'

2007-07-12 Thread Dirk Eddelbuettel
Is there a way, maybe using Duncan TL's RCurl, to efficiently test whether an URL such as http://$CRAN/src/contrib/ has changed? I.e. one way is via a test of a page in that directory as per (sorry about the long line, and this would be on Linux with links and awk installed)

Re: [R] R and HTTP get 'has file changed'

2007-07-12 Thread Seth Falcon
Hi Dirk, Dirk Eddelbuettel [EMAIL PROTECTED] writes: Is there a way, maybe using Duncan TL's RCurl, to efficiently test whether an URL such as http://$CRAN/src/contrib/ has changed? I.e. one way is via a test of a page in that directory as per (sorry about the long line, and this

Re: [R] R and HTTP get 'has file changed'

2007-07-12 Thread Dirk Eddelbuettel
On 12 July 2007 at 19:46, Seth Falcon wrote: | Hi Dirk, | | Dirk Eddelbuettel [EMAIL PROTECTED] writes: | Is there a way, maybe using Duncan TL's RCurl, to efficiently test whether | an URL such as | | http://$CRAN/src/contrib/ | | has changed? I.e. one way is via a test of a page

[R] ICC

2007-07-12 Thread Luka Ležaić
Hello all. I'm working on a PhD thesis analyzing reproducibility/repeatability of a nuclear medicine examination. I have two sets of data (50 patients each) and 3 observers. In each case (patient), two variables are evaluated, first with a range of 0..100 and second 1..3. Each case is also

[R] imposing constraints on the covariance matrix of random effects in lme4?

2007-07-12 Thread JVVerkuilen
Hello all, I am using lme4 to fit some mixed logistic regressions. I need to impose an identification constraint of the following form: (1sig12) (sig12 sig22) and have not figured out how to do it, i.e., sig11 = 1 but the rest of the parameters are free to vary. Is this possible and,

Re: [R] automatically generating and accessing data frames of varyingdimensions

2007-07-12 Thread Bill.Venables
I'm not sure why you want to do it this way (it would probably help if we had a more complete picture of what you were really trying to do, but here are a few possibilities for the questions you ask. 1. generating data frames. rw - c(4,5,2) cl - c(3,3,3) for(i in 1:length(rw))

[R] legend and x,y cordinate values

2007-07-12 Thread Ajay Singh
Hi, I have two problems in R. 1. I need 10 cdfs on a graph, the graph needs to have legend. Can you let me know how to get legend on the graph? 2. In ecdf plot, I need to know the x and y co-ordinates. I have to get corresponding y coordinate values to x coordinate value so that I could be

Re: [R] JRI problem on 64bit Linux

2007-07-12 Thread Prof Brian Ripley
Our experience (and that of several others) is that you need Java 1.6 on x86_64 Linux for any of the JNI-using R packages to work correctly. E.g. the CRAN check machine is using 1.6. On Thu, 12 Jul 2007, chuckanut wrote: Sorry if this isn't the correct list, but I couldn't find any mailing