[R] [R-pkgs] New package lazyData submitted to CRAN

2013-02-25 Thread Bill Venables
I have submitted a tiny new package to CRAN, lazyData. This has a single function requireData which is designed as a drop-in replacement for base::require. In addition to doing the same job as base::require, it supplies a LazyData facility for those packages which have data but do not provide

[R] [R-pkgs] conf.design 2.0.0 has been submitted to CRAN

2013-02-25 Thread Bill Venables
A new release of the conf.design package has been submitted to CRAN. This is largely a tidying up release, with no substantial change in functionality. The one difference some users may notice is that the method functions factorize.default factorize.factor are no longer exported directly, but

Re: [R] How to plot 2 continous variables on double y-axis with 2 factors: ggplot2, gplot, lattice, sciplot?

2013-02-25 Thread Jim Lemon
On 02/25/2013 05:07 PM, Anna Zakrisson wrote: Hi, I have a data set with two continous variables that I want to plot MEANS (I am not intrerested in median values) on a double-y graph. I also have 2 factors. I want the factor combinations plotted in different panes. Dummy dataset: mydata-

Re: [R] quesion about SS of ANOVA

2013-02-25 Thread Bert Gunter
This is a basic statistics question and off topic here. Talk to a statistician (i.e. someone with a good statistics background) or start reading. You need an extensive statistics tutorial that I believe is too much for online forums like stats.stackexchange.com. -- Cheers, Bert On Sun, Feb 24,

[R] Data frame as table

2013-02-25 Thread Franck . BERTHUIT
Hello R user's, I've read a txt file with the read.table syntax. This file is already in a form of a contingency table (130 rows, 90 columns) with wich i would like to do a simple correspondance analysis with the ca() syntax. Are there a way to do an as.table(my data.frame) transformation ? Or

Re: [R] Use of the newdata parameter in the predict.coxph function

2013-02-25 Thread Andrews, Chris
Couldn't reproduce your error (but I did get a warning message): ads1S - with(ads1,Surv(INTERVAL_START,EVENT,STATUS,type=c('counting'))) Warning message: In Surv(INTERVAL_START, EVENT, STATUS, type = c(counting)) : Stop time must be start time, NA created cox_out -

Re: [R] quesion about SS of ANOVA

2013-02-25 Thread peter dalgaard
On Feb 25, 2013, at 12:35 , Bert Gunter wrote: This is a basic statistics question and off topic here. Talk to a statistician (i.e. someone with a good statistics background) or start reading. You need an extensive statistics tutorial that I believe is too much for online forums like

Re: [R] package ReadImages

2013-02-25 Thread Uwe Ligges
Note that ReadImages has been orphaned and is under the BSD license, so you can become maintainer and re-establish the package on CRAN. Best, Uwe Ligges On 25.02.2013 07:50, PIKAL Petr wrote: Thanks to all. For the time being due to urgency I will stay with a copy of R 2.15.x with which

Re: [R] Data frame as table

2013-02-25 Thread Rui Barradas
Hello, If your data.frame is named 'dat', the following might be what you want. as.table(data.matrix(dat)) Hope this helps, Rui Barradas Em 25-02-2013 11:35, franck.berth...@maif.fr escreveu: Hello R user's, I've read a txt file with the read.table syntax. This file is already in a form

Re: [R] Making the plot window wider and using the predict function

2013-02-25 Thread PIKAL Petr
Hi From: Rasmus Hedegaard [mailto:hedegaard...@hotmail.com] Sent: Monday, February 25, 2013 2:53 PM To: PIKAL Petr Subject: RE: [R] Making the plot window wider and using the predict function Thank you, Petr - the command linreg0 - lm(Hwt ~ Bwt, data = maleData) works perfectly. Regarding

Re: [R] R software installation problem

