Re: [R] Expected pairwise.student.t and TukeyHSD behavior?

2010-03-24 Thread Rolf Turner
On 25/03/2010, at 4:03 PM, Walmes Zeviani wrote: > > This is because pairwise.student.t and TukeyHSD use differents estimates for > error term. TukeyHSD use the parameters covariance matrix and t use sample > variance. In this case a treatment with only one value doesn't have sample > variance b

Re: [R] Multi-panel Pie Charts.

2010-03-24 Thread Gurmeet
Thanks Charlie... I think its worth exploring ggplot2 functionality. On Wed, Mar 24, 2010 at 4:06 PM, Sharpie wrote: > > > Thanks for your reply Sharpie. I completely understand that it may not be > > the best to go with muti-panel pie charts, but my group would like to > have > > this utility a

Re: [R] Multi-panel Pie Charts.

2010-03-24 Thread Gurmeet
Hi Jim, exactly what we are expecting. Thanks a lot for your efforts... it should be really helpful! On Wed, Mar 24, 2010 at 10:50 PM, Jim Lemon wrote: > On 03/25/2010 06:00 AM, Gurmeet wrote: > >> Hi All, >> >> I'm trying to find out a way to plot multi-panel pie charts. It may not be >> the be

Re: [R] Expected pairwise.student.t and TukeyHSD behavior?

2010-03-24 Thread Walmes Zeviani
This is because pairwise.student.t and TukeyHSD use differents estimates for error term. TukeyHSD use the parameters covariance matrix and t use sample variance. In this case a treatment with only one value doesn't have sample variance but has a estimated standard error in a covariance matrix. The

Re: [R] Choosing the larger of row pairs

2010-03-24 Thread Peter Alspach
Tena koe Jim One solution: > jim key value 1 1 1 2 2 0 3 2 2 4 3 0 5 4 0 6 5 1 7 6 3 8 6 2 9 7 0 > tt <- rle(jim$key)$lengths > ttJim <- jim[cumsum(tt)-tt+tapply(jim$value, jim$key, which.max),] > ttJim key value 1 1 1 3 2 2 4

Re: [R] Multi-panel Pie Charts.

2010-03-24 Thread Jim Lemon
On 03/25/2010 06:00 AM, Gurmeet wrote: Hi All, I'm trying to find out a way to plot multi-panel pie charts. It may not be the best way to present data, but I would still need one. Hi Gurmeet, Your message prompted me to finish a little function that I had almost forgotten. panes<-function(n

[R] Expected pairwise.student.t and TukeyHSD behavior?

2010-03-24 Thread Jason Rupert
pairwise.t.test is returning NAs when one of the samples only has one entry, while TukeyHSD returns results (maybe not trustworthy or believable, but results). I stumbled on this because I did not realize one of my samples only had one entry while most of the others had several hundred, so I

Re: [R] Exclude data using logical

2010-03-24 Thread pgseye
That worked. Thanks a lot David - I appreciate it. Paul -- View this message in context: http://n4.nabble.com/Exclude-data-using-logical-tp1689992p1690090.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing

Re: [R] Three most useful R package

2010-03-24 Thread Xin Ge
- ggplot2 - lattice - reshape Request to R-team: Please make ggplot2 and reshape as default packages in R, they are really helpful! Thanks, Xin On Fri, Mar 5, 2010 at 10:48 PM, kMan wrote: > (1) - nlme, lattice, stats > (2) - a usable large-file/out of memory regression package that abstracts >

[R] Choosing the larger of row pairs

2010-03-24 Thread James Rome
I have a data frame with some rows that are almost, but not quite duplicates of each other. By using duplicated(key) on one column and on the column reversed, I can get 2 columns in my data frame that have adjacent rows with TRUE. For example keyvalue ddi

Re: [R] Exclude data using logical

2010-03-24 Thread David Winsemius
On Mar 24, 2010, at 7:46 PM, pgseye wrote: Hi, I'm wanting to exclude data more than 2 sd's from the mean before proceeding with further analyses. I've created new logical variables (a and b) and written them to the existing dataframe. I want to be able to subset the TRUE observations

Re: [R] GGPLOT2: Reverse order of legend to match order of x-axis

2010-03-24 Thread Ryan Garner
Hah, my previous post was from my attempt on Windows Vista. It works fine on Linux though. -- View this message in context: http://n4.nabble.com/GGPLOT2-Reverse-order-of-legend-to-match-order-of-x-axis-tp1689526p1689997.html Sent from the R help mailing list archive at Nabble.com. _

Re: [R] GGPLOT2: Reverse order of legend to match order of x-axis

