[R] how to solve error in precict( ) while using with rpart?

2010-03-24 Thread vibha patel
Hello, I am working with rpart function but geting some error in prediction. the same code works fine with iris dataset. but applying other dataset it doesn't work. sample code is given for reference. acc_model-rpart(V1~V2+V3+V4+V5+V6+V7+V8, data=accEx.train) plotcp(acc_model)

Re: [R] Bold greek letters using plotmath

2010-03-24 Thread Prof Brian Ripley
Plotmath does not have a bold symbol font -- R's plotting system has only 5 fonts (see 'font' in ?par), and bold symbol fonts are not commonly installed in plotting systems. Strictly the symbols such as mu used in mathematical notation differ from the letters used in Greek. You may get a

[R] R and/or REngine kills Java

2010-03-24 Thread Ralf B
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 interface to activate the script) -- in which case I want to

Re: [R] Plot ``freezes''.

2010-03-24 Thread Prof Brian Ripley
On Wed, 24 Mar 2010, Rolf Turner wrote: In an elderly version of ``plotSymbols'' (now in the cwhmisc package) that I had lying around, there was the example plot(1:10,xlab=\374) which the comments said would give a u-umlaut as the x-axis label. In a Latin-1 encoding, which R gave up as

[R] how to make a histogram with non-numeric x's?

2010-03-24 Thread cbarcelo
Hello, I need to make a histogram with variable x bin ranges. For example my bins are 0-15, 15-25, 25-40 etc. Any suggestions? Thanks! -- View this message in context: http://n4.nabble.com/how-to-make-a-histogram-with-non-numeric-x-s-tp1680093p1680093.html Sent from the R help mailing list

Re: [R] Affymetrix Cancer Dataset

2010-03-24 Thread Jim Silverton
I am looking for an online (easily accessible) form of the samples of genetic data for those with cancer and those without cancer. Can anyone direct me in the right place? Thanks, Jim [[alternative HTML version deleted]] __

Re: [R] Affymetrix Cancer Dataset

2010-03-24 Thread Henrik Bengtsson
You might find something of interest via this page: http://www.aroma-project.org/node/51 /Henrik On Wed, Mar 24, 2010 at 9:32 AM, Jim Silverton jim.silver...@gmail.com wrote: I am looking for an online (easily accessible) form of the samples of genetic data for those with cancer and those

Re: [R] Changing axis origin for plot

2010-03-24 Thread Jim Lemon
On 03/24/2010 11:08 AM, Ralf B wrote: Hi all, I am plotting data using the simple plot function: plot(data$x, data$y) which results in a standard plot with the axis origin in the lower left corner. ^ | | | | | O O | O O -- Since my data are screen coordinates

Re: [R] how to make a histogram with non-numeric x's?

2010-03-24 Thread Jim Lemon
On 03/24/2010 04:36 PM, cbarcelo wrote: Hello, I need to make a histogram with variable x bin ranges. For example my bins are 0-15, 15-25, 25-40 etc. Any suggestions? Thanks! Hi cbarcelo, You can just do this: x-sample(0:40,100,TRUE) hist(x,breaks=c(0,15,25,40)) which will produce

Re: [R] Monte Carlo simulation in R

2010-03-24 Thread Ted Harding
On 24-Mar-10 01:05:56, Hongwei Dong wrote: Hi, R-helpers, I'm trying to use R to do a Monte Carlo simulation and need the help. What I have is a matrix that consists of the probabilities for the persons to choose zones. For example, in the matrix shown below, each column represents a

[R] R Full Screen

2010-03-24 Thread Simon Kiss
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 any of the Quartz windows fill the monitor's

Re: [R] help needed with boxplot

2010-03-24 Thread Jim Lemon
On 03/24/2010 06:08 AM, kathy_BJ wrote: Thank you so much for help, Jim. But I didn't get any plot after I submit the job except below, which indicating the number of lines for the two inputs. What's the problem? Read 3360 records Read 3360 records I know I didn't confuse you. Okay, let's

[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

Re: [R] Converting date format

2010-03-24 Thread Muhammad Rahiz
The following functions may help; strptime() ISOdate() Muhammad Hosack, Michael wrote: R community: Hello, I would to like to convert a character date variable from %m/%d/%Y to %m/%d/%y. Any advice would be greatly appreciated. I have tried functions for changing the formatting and

[R] Bulk editing of mySQL tables

2010-03-24 Thread Daniel Brewer
Hello, I have started to use RMySQL and I would like to use R to make batch changes to data. What it the best way to do this? Is it to download the table using dbGetQuery, manipulate the data in R and then dbWriteTable to delete the existing table and replace it with the local data. What I am

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

[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

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

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

[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

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] 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] 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 having

[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) :

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

[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

[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't

[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

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:

[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)) #

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.

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

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=)) Duncan

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 juergen.biederm...@charite.de: Hi there, I have the following problem Four data frames exist: data1 data2 data3 data4 Now I want to write a loop and

[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

[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 -

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 mgier...@gmail.com 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

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 oscar.franz...@gmail.com 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

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 4 4

[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

[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',

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

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

[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] 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 marc_schwa...@me.com To: Prew, Paul paul.p...@ecolab.com Cc: r-help@r-project.org Subject: Re: [R] Sample size for proportion, not binomial Message-ID:

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

[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

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 idea on

[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

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. z -

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 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 elements

[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

[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

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 Professor

Re: [R] splitting word

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

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,

[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

[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,

[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

[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] 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

[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] 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

[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

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. I also tried using the vcov function after minimizing the function with the nlm

[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 -

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] 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

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

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 :

[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

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 alive. I

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:

[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

[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.

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] 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

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

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 a

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

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 mail2garymil...@gmail.comwrote: 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

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 trolls

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, xright,

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

[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

[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] 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] 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

[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),

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 the file.

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] 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

[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 to

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

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 ryan.steven.gar...@gmail.com wrote: How do I reverse the order of the legend in a bar plot to match order of the

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

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

[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

  1   2   >