2013-02-25 Thread Andy Siddaway
Dear Sarah, Thanks for your email. I'll describe the problm but without the screenshots then. Firstly, I think I’ve correctly installed R. I have installed R for Windows via the R site, CRAN and then UK – University of Bristol or UK – Imperial College London. Both times, I have installed the

[R] Empirical Bayes Estimator for Poisson-Gamma Parameters

2013-02-25 Thread Ali A. Bromideh
Dear Sir/Madam, I apologize for any cross-posting. I got a simple question, which I thought the R list may help me to find an answer. Suppose we have Y_1, Y_2, ., Y_n ~ Poisson (Lambda_i) and Lambda_i ~Gamma(alpha_i, beta_i). Empirical Bayes Estimator for hyper-parameters of the gamma distr,

[R] creating variable that codes for the match/mismatch between two other variables

2013-02-25 Thread Jonas Walter
Dear all, I have got two vectors coding for a stimulus presented in the current trial (mydat$Stimulus) and a prediction in the same trial (mydat$Prediciton), respectively. By applying an if-conditional I want to create a new vector that indicates if there is a match between both vectors in

Re: [R] Empirical Bayes Estimator for Poisson-Gamma Parameters

2013-02-25 Thread Bert Gunter
Homework? We don't do homework here. If not, search (e.g. via google -- R hierarchical Bayes -- or some such). -- Bert On Mon, Feb 25, 2013 at 1:39 AM, Ali A. Bromideh a.bromi...@ikco.com wrote: Dear Sir/Madam, I apologize for any cross-posting. I got a simple question, which I thought

[R] ggplot2 Increase font size

2013-02-25 Thread Alaios
Dear all, I am using the code as below   tdm - melt(matrixToPlot)    p- ggplot(tdm, aes(x = Var2, y = Var1, fill = factor(value))) +   labs(x = Mz, y = T, fill = D) +   geom_raster(alpha=1) +   scale_fill_discrete(h.start=1) +  

Re: [R] R software installation problem

2013-02-25 Thread PIKAL Petr
Hi -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of Andy Siddaway Sent: Monday, February 25, 2013 11:24 AM To: Sarah Goslee Cc: r-help Subject: Re: [R] R software installation problem Dear Sarah, Thanks for your email.

Re: [R] R software installation problem

2013-02-25 Thread R. Michael Weylandt
On Mon, Feb 25, 2013 at 10:24 AM, Andy Siddaway andysidda...@googlemail.com wrote: Dear Sarah, Thanks for your email. I'll describe the problm but without the screenshots then. Firstly, I think I’ve correctly installed R. I have installed R for Windows via the R site, CRAN and then UK –

Re: [R] creating variable that codes for the match/mismatch between two other variables

2013-02-25 Thread PIKAL Petr
Hi -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of Jonas Walter Sent: Monday, February 25, 2013 2:38 PM To: r-help@r-project.org Subject: [R] creating variable that codes for the match/mismatch between two other variables

Re: [R] ggplot2 Increase font size

2013-02-25 Thread Ista Zahn
Hi Alex, See ?theme Best, Ista On Mon, Feb 25, 2013 at 9:44 AM, Alaios ala...@yahoo.com wrote: Dear all, I am using the code as below tdm - melt(matrixToPlot) p- ggplot(tdm, aes(x = Var2, y = Var1, fill = factor(value))) + labs(x = Mz, y = T, fill = D) +

Re: [R] Data frame as table

2013-02-25 Thread Franck . BERTHUIT
Yes, it works. Thank very much you Rui. Franck Berthuit France De :Rui Barradas ruipbarra...@sapo.pt A : franck.berth...@maif.fr, Cc :r-help@r-project.org Date : 25/02/2013 15:10 Objet : Re: [R] Data frame as table Hello, If your data.frame is named 'dat', the following

Re: [R] creating variable that codes for the match/mismatch between two other variables