2010-03-24 Thread Ryan Garner
Hadley, it doesn't work. Here is my step by step sequence following the Wordpress site instructions. R version 2.10.1 (2009-12-14) Copyright (C) 2009 The R Foundation for Statistical Computing ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistr

[R] Exclude data using logical

2010-03-24 Thread pgseye
Hi, I'm wanting to exclude data more than 2 sd's from the mean before proceeding with further analyses. I've created new logical variables (a and b) and written them to the existing dataframe. I want to be able to subset the TRUE observations based on another 2 factor variable. I'm assuming this

Re: [R] translating SQL statements into data.table operations

2010-03-24 Thread Gabor Grothendieck
Note that, in general, you can speed up joins, even within sqldf, by adding indexes to your tables and ensuring that your select statement is written in such a way that the indexes are used. See example 4i on the sqldf home page. On Wed, Mar 24, 2010 at 4:51 PM, Nick Switanek wrote: > I've recen

[R] Trying to create R dataframe with JRI

2010-03-24 Thread Ralf B
Hi all, I am writing here because the JRI mailing list seems abandoned... maybe some of you guys know an answer or has a pointer into the right direction. I am quite confused by the jars that exist between rServe, JRI and rJava. What I want to do is simply using a local R instance from Java and I

Re: [R] lattice grob

2010-03-24 Thread Paul Murrell
Hi baptiste auguie wrote: Thanks Felix and Paul. I had overlooked grid.grabExpr, assuming that one had to draw on a device before grabbing the output. Now I'm not sure if there's any difference between either solution, I'll go for the shortest. As Felix pointed out, one possible problem with

Re: [R] rpad ?

2010-03-24 Thread Erich Neuwirth
I found the repair by googling. You have to get the source and buld the package. The change needed is in HtmlTree.R You have to add return(str) at the end of the function definition. The reason is that for loops now return NULL, they returned (I think) the value of the last interation if the loope

Re: [R] GGPLOT2: Reverse order of legend to match order of x-axis

2010-03-24 Thread hadley wickham
See here: http://learnr.wordpress.com/2010/03/23/ggplot2-changing-the-default-order-of-legend-labels-and-stacking-of-data/ Hadley On Wed, Mar 24, 2010 at 2:40 PM, Ryan Garner wrote: > > How do I reverse the order of the legend in a bar plot to match order of the > x-axis? In other words, I want

Re: [R] Using dev.copy

2010-03-24 Thread Paul Murrell
Hi Dan Davison wrote: I'm working over an ssh connection without X11 graphics. I'm making a plot, the first stage of drawing which takes a long time. I want to experiment with adding details. Here is what I was hoping to do, which results in error. ## Draw the master plot on png dev 2 png(file=

[R] nls object -- how to edit?

2010-03-24 Thread Carl Witthoft
Hi, I recently used columns of a matrix as inputs to nls(), which works just fine, but then I get, for example, (assuming >nls(stuff)->nl30 was the original command) >nl30$call nls(dr[,2]~apowr^(dr[,1])/(b*sqrt(dr[,1]))) Now, I can build a new matrix with same dimensions as dr and use that t

Re: [R] help needed with boxplot

2010-03-24 Thread Jim Lemon
Oops! I sent before attaching the code. On 03/25/2010 06:03 AM, kathy_BJ wrote: Jim, I really appreciate your hlep. You almost solve my problem, I had tried both of your suggestions, but both of them only solve part of problem, and how can I combine their functions? your second sample can't gi

Re: [R] help needed with boxplot

2010-03-24 Thread Jim Lemon
On 03/25/2010 06:03 AM, kathy_BJ wrote: Jim, I really appreciate your hlep. You almost solve my problem, I had tried both of your suggestions, but both of them only solve part of problem, and how can I combine their functions? your second sample can't give the axis (like 0-20, 20-50 etc), btw,

Re: [R] write: write array to file without NAs

2010-03-24 Thread Sharpie
jannis-2 wrote: > > Dears, > > does anyone know, how I can get R to save the values of an array in a csv > like file using write(), but without printing NA to the file? I use ';' to > seperate the elements, so : > > a=c(1,NA,2,3,3) > > write(a) > > should produce > > > 1;;2;3;3 > > > in

[R] GGPLOT2: Reverse order of legend to match order of x-axis

2010-03-24 Thread Ryan Garner
How do I reverse the order of the legend in a bar plot to match order of the x-axis? In other words, I want the stacked colors of the legend to match the stacked colors of the bar plot. I tried this, but it didn't work. colors <- c("5" = "red","4" = "blue","3" = "darkgreen") p <- qplot(factor(cyl