2013-02-25 Thread Jonas Walter
Hi Petr, oh, that's really way more easier than the way I did it. Thanks for the hint! The problem with no prediction is that these cases are already coded within the Prediction variable. 0 codes no prediction required while 1 and 2 codes for different predictions. Therefore, there are no

Re: [R] creating variable that codes for the match/mismatch between two other variables

2013-02-25 Thread PIKAL Petr
Hi -Original Message- From: Jonas Walter [mailto:jonas.wal...@student.uni-tuebingen.de] Sent: Monday, February 25, 2013 4:25 PM To: PIKAL Petr Cc: r-help@r-project.org Subject: RE: [R] creating variable that codes for the match/mismatch between two other variables Hi Petr,

[R] legend issues.

2013-02-25 Thread Nicole Ford
hello, all. one of my students is having an issue with the pie legend function. this is her code. (below) it works just fine for me. her error is plot.new has not been called yet. i know this means her pie chart is coming up blank so the legend will not work. according to ?graphics this

[R] lattice: column titles using xlab.top in multipanel xyplot

2013-02-25 Thread Manuel Kunz
Hi, I created a xyplot with a three-column layout. As suggested by Deepayan I tried to put titles to each column by using xlab.top. Unfortunately, as my y-axis scale relation = free, the column titles are not centered at the three x axes anymore. Any idea how to center the titles? #Example:

[R] Combining boxplot

2013-02-25 Thread Philippe Massicotte
Hi everyone. I have two data frames that contain the same variables but with different number of observation. I would like to know it was possible to combine the data so I can have paired boxplot on the same figure. For example, df1 = data.frame(x = rnorm(100)) df1$type = ifelse(df1$x

Re: [R] How to define variables as categorical using Gower with Daisy

2013-02-25 Thread Joanna Papakonstantinou
Thank you for pointing me to ?dissimilarity.object. I now see that N = Nominal (factor) and I = Interval scaled (numeric). Regards. On Sun, Feb 24, 2013 at 2:36 PM, Peter Ehlers ehl...@ucalgary.ca wrote: On 2013-02-24 07:57, Joanna Papakonstantinou wrote: I am using the iris dataset that

Re: [R] Combining boxplot

2013-02-25 Thread William Dunlap
Does the following produce what you want? lst - c(Observed=with(df1, split(x, type)), Simulated=with(df2, split(x, type))) lst - lst[c(seq(1,length(lst)-1,by=2), seq(2,length(lst),by=2))] boxplot(lst, col=rep(c(gray,red),len=length(lst))) Bill Dunlap Spotfire, TIBCO Software wdunlap

Re: [R] Issues with TMPDIR/TEMP/TMP? Failure of R CMD check under Windows 7

2013-02-25 Thread Gabor Grothendieck
On Mon, Feb 25, 2013 at 2:10 AM, Ulrike Grömping groemp...@bht-berlin.de wrote: Gabor, thanks for your patient answers! I have adjusted the Rtools path to consist of both the bin and the gcc-4.6.3 sub directory, and that did it. The R path was set by R as it was, presumably because this is

Re: [R] Issues with TMPDIR/TEMP/TMP? Failure of R CMD check under Windows 7

2013-02-25 Thread Ulrike Grömping
Am 25.02.2013 18:21, schrieb Gabor Grothendieck: On Mon, Feb 25, 2013 at 2:10 AM, Ulrike Grömping groemp...@bht-berlin.de wrote: Gabor, thanks for your patient answers! I have adjusted the Rtools path to consist of both the bin and the gcc-4.6.3 sub directory, and that did it. The R path was

Re: [R] legend issues.

2013-02-25 Thread David Winsemius
On Feb 25, 2013, at 7:37 AM, Nicole Ford wrote: hello, all. one of my students is having an issue with the pie legend function. this is her code. (below) it works just fine for me. her error is plot.new has not been called yet. i know this means her pie chart is coming up blank

[R] Parallel computation in R

2013-02-25 Thread Christofer Bogaso
Hello again, in the task view I see that Direct support in R is starting with release 2.14.0 which includes a new package parallel However I can not get any access to it. When I type ls('package:parallel'), I get following error: ls('package:parallel') Error in as.environment(pos) :

Re: [R] frequency table-visualization for complex categorical variables

2013-02-25 Thread Anthony Damico
in the future, please provide R code to re-create some example data :) read http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-examplefor more detail.. # create a data table with three unique columns' values.. # treat these values just like letters x - cbind(

Re: [R] Parallel computation in R

2013-02-25 Thread Peter Ehlers
On 2013-02-25 10:00, Christofer Bogaso wrote: Hello again, in the task view I see that Direct support in R is starting with release 2.14.0 which includes a new package parallel However I can not get any access to it. When I type ls('package:parallel'), I get following error:

Re: [R] frequency table-visualization for complex categorical variables

2013-02-25 Thread Rui Barradas
Hello, I disagree with the way you've sorted the matrix, like this all A's become first, then B's, etc, irrespective of the respondents. Each row is a respondent, and the rows should be kept intact, but with a different ordering. To this effect, use order(): z - y[order(y[,1], y[,2],

Re: [R] Combining boxplot

2013-02-25 Thread soon yi
does this work for you? df1 = data.frame(x = rnorm(100)) df1$type = ifelse(df1$x = 0 , type1, type2) df1$group-1 df2 = data.frame(x = rnorm(50,0,2)) df2$type = ifelse(df2$x = 0 , type1, type2) df2$group-2 combined.df-rbind(df1,df2) boxplot(combined.df$x ~ combined.df$group

Re: [R] legend issues.

2013-02-25 Thread David Winsemius
My point is that you _still_ have not adhered to the Posting Guide request for sessionInfo() ... I say again. Please read the Posting Guide ... AND PLEASE STOP posting formatted email. -- David. On Feb 25, 2013, at 10:20 AM, Nicole Ford wrote: I did look at ??pie ??graphics, as per my

Re: [R] lattice: column titles using xlab.top in multipanel xyplot

2013-02-25 Thread Duncan Mackay
Hi manuel Have a look at http://tolstoy.newcastle.edu.au/R/e2/help/07/05/17666.html Just plugging in your xlabs everything is OK for Deepayan's example xyplot(1:9 ~ 1:9 | gl(3, 1, 9), layout = c(3, 1), xlab = myXlabGrob('Trial number', 'Subject number',

[R] Multidimensional interpolation

2013-02-25 Thread Jeremy Beaulieu
Hi all~ I was wondering if there is an R package out there that can do multivariate interpolation. I conducted a simulation across an even grid and would like to now use this information to interpolate values for a single dependent variable using data measured from 10 or so variables. I've

[R] SEM and count data

2013-02-25 Thread Rick Cruz
Hi all- New to R, and I've managed to learn a bit about Lavaan package for SEM, and pscl package for analyzing count data. I would like to find a way to combine these analyses as I am hoping to run a model with a multi-trait, multi-reporter factor (2 reporters by 4 traits apiece, with one

Re: [R] legend issues.

2013-02-25 Thread Nicole Ford
I did look at ??pie ??graphics, as per my reply. which netted nothing of value. thanks. ~Nicole Ford Ph.D. student Graduate Assistant/ Instructor University of South Florida Government and International Affairs office: SOC 012M e: nmhi...@mail.usf.edu http://gia.usf.edu/student/nford/ On

[R] Argument dendro must have class hclust - cutreeDynamic error

2013-02-25 Thread Joanna Papakonstantinou
I am having difficulty getting the dynamic tree cut package to work. Given the data table myddtable LengthPlaceColorAge5HRed224ABlue205WGreen243GRed222GBlue236WGreen255ARed194H Blue23 I created a similarity matrix using DAISY and Gower metric and specified Place and Color columns as characters

Re: [R] compute p/t value from pearson r and n

2013-02-25 Thread Greg Snow
Or if David's answer seems like too much work you could use the `mvrnorm` function in the MASS package to generate 2 vectors with the given correlation and sample size and feed those vectors to the `cor.test` function. Or Pearson's test can be computed in 1 line of R code without needing any

Re: [R] lattice: column titles using xlab.top in multipanel xyplot

2013-02-25 Thread Peter Ehlers
On 2013-02-25 07:47, Manuel Kunz wrote: Hi, I created a xyplot with a three-column layout. As suggested by Deepayan I tried to put titles to each column by using xlab.top. Unfortunately, as my y-axis scale relation = free, the column titles are not centered at the three x axes anymore. Any

[R] Issue attaching a dataset

2013-02-25 Thread Pablo Menese
I use to work whit stata dataframe, so, when I use R I type read.dta Until today I do that without any problem, after type: mydata-read.dta(C:/dropbox/dataframe.dta) attach(mydata) Everything works great... but today, when I typed: mydata-read.dta(C:/dropbox/dataframe.dta) attach(mydata)

[R] Converting code to R Question

2013-02-25 Thread Craig J
I'm learning R and am converting some code from SPSS into R. My background is in SAS/SPSS so the vectorization is new to me and I'm trying to learn how to NOT use loops...or use them sparingly. I'm wondering what the most efficient to tackle a problem I'm working on is. Below is an example piece

Re: [R] Converting code to R Question

2013-02-25 Thread Jeremy Miles
Here's a direct translation: Variable - 0 Variable - ifelse(item1 == 1, Variable +1, Variable) Variable - ifelse(item2 == 1, Variable +1, Variable) Variable - ifelse(item3 == 1, Variable +1, Variable) Variable - ifelse(item4 == 1, Variable +1, Variable) Here's another way to do it: Variable

[R] Light Libraries

2013-02-25 Thread ivo welch
Dear R-Help group: I have been tinkering with how I want my personal standard library functions to look like. They are not designed to be professional and heavyweight, but lightweight. There are probably dozens of little bugs, because I don't know or have not properly taken care of a variety of

Re: [R] Converting code to R Question

2013-02-25 Thread William Dunlap
Note that in Variable - 0 + (item1 == 1) + (item2 == 1) + (item3 == 1) + (item4 == 1) the '0 +' is not needed, since adding logicals produces integers. Your second solution Variable - sum((item1 == 1), (item2 == 1) , (item3 == 1) , (item4 == 1), na.rm=TRUE) gives the wrong answer, since

Re: [R] Converting code to R Question

2013-02-25 Thread Ista Zahn
If you do this sort of thing a lot you may find the psych package helpful: # make example data x - 1:3 dat - data.frame(expand.grid(Item1=x, Item2=x, Item3=x, Item4=x)) # make scoring ky key - c(Item1=1, Item2=2, Item3=1, Item4=1) # load psych library library(psych) # score (scores -

[R] Assignment Operator in mclapply

2013-02-25 Thread Dario Strbenac
I sometimes need to return multiple items from a loop. Is it possible to have the - operator work the same for mclapply as for lapply ? extra - list() squares - mclapply(1:10, function(x){extra[[x]] - x; x^2;}) extra list() squares - lapply(1:10, function(x){extra[[x]] - x; x^2;}) extra

Re: [R] legend issues.

2013-02-25 Thread Nicole Ford
by the time your rude reply came ( you are often rude to people so i shouldn't have been surprised but somehow was) , i had already found my answer, by doing it MYSELF on her computer and found had not followed some simple instructions. be well. ~Nicole Ford Ph.D. student Graduate Assistant/

Re: [R] Assignment Operator in mclapply

2013-02-25 Thread Jeff Newmiller
Why do you equate using - with returning multiple items from a loop? There are valid reasons to use -, but the people who want to use it practically never have them. Just return a list of the items you want to return from within the function. squares - mclapply(1:10, function(x){result -