[R] LDL matrix factorization

2010-03-24 Thread Luis Felipe Parra
Hello, I would like to do Block LDL' factorization for Hermitian indefinite matrices, where D is a block diagonal matrix and L a "psychologically lower triangular matrix" (i.e a product of unit lower triangular and permutation matrices) in L such that A = L*D*L'. The block diagonal matrix D has 1-

[R] write: write array to file without NAs

2010-03-24 Thread Jannis
Dears, does anyone know, how I can get R to save the values of an array in a csv like file using write(), but without printing NA to the file? I use ';' to seperate the elements, so : a=c(1,NA,2,3,3) write(a) should produce 1;;2;3;3 in the file. Thanks in advance! _

[R] Using R to analyze limesurvey data

2010-03-24 Thread Ottar Kvindesland
Hello everyone, I have a survey on LimeSurvey ( https://www.limeservice.com/ ) going and I am preparing data analysis. Data exports to R dumps are completed and works. I have slowly started learning R but would really appreciate some assistance in helping me fly faster. I do understand that this

[R] translating SQL statements into data.table operations

2010-03-24 Thread Nick Switanek
I've recently stumbled across data.table, Matthew Dowle's package. I'm impressed by the speed of the package in handling operations with large data.frames, but am a bit overwhelmed with the syntax. I'd like to express the SQL statement below using data.table operations rather than sqldf (which was

Re: [R] Converting a data set from 'long' format to 'interval' format

2010-03-24 Thread Henrique Dallazuanna
Try this: foo <- function(x) { data.frame(Id = unique(x$Id), rbind(range(x$time)), dose = unique(x$dose)) } t(sapply(split(as.data.frame(orig.data), with(rle(orig.data[,'dose']), rep(seq_along(lengths), lengths))), foo)) On Wed, Mar 24, 2010 at 12:27 PM

Re: [R] shading an area of a graphic

2010-03-24 Thread Andrew Rominger
Dennis, If I understand correctly, you should be able to do something like this (example with exponential decay): these.x <- (1:10)/10 plot(these.x,exp(-these.x),type="l") # create a basic plot for starting point this.usr <- par("usr")# get the plotting region limits # they are xleft, xrigh

Re: [R] Multi-panel Pie Charts.

2010-03-24 Thread Sharpie
Gary Miller wrote: > > Thanks for your reply Sharpie. I completely understand that it may not be > the best to go with muti-panel pie charts, but my group would like to have > this utility along with barplot/dotplot (may be, using it for proportions > data). Thanks, > Well, if the management t

Re: [R] Multi-panel Pie Charts.

2010-03-24 Thread Gary Miller
Gurmeet and I are looking for such utility. It could be helpful! On Wed, Mar 24, 2010 at 3:46 PM, Gary Miller wrote: > Thanks for your reply Sharpie. I completely understand that it may not be > the best to go with muti-panel pie charts, but my group would like to have > this utility along with b

Re: [R] Multi-panel Pie Charts.

2010-03-24 Thread Gary Miller
Thanks for your reply Sharpie. I completely understand that it may not be the best to go with muti-panel pie charts, but my group would like to have this utility along with barplot/dotplot (may be, using it for proportions data). Thanks, ~Gurmeet On Wed, Mar 24, 2010 at 3:38 PM, Sharpie wrote:

Re: [R] Multi-panel Pie Charts.

2010-03-24 Thread Sharpie
Gurmeet wrote: > > Hi All, > > I'm trying to find out a way to plot multi-panel pie charts. It may not be > the best way to present data, but I would still need one. > Would paneled bar charts not suffice? I don't mean to be harsh, but the only situation I can think of where I would consider

Re: [R] help needed with boxplot

2010-03-24 Thread kathy_BJ
Jim, I really appreciate your hlep. You almost solve my problem, I had tried both of your suggestions, but both of them only solve part of problem, and how can I combine their functions? your second sample can't give the axis (like 0-20, 20-50 etc), btw, we don't have "plotrix" function on our ma

[R] shading an area of a graphic

2010-03-24 Thread Dennis Fisher
Colleagues OS 10.5 R: 2.10.1 I have a simple x-y plot for which I would like to shade the lower (or upper) part of the interior region (i.e., the area bounded by the axes). If the delineation between top and bottom were linear, it would be use to use the polygon function. However, the deline

Re: [R] removing text form the graph(outer region)

2010-03-24 Thread Don MacQueen
You have to look at the documentation for the function you used to create the "calibration plot". Find out what options it has for controlling what text appears, and use them. If there are no options, then maybe there is a graphics parameter [ see help('par') ] that will prevent them. Otherwise

[R] Multi-panel Pie Charts.

2010-03-24 Thread Gurmeet
Hi All, I'm trying to find out a way to plot multi-panel pie charts. It may not be the best way to present data, but I would still need one. 1. Is anyone aware of some in-built script/function which can do this for me. I'm aware of one given in Deepayan's book, but anything apart from this? 2.

[R] Suggestions for synchronizing multisite R use?

2010-03-24 Thread Blair Christian
In the past, I have been using various rsync scripts for synchronizing, but just realized that I could upload the contents of my .Rprofile to google docs (to maintain a single copy with revision history), and then having each of my local .Rprofiles source the url. (Haven't tried it). Does anybody

Re: [R] vcov.nlminb

2010-03-24 Thread Ravi Varadhan
Try the `hessian' function in "numDeriv" package. It can produce very accurate hessians. Ravi. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Johnson, Brian P. Sent: Wednesday, March 24, 2010 12:14 PM To: r-help@r-project.org Cc:

Re: [R] string problems in R

2010-03-24 Thread Sharpie
Muting Zhang wrote: > > Hello all > > I have been working on my thesis using R. I am a newbie to R and met a > problem > that bothered me for a while due to my lack of acquaintance of R. > > I am using R to query from SQL. I got a list of crsp_fundno of G-style > mutual > funds which is still

[R] string problems in R

2010-03-24 Thread Muting Zhang
Hello all I have been working on my thesis using R. I am a newbie to R and met a problem that bothered me for a while due to my lack of acquaintance of R. I am using R to query from SQL. I got a list of crsp_fundno of G-style mutual funds which is still alive. I use the following codes and got wh

Re: [R] Mosaic

2010-03-24 Thread Matthew Dowle
When you click search on the R homepage, type "mosaic" into the box, and click the button, do the top 3 links seem relevant ? Your previous 2 requests for help : 26 Feb : Response was SuppDists. Yet that is the first hit returned by the subject line you posted : "Hartleys table" 22 Feb : Res

Re: [R] "methods with * how to see"

2010-03-24 Thread Erik Iverson
Try ?getAnywhere Fredrik Lundgren wrote: Dear R-gurus, When I use methods(general method) I sometimes get 'sub-methods marked with a *. How can see the code of such *-marked methods? Sincerly Fredrik Fredrik Lundgren fredrik.bg.lundg...@gmail.com Engelbrektsgata

[R] Filling a grid based on existing data

2010-03-24 Thread Steve Murray
Dear all, I currently have a data frame of dimensions 18556 rows by 19 columns. I want to convert this into a grid of dimensions 720 rows by 360 columns. The problem in this case is that not all rows in the initial data frame are complete (there are gaps). Therefore I am perhaps looking for a

Re: [R] Mosaic

2010-03-24 Thread Sam Thomas
I've typically used mosaic plots with categorical data - not sure what the numerical values represent. This fits a mosaic plot by rounding the values: library(vcd) t <- xtabs(resp ~ sexo + regiao + ano, data = dados) ft <- ftable(round(t)) cotabplot(ft, panel = cotab_coindep, type = "mosaic

[R] "methods with * how to see"

2010-03-24 Thread Fredrik Lundgren
Dear R-gurus, When I use methods(general method) I sometimes get 'sub-methods marked with a *. How can see the code of such *-marked methods? Sincerly Fredrik Fredrik Lundgren fredrik.bg.lundg...@gmail.com Engelbrektsgatan 31 582 21 Linköping tel 013 -

[R] vcov.nlminb

2010-03-24 Thread Johnson, Brian P.
Hello all, I am trying to get the variance-covariance (VCOV) matrix of the parameter estimates produced from the nlminb minimizing function, using vcov.nlminb, but it seems to have been expunged from the MASS library. I also tried using the vcov function after minimizing the function with the nlm f

Re: [R] install ncdf package

2010-03-24 Thread Sharpie
Pinto wrote: > > Dear R users > > I am attempting to add lncdf_1.6.tar.gz libraries within R, and have > failed. I have R version 2.8.1, and are running on fedora 10 Kernel Linux > 2.6.293.-60.fc10.x86_64. > I've run R CMD INSTALL ncdf_1.6.tar.gz > and I have the following > ---

[R] vcov.nlminb

2010-03-24 Thread Johnson, Brian P.
Hello all, I am trying to get the variance-covariance (VCOV) matrix of the parameter estimates produced from the nlminb minimizing function, using vcov.nlminb, but it seems to have been expunged from the MASS library. The hessian from nlminb is also producing NaNs, although the estimates seems to b

[R] Recall: vcov.nlminb

2010-03-24 Thread Johnson, Brian P.
Johnson, Brian P. would like to recall the message, "vcov.nlminb". [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/p

[R] Converting a data set from 'long' format to 'interval' format

2010-03-24 Thread Marie-Pierre Sylvestre
Hi, I have a data set in which the variable 'dose' is time-varying. Currently, the data set is in a long format, with 1 row for each time unit of follow-up for each individual "Id". It looks like this: orig.data <- cbind(Id = c(rep(1,4), rep(2,5)), time = c(1:4, 1:5), dose = c(1,1,1,0,1,0,1,1,0)

[R] R warning and error messages taking a long time and generating pop-up windows

2010-03-24 Thread Balko, Justin
Hi all, thanks for your help in advance. I was running some scripts and suddenly R began taking a very long time to process mundane errors, which I often generate since I am new to R...such as forgetting to add in my quote getOption(warn) Error in options(x) : object 'warn' not found Not only d

[R] Using svm function

2010-03-24 Thread Lgn8412
Hello, I'm a newbie in this language, and I'm using svm to predict events using R, and would like to know what are the arguments that can be sent to the svm function, the only example I have about this is about the iris example and goes like this data("iris") model <- svm(Species ~ ., data = iris

[R] Deleting duplicate rows in a matrix at random

2010-03-24 Thread jeff.m.ewers
Hello, I am relatively new to R, and I've run into a problem formatting my data for input into the package RankAggreg. I have a matrix of gene titles and P-values (weights) in two columns: KCTD12 4.06904E-22 UNC93A 9.91852E-22 CDKN3 1.24695E-21 CLEC2B 4.71759E-21 DAB21.12062E-20 HSPB1

[R] Zelig: Error message for 'mlogit'

2010-03-24 Thread Mathew, Abraham T
I'm running a multinomial logit in R using the Zelig package. However I get the following error. HELP anes96two <- zelig(trade962a ~ age962 + education962 + personal962 + economy962 + partisan962 + employment962 + union962 + home962 + market962 + race962 + income962, model="mlogit", data=data

[R] plotting Zero Inflated Poisson regression lines

2010-03-24 Thread Adam Gorka
Dear All, I'm using zeroinfl() from the pscl-package for zero inflated Poisson regression. I have a continuous variable that interacts with a dichotomous variable to predict my outcome. I want to plot the relationship predicted by the count model in my ZIP regression between my continuous IV and t

Re: [R] lattice: defining graphical parameters

2010-03-24 Thread Bert Gunter
Jannis: I understand your confusion, but you need to read and follow the lattice documentation more carefully. You may also wish to consider getting Deepayan's book, which provides a gentler, less terse, and more organized guide to lattice's complexities with many more examples. Anyway, names(tre

Re: [R] splitting word

2010-03-24 Thread Jannis
strsplit(x,split="") --- phoebe kong schrieb am Mi, 24.3.2010: > Von: phoebe kong > Betreff: [R] splitting word > An: "r-help" > Datum: Mittwoch, 24. März, 2010 16:46 Uhr > Hi all, > > Could someone tell me how to split a word. > > c("AA") > > to > > c("A","A") > > Thanks! > > Phoebe >

Re: [R] splitting word

2010-03-24 Thread John Fox
Dear Phoebe, If I understand correctly that you always want to split a word into individual letters, then strsplit("AA", "")[[1]] will do the trick -- and help.search("split") turns up strsplit(). I hope this helps, John John Fox Senator William McMaster Prof

[R] Export R dataframe to STA with Variable Labels

2010-03-24 Thread reesemike
I've successfully imported a Stata file (dta) into R with the read.dta (function) (i.e., data, variable labels, and value labels import correctly). After working in R, I use write.dta to export the data frame back to a *.dta file. The data and value labels convert fine, but the variable labels d

[R] splitting word

2010-03-24 Thread phoebe kong
Hi all, Could someone tell me how to split a word. c("AA") to c("A","A") Thanks! Phoebe [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] Summing with NA

2010-03-24 Thread Alain Guillet
Hi, Do help(sum) to find more information about the option na.rm=T > sum(c(z,e,k),na.rm=T) [1] -23 Alain On 24-Mar-10 17:21, Muhammad Rahiz wrote: Slightly longer method, but works as well. z <- c(-12,-9) e <- c(-2,0) k <- c(NA,NA) x <- c(z,e,k) x1 <- which(x!="NA",arr.ind=TRUE) # get el

Re: [R] ordinal regression

2010-03-24 Thread Frank E Harrell Jr
Iasonas Lamprianou wrote: Dear colleagues, i am carrying out an ordinal regression model. I try it on SPSS but I "flirt" with R as well. I have a few questions. 1. What is the most reliable/tested/trusted package for ordinal regression in the R world? 2. Also, I have a statistical question.

Re: [R] Summing with NA

2010-03-24 Thread William Dunlap
> -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Muhammad Rahiz > Sent: Wednesday, March 24, 2010 9:21 AM > To: tj > Cc: r-help@r-project.org > Subject: Re: [R] Summing with NA > > Slightly longer method, but works as well. >

[R] install ncdf package

2010-03-24 Thread Pinto
Dear R users I am attempting to add lncdf_1.6.tar.gz libraries within R, and have failed. I have R version 2.8.1, and are running on fedora 10 Kernel Linux 2.6.293.-60.fc10.x86_64. I've run R CMD INSTALL ncdf_1.6.tar.gz and I have the following --- * Installing to library '/usr/li

Re: [R] Summing with NA

2010-03-24 Thread Muhammad Rahiz
Slightly longer method, but works as well. z <- c(-12,-9) e <- c(-2,0) k <- c(NA,NA) x <- c(z,e,k) x1 <- which(x!="NA",arr.ind=TRUE) # get elements which are not NA x2 <- x[x1] sum(x2) [1] -23 -- Muhammad tj wrote: Hi all, May I request for your help if you have time and if you have an i

[R] lattice: defining graphical parameters

2010-03-24 Thread Jannis
Dears, could anyone give me some advice how to change some plotting parameters for a lattice graph? I need to adjust the following: -reduce outer margins (like par(mar=c(0,0,0,0)) with base graphs) -modify positions of labels (like par(mpg=c(0,0,0)) with base graphs) I already did some resea

Re: [R] Bulk editing of mySQL tables

2010-03-24 Thread Albart
Hello Daniel, although I am not completely sure what you mean with 'batch changes to data'. Assuming that you want to modify the data in your tables, I would first try to do it in MySQL without exporting it to R and the importing it back. If it is to difficult to do in MySQL, for example a comple

Re: [R] Sample size for proportion, not binomial

2010-03-24 Thread Prew, Paul
Dear Marc, Thank you very much for the advice and the papers, it helps. Regards, Paul From: >Marc Schwartz To: "Prew, Paul" Cc: r-help@r-project.org Subject: Re: [R] Sample size for proportion, not binomial Message-ID: Content-Type: text/plain; charset=windows-1252 On Mar 23, 2010, at 11:0

[R] removing text form the graph(outer region)

2010-03-24 Thread paaventhan jeyaganth
Dear R communities, when i do a calibration plot i have text inside the graph bottom left and right (outer region) saying x resampling added B=200, i want to get rid of this texts please advise me how can i do it Thanks very much Paaveen

Re: [R] barplot (stacked)

2010-03-24 Thread K. Elo
Hi Jens! 24.03.2010 14:48, koj wrote > > Hi Kimmo, thank you for your answer, but this is not the thing I am searching > for. Unfortunately, I have not described the problem very good. But just in > this moment I have a good idea: I use add=TRUE and paint two plots. And so I > am sure that I can

Re: [R] rpad ?

2010-03-24 Thread Bos, Roger
Erich, I use Rpad actively so I am disappointed to hear it is no longer being updated. Would you be willing to share your modifications with the list, or at least with me? Thanks, Roger -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Beh

[R] Mosaic

2010-03-24 Thread Silvano
Hi, I have this data set: obitoss = c( 5.8,17.4,5.9,17.6,5.8,17.5,4.7,15.8, 3.8,13.4,3.8,13.5,3.7,13.4,3.4,13.6, 4.4,17.3,4.3,17.4,4.2,17.5,4.3,17.0, 4.4,13.6,5.1,14.6,5.7,13.5,3.6,13.3, 6.5,19.6,6.4,19.4,6.3,19.5,6.0,19.7) (dados = data.frame( regiao = factor(rep(c('Norte', 'Nordeste', 'Sudest

[R] Predict from glm

2010-03-24 Thread Luciano La Sala
Dear list members, I fitted a glm model (See output below). My outcome is death, and weight (continuous), ClutchSize (3-level factor), EggVolume (continuous), Sex (obviously 2-level factor), and SiblingCompetence (2-level factor) are my covariates. I'd like to obtain the odds of death for a

Re: [R] removing fields of the same group from a data frame

2010-03-24 Thread Marc Schwartz
On Mar 24, 2010, at 8:38 AM, Oscar Franzén wrote: > Dear all, > > I'm trying to find a a way to remove certain fields belonging to the same > group from a data frame structure. > > I have a data frame like this: > > foo v1 v2 v3 > 1 1 a > 6 2 a > 3 8 a > 4 4 b >

Re: [R] removing fields of the same group from a data frame

2010-03-24 Thread Henrique Dallazuanna
Try this: subset(foo, v3 %in% names(which(!table(foo$v3) < 3))) On Wed, Mar 24, 2010 at 10:38 AM, Oscar Franzén wrote: > Dear all, > > I'm trying to find a a way to remove certain fields belonging to the same > group from a data frame structure. > > I have a data frame like this: > >  foo v1 v2

Re: [R] flexible alternative to subsetting dataframe inside nested loops

2010-03-24 Thread hadley wickham
On Wed, Mar 24, 2010 at 8:52 AM, mgierdal wrote: > > I have a dataFrame variable: > >      L1  L2 L3 ... v1 v2 ... >  1 >  2 >  3 >  4 >  ... > > I want to process subsets of it as defined by combinations of L1-L2-L3. I do > it successfully using nested loops: > > for (i in valuesOfL1 { >  for (j

[R] flexible alternative to subsetting dataframe inside nested loops

2010-03-24 Thread mgierdal
I have a dataFrame variable: L1 L2 L3 ... v1 v2 ... 1 2 3 4 ... I want to process subsets of it as defined by combinations of L1-L2-L3. I do it successfully using nested loops: for (i in valuesOfL1 { for (j in valuesOfL2) { for (k in valuesOfL3) { tempData <- subs

[R] removing fields of the same group from a data frame

2010-03-24 Thread Oscar Franzén
Dear all, I'm trying to find a a way to remove certain fields belonging to the same group from a data frame structure. I have a data frame like this: foo v1 v2 v3 1 1 a 6 2 a 3 8 a 4 4 b 4 4 b 2 1 c 1 6 d Each row can then be group

Re: [R] How to use the paste function to create an already used variable

2010-03-24 Thread Henrique Dallazuanna
Try this: Data <- lapply(ls(pattern = 'data[0-9]'), get) Data[[1]] is data1 Data[[2]] is data2 etc. 2010/3/24 "Biedermann, Jürgen" : > Hi there, > > I have the following problem > > Four data frames exist: > > data1 > data2 > data3 > data4 > > Now I want to write a loop and temporarily stor

Re: [R] How to use the paste function to create an already used variable

2010-03-24 Thread Duncan Murdoch
On 24/03/2010 9:25 AM, Tal Galili wrote: Try: for (i in 1:4) { Data <- eval(parse(text = paste("data",i,sep=""))) ... .. } (and if there are other solutions - I would love to know) The get() function is simpler if you're just retrieving a variable: Data <- get(paste("data", i, sep=""))

Re: [R] R and/or REngine kills Java

2010-03-24 Thread Martin Morgan
Hi Ralf -- On 03/23/2010 11:53 PM, Ralf B wrote: > Hi all, > > I am using R and JRI under Windows XP Pro. I am posting this question > here since the reason might be R related (since I am running an R > script) but there is also a very good chance that it is JRI only > (since I am using the JRI i

Re: [R] How to use the paste function to create an already used variable

2010-03-24 Thread David Winsemius
On Mar 24, 2010, at 9:25 AM, Tal Galili wrote: Try: for (i in 1:4) { Data <- eval(parse(text = paste("data",i,sep=""))) ... .. } (and if there are other solutions - I would love to know) Well, it's not actually a solution since the first three fetched values would have been overwritten.

[R] isdst warning when rounding a range of time data: fix or suppress?

2010-03-24 Thread Clay Heaton
Hi, I'm working with timeseries data. The values are every 5 seconds and each series can last up to 4-5 days. To generate the x-axis labels, I'm doing the following: = # Variable for displaying hours on the x-axis rtime <<- as.POSIXct(round(range(timedata), "hours")) # V

Re: [R] How to use the paste function to create an already used variable

2010-03-24 Thread Tal Galili
Try: for (i in 1:4) { Data <- eval(parse(text = paste("data",i,sep=""))) ... .. } (and if there are other solutions - I would love to know) Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.

[R] multiple line plots from ncdf files

2010-03-24 Thread christine
How can I create a multi-line plot from a netCDF files that containes the following fields:   time [MM] 195301 195302 195303 [.] 195312 [..] 200112   data [float] mm1 mm2 mm3 [...] (monthly mean value for each months in the time series.)   I want to plot the annual cycle of s

[R] How to use the paste function to create an already used variable

2010-03-24 Thread Biedermann, Jürgen
Hi there, I have the following problem Four data frames exist: data1 data2 data3 data4 Now I want to write a loop and temporarily store the data1, data2, data3, data4 in a variable called data. I tried the following... for (i in 1:4) { Data <- paste("data",i,sep="") ... .. } but it doesn'

[R] help in matlab - r code

2010-03-24 Thread marta rufino
Dear list members, I need to translate 3 lines of matlab code to R (a loop, to be specific), and I don't know what would be the results in matlab or how to do it in R-- I don't realise if they are doing to the col, vector or what. if the results are a vector or a value or a matrix :-( Anyone with

Re: [R] barplot (stacked)

2010-03-24 Thread koj
Hi Kimmo, thank you for your answer, but this is not the thing I am searching for. Unfortunately, I have not described the problem very good. But just in this moment I have a good idea: I use add=TRUE and paint two plots. And so I am sure that I can solve the problem. -- View this message in con

[R] pca error message

2010-03-24 Thread ogbos okike
Hi All, I have been running pca smoothly for some time now. However, the error message below makes progress difficult for me. It will be much appreciated if anybody can hint me on the possible source of this error. Thanks Ogbos The error: Error in pca$rotation %*% sqrt(data.cor.eigen.matrix) : no

Re: [R] ordinal regression

2010-03-24 Thread Iasonas Lamprianou
Dear colleagues, i am carrying out an ordinal regression model. I try it on SPSS but I "flirt" with R as well. I have a few questions. 1. What is the most reliable/tested/trusted package for ordinal regression in the R world? 2. Also, I have a statistical question. What is the danger of havin

[R] likelihood profiles for multiple parameters

2010-03-24 Thread Benedikt Gehr, Institut für Evolutionsbiologie und Umweltwissenschaften
Hi I'm using mle2 for optimization of a multinomial likelihood. The model fit is not very good and I would like to look at the likelihood profiles. However I'm optimizing many parameters (~40) so using the function profile() takes forever and is not practical. How can I calculate approximate

Re: [R] no predict function in lme4 ?

2010-03-24 Thread Kevin Wright
There is a very nice paper that illustrates a flexible approach that allows the user to specify nearly any possible prediction he or she may desire. A flexible system is critical since "one man's fixed effect is another man's random effect" to quote Schabenberger. @article{welham2004prediction,

[R] optimize a joint lieklihood with mle2

2010-03-24 Thread Benedikt Gehr, Institut für Evolutionsbiologie und Umweltwissenschaften
Hi I'm trying to maximize a joint likelihood of 2 likelihoods (Likelihood 1 and Likelihood 2) in mle2, where the parameters I estimate in Likelihood 2 go into the likelihood 1. In Likelihood 1 I estimate the vector logN with length 37, and for the Likelihood 2 I measure a vector s of length 8.

Re: [R] with data in the form of an R data objecte: Monte Carlo simulation in R

2010-03-24 Thread David Winsemius
On Mar 23, 2010, at 11:00 PM, Hongwei Dong wrote: Hi, please use the following the matrix z as the example: x<-c(2,4,5,7,6,9,8,2,0) y<-matrix(x,3,3) z<-apply(y,2,function(x)x/sum(x)) z [,1] [,2] [,3] [1,] 0.1818182 0.3181818 0.8 [2,] 0.3636364 0.2727273 0.2 [3,] 0.4545455

Re: [R] barplot (stacked)

2010-03-24 Thread K. Elo
Hi Jens! 23.03.2010 17:18, koj wrote: The problem is: I want to group the data. I want to have ten groups. The first two bars should be [1,1] and [2,1] together in one bar and in the second bar of the first obervation should be [1,2] and [2,2] (stacked with beside =TRUE). Therefore the first obs

[R] nls function

2010-03-24 Thread Trafim Vanishek
Hi everybody, would like to ask if there is any possibility to get SOME BEST result for nls fitting if the function itself doesn't produce it. I already increased number of iterations, reduced minfactor and still it doesn't give me the solution. Thanks a lot. [[alternative HTML version d

Re: [R] R Full Screen

2010-03-24 Thread David Winsemius
On Mar 24, 2010, at 6:57 AM, Simon Kiss wrote: Hello all, I'm new user with R and just completed a five day course on the program. Somehow, a few basic questions remain unanswered. I'm working on a Mac Os X system and have my laptop connected to a large, flat-screen monitor. I can't make

  1   2   >