Re: [R] Adjusting Font Size: lattice / bwplot

2010-09-19 Thread David Winsemius
On Sep 20, 2010, at 12:43 AM, Michael Just wrote: Hello, If you run the following code with lattice installed: bwplot(voice.part ~ height, data=singer, xlab="Height (inches)") There will be some text in the graph e.g. Soprano 1, Soprano 2, etc - 60, 65, etc and the title: Height (Inches). Ho

Re: [R] Please help with this error - new to

2010-09-19 Thread Jeff Newmiller
You don't appear to have read the posting guide... you have not provided any sample data. From the error it appears that you have some problem with your data or your handling of the data when you imported it. "c.wri...@uq.edu.au" wrote: > >I am getting the following error in my script. I am v

[R] Adjusting Font Size: lattice / bwplot

2010-09-19 Thread Michael Just
Hello, If you run the following code with lattice installed: bwplot(voice.part ~ height, data=singer, xlab="Height (inches)") There will be some text in the graph e.g. Soprano 1, Soprano 2, etc - 60, 65, etc and the title: Height (Inches). How can one make the font for this text larger and/or bo

[R] Please help with this error - new to

2010-09-19 Thread c.wri...@uq.edu.au
I am getting the following error in my script. I am very very new to R and have obtained this script from another person. #read file in (dummy data) starburst.plot<-function(affy.fold, affy.FDR)(ifelse( ((affy.fold) >=0), -1*log10(affy.FDR), 1*log10(affy.FDR))) starburst.plot<-function(meth.fold

Re: [R] Converting tables to matrices

2010-09-19 Thread Michael Bedward
A good function to know about is names(). For example... ft <- fisher.test( my.data ) names(ft) Produces the following listing... [1] "p.value" "conf.int""estimate""null.value" "alternative" "method" "data.name" You can then access any of those attributes with the "$" operator

Re: [R] plotting convex hull for 3D

2010-09-19 Thread Ben Bolker
cassie jones gmail.com> writes: > I have a 3 dimensional data and I need to plot a convex hull to it. I have > done it for 2 dimensional case using chull command in R. But I think it does > not work for more than 2 dimension. > Can anyone help me with this? Is there anyway to plot the convex hull

Re: [R] Converting tables to matrices

2010-09-19 Thread selthy
Great! I'm loving this forum. I'm slowly teaching myself the basics of R, but in the meantime this is saving me a lot of time in the data analysis phase (I'm a molecular biologist). Thanks again! -- View this message in context: http://r.789695.n4.nabble.com/Converting-tables-to-matrices-tp25433

[R] invalid 'row.names' length error when running scatterplots or plot in R Commander

2010-09-19 Thread Samantha McKenzie
Hello, I teach statistics and use R Commander for teaching. I have 2 students out of 169 that can't get scatterplots or plot to work. I have had them update packages, restart R/R Commander/their computers and even reinstall R/R Commander. One is using Windows 7 on a new pc and the other is a pc use

Re: [R] working with eval and environments

2010-09-19 Thread Michael Bedward
Hello, Not sure if I understand your question correctly, but you if you want to assign a value to an object called train in the parent environment you can do this in your function... train <<- some.data Michael On 20 September 2010 01:10, darckeen wrote: > > I'm trying to get the following sec

Re: [R] Converting tables to matrices

2010-09-19 Thread Michael Bedward
Hi Luke, Easy-peasy... If you have... result <- fisher.test( some_data ) Then you can get the probability with... result$p.value So in your case just modify the apply statement in the previous post to... pvalues <- apply( x, 1, function(xrow) fisher.test( matrix(xrow, nrow=2) )$p.value ) Mi

Re: [R] Converting tables to matrices

2010-09-19 Thread selthy
Hi Michael, I have another simple question which I'm sure you could help me with. How do I extract only the p values from "result" (i.e. all of the p values from the i tests, preferably in a single column of data)? I've read over the fisher.test help (http://127.0.0.1:16311/library/stats/html/fis

Re: [R] Composing Music - R Package

2010-09-19 Thread C.H.
http://r-forge.r-project.org/projects/tuner/ On Mon, Sep 20, 2010 at 8:35 AM, Deb Midya wrote: > Hi R Users, > > Thanks in advance. > > I am using R-2.11.1 on Windows XP. > > May I request you to assist me for the following please. > > 1.   Is there any R-package or if any to compose music?

[R] Composing Music - R Package

2010-09-19 Thread Deb Midya
Hi R Users,   Thanks in advance.   I am using R-2.11.1 on Windows XP.   May I request you to assist me for the following please.   1.   Is there any R-package or if any to compose music?   2.   Is there any R-package or if any to analyse music?   Once again, thank you very much for the tim

Re: [R] Help with graphic margin

2010-09-19 Thread Filoche
I found what was the problem. Instead of using xpd = NA in par(..) I use it in the plot. With regards, Phil -- View this message in context: http://r.789695.n4.nabble.com/Help-with-graphic-margin-tp2542469p2546395.html Sent from the R help mailing list archive at Nabble.com. _

Re: [R] OT Gmane and r-help moderator approval

2010-09-19 Thread Duncan Murdoch
On 19/09/2010 5:23 AM, Graham Smith wrote: I have started to read r-help on Gmane using Thunderbird as a reader. Before that I had messages sent to gmail account. The first post through Gmane needed moderator approval, but then I got a message from Your friendly autoauthorizer at Gmane.org

[R] CRAN (and crantastic) updates this week

2010-09-19 Thread Crantastic
CRAN (and crantastic) updates this week New packages Updated packages CORElearn (0.9.30) This email provided as a service for the R community by http://crantastic.org. Like it? Hate it? Please let us know: crana...@gmail.com.

[R] boyplots nearly identical but still highly significant effect?

2010-09-19 Thread Jake Kami
dear list, i am running a within-design ANOVA with 4 factors (4,4,2 and 2 levels each). the last one is a time factor comprising two different treatment timepoints. i fit a mixed-effects model using lme and apply the anova function to the outcome. according to this analysis, there are highly signi

Re: [R] help interpreting a model summary

2010-09-19 Thread David Winsemius
On Sep 19, 2010, at 5:59 PM, zozio32 wrote: Thanks for you're long answer. I have to say, I am not fully sure of what you're meaning everywhere. As I said, I am merely following a recipe book, and when things depart from it I am a bit lost. I'll try to answer to each of your paragraphs:

Re: [R] Create Dot Chart

2010-09-19 Thread Dennis Murphy
Hi: It seems to me that num1 is a nested factor within ESHKOL_tert. With that in mind, I redefined the two terms to be factors and redid Josh's plot as follows: dat3 <- dat2 dat3 <- transform(dat3, num1 = factor(num1), ESHKOL_tert = factor(ESHKOL_tert)) ggplot(data = dat3, aes(x = value, y = num1

Re: [R] Create Dot Chart

2010-09-19 Thread avsha38
Hi Josh Wow, I greatly appreciate you taking the time to help out. It works excellent!!! I am just a beginner with R; thanks a lot for your books recommendation, I will be using them. If I may ask you, I have about 300 records in the full file and once I ran the code with the full file, The val

[R] plotting convex hull for 3D

2010-09-19 Thread cassie jones
Dear all, I have a 3 dimensional data and I need to plot a convex hull to it. I have done it for 2 dimensional case using chull command in R. But I think it does not work for more than 2 dimension. Can anyone help me with this? Is there anyway to plot the convex hull for more than 2 D case? Thank

Re: [R] help interpreting a model summary

2010-09-19 Thread zozio32
Actually, rereading trough my post, I think I understood a bit better now. I have now fit a much simpler to each part of the data, and things looks a bit easier to understand. for the part were reflection < break[xmin], i now have: Call: lm(formula = weightedDiff ~ angleNoise * reflection, data

Re: [R] odds ratios for n-way tables: seeking an *apply-able method

2010-09-19 Thread Dennis Murphy
Hi Michael: I'm not an expert on this topic, but I tried a few things and got something that *looks* right... The idea is to convert the 3D table to a data frame, split on Sex, use lapply to reconstruct the individual tables and then use lapply again to get the results. I'm sure there's a better

Re: [R] help interpreting a model summary

2010-09-19 Thread zozio32
Thanks for you're long answer. I have to say, I am not fully sure of what you're meaning everywhere. As I said, I am merely following a recipe book, and when things depart from it I am a bit lost. I'll try to answer to each of your paragraphs: 3: I was not wanting to include 3-way interactions,

Re: [R] help interpreting a model summary

2010-09-19 Thread David Winsemius
That parameter is the difference between the estimated parameter for the product of reflection and angleNoise in regions where reflection was < Break(xMin) compared with the same product's parameter in those regions of 3-space where reflection was not. In general it is at best merely specu

Re: [R] Formating a matrix in a exotic way

2010-09-19 Thread David Winsemius
On Sep 19, 2010, at 3:41 PM, Megh Dal wrote: Suppose I have following arbitrary matrix: set.seed(1) mat <- matrix(rnorm(6), 3, 2) mat [,1] [,2] [1,] -0.6264538 1.5952808 [2,] 0.1836433 0.3295078 [3,] -0.8356286 -0.8204684 Now I want to make a simple object like (character

Re: [R] Formating a matrix in a exotic way

2010-09-19 Thread Gabor Grothendieck
On Sun, Sep 19, 2010 at 4:23 PM, Gabor Grothendieck wrote: > On Sun, Sep 19, 2010 at 3:41 PM, Megh Dal wrote: >> Suppose I have following arbitrary matrix: >> >>> set.seed(1) >>> mat <- matrix(rnorm(6), 3, 2) >>> mat >>           [,1]       [,2] >> [1,] -0.6264538  1.5952808 >> [2,]  0.1836433  0

Re: [R] Formating a matrix in a exotic way

2010-09-19 Thread Gabor Grothendieck
On Sun, Sep 19, 2010 at 3:41 PM, Megh Dal wrote: > Suppose I have following arbitrary matrix: > >> set.seed(1) >> mat <- matrix(rnorm(6), 3, 2) >> mat >           [,1]       [,2] > [1,] -0.6264538  1.5952808 > [2,]  0.1836433  0.3295078 > [3,] -0.8356286 -0.8204684 > > Now I want to make a simple

[R] Formating a matrix in a exotic way

2010-09-19 Thread Megh Dal
Suppose I have following arbitrary matrix: > set.seed(1) > mat <- matrix(rnorm(6), 3, 2) > mat [,1] [,2] [1,] -0.6264538 1.5952808 [2,] 0.1836433 0.3295078 [3,] -0.8356286 -0.8204684 Now I want to make a simple object like (character type): "-0.6264538,1.5952808;0.1836433,0.3

Re: [R] Create Dot Chart

2010-09-19 Thread Joshua Wiley
Ahoy Avi, Sounds like you be wantin' a gander more explanation than 'til you get your Arrr legs. # Read in data # I chose to specify explicit classes because the ids and ESHKOL_tert # are really categorical data, so I made them factors # also your data was tab delimited, which I specified using t

[R] help interpreting a model summary

2010-09-19 Thread zozio32
Hello, I am all new here. Thanks for the job done, R really helped me in my thesis lately. However, I am kind of new in statistics, coming from mecanical engineering, and I mostly teached myself with "The R Book", so I may do silly things some time. PLease tell me if you think so. Anyway, I've ju

Re: [R] Help with graphic margin

2010-09-19 Thread Filoche
Thank you Greg. xpd=NA is working as intended. I got 1 more problem with thought. When I'm using xpd=NA, abline function plots all my regression lines outside the plot boxes. Any solutions for that strange behavior? With regards, -- View this message in context: http://r.789695.n4.nabble.com/

Re: [R] Create Dot Chart

2010-09-19 Thread David Winsemius
On Sep 19, 2010, at 1:49 PM, avsha38 wrote: Hi Josh, Great samples! Thanks a lot! I ran your code and saw the Dot Chart, looks like what I need. I would like to ask for your help with applying it to my file, coming from the Theoretical world making it tough for me to apply in the Code..

[R] [R-pkgs] WriteXLS - New Version 2.1.0

2010-09-19 Thread Marc Schwartz
On the heels of the major version update to version 2.0.1 this past week, another incremental update, version 2.1.0, has been submitted to CRAN and will propagate to mirrors over the next day or so. The package is maintained on R-Forge at http://r-forge.r-project.org/projects/writexls, where do

Re: [R] Create Dot Chart

2010-09-19 Thread avsha38
Hi Josh, Great samples! Thanks a lot! I ran your code and saw the Dot Chart, looks like what I need. I would like to ask for your help with applying it to my file, coming from the Theoretical world making it tough for me to apply in the Code.. attached below is part of my dataset num1 is I

Re: [R] Create Dot Chart

2010-09-19 Thread David Winsemius
On Sep 19, 2010, at 12:58 PM, avsha38 wrote: Hi Josh, Great samples! Thanks a lot! I ran your code and saw the Dot Chart, looks like what I need. I would like to ask for your help with applying it to my file, coming from the Theoretical world making it tough for me to apply in the Code..

[R] odds ratios for n-way tables: seeking an *apply-able method

2010-09-19 Thread Michael Friendly
I'm looking for a way to generalize the calculation of (log) odds ratios for 2 x 2 x {strata} frequency tables in vcd::oddsratio() to R x C x {strata} tables. For an R x C table, F, odds ratios can be defined in several ways; one simple way, particularly for tables with ordered factors, is to

Re: [R] Create Dot Chart

2010-09-19 Thread avsha38
Hi Josh, Great samples! Thanks a lot! I ran your code and saw the Dot Chart, looks like what I need. I would like to ask for your help with applying it to my file, coming from the Theoretical world making it tough for me to apply in the Code.. attached below is part of my dataset num1 is ID vari

[R] Recall: Weibull- Random Censoring

2010-09-19 Thread Halabi, Anan
Halabi, Anan would like to recall the message, "Weibull- Random Censoring". __ 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/posting-guide.html and provide commente

Re: [R] Weibull- Random Censoring

2010-09-19 Thread David Winsemius
On Sep 19, 2010, at 11:41 AM, Halabi, Anan wrote: I generate random vector from Weibull distribution sampWB <-urweibull(sampleSize, shape=shape.true, scale=scale.true, lb=0, ub=Inf) I suppose with the suitable package loaded from a library that had it installed, one could get reproducible

Re: [R] Data Cube in R from CSV

2010-09-19 Thread Ben Bolker
dajohnst ucdavis.edu> writes: > Why not use an array? > > An array can be indexed in as many dimensions as you would like, and do not > require any extra packages. > > x = array(1:27, dim = c(3, 3, 3)) > x > x[1, , ] > x[ , 1, ] > x[ , , 1] > An array is certainly the right structure to

Re: [R] Create Dot Chart

2010-09-19 Thread John Kane
?dotchart perhaps. --- On Sun, 9/19/10, avsha38 wrote: > From: avsha38 > Subject: [R] Create Dot Chart > To: r-help@r-project.org > Received: Sunday, September 19, 2010, 10:46 AM > > Hello everyone... > > I would like to create a chart (see below), how can I do it > with R? > > Any help, sug

Re: [R] Create Dot Chart

2010-09-19 Thread Joshua Wiley
Hi, Here are three examples for something along those lines. The first uses the package "lattice", 2 and 3 use "ggplot2". There are lots of options, and you can tweak and customize these to your hearts content. dat <- data.frame(group = factor(rep(0:1, each = 40), labels = c("Control", "Treatme

[R] Weibull- Random Censoring

2010-09-19 Thread Halabi, Anan
I generate random vector from Weibull distribution sampWB <-urweibull(sampleSize, shape=shape.true, scale=scale.true, lb=0, ub=Inf) how can I create subvector containing 30% of samplesize of sampWB which should be assigned as Censored data? The probability for each value in sampWB can be uniform

Re: [R] ergm crashes

2010-09-19 Thread Ben Bolker
Iasonas Lamprianou yahoo.com> writes: [snip] > But if I try to run a command with the parameter nodematch, > R crashes with no excuses and no error messages (I > use windows Vista and the latest R version and all packages are > fully updated). I use commands (and they > crash) like the followi

[R] working with eval and environments

2010-09-19 Thread darckeen
I'm trying to get the following section of code to work, I think the problem is being caused by the assignment of data to the lm function not evaluating to "train" in the parent environment but I can't seem to figure out how to do this. fitmodel <- function(trial,data) { wrap.lm <-

Re: [R] OT Gmane and r-help moderator approval

2010-09-19 Thread Graham Smith
Ted, The moderator approval is being applied by the R-help server (mailman) at ethz.ch, the home of R-help, not by Gmane. If you look at the headers of your latest message (the one to which I am replying) you will see the header: Thanks for the explanation. The message is "Posting by a non-me

Re: [R] one step just of cliff-- zero hessian matrix in optim, with reproducable code and data

2010-09-19 Thread Ravi Varadhan
You get NaNs in the standard error computations because the diagonal of inverse of hessian has a negative element. This could be due to 2 reasons: (1) your hessian is truly indefinite (some negative eigenvalues), or (2) the hessian computation in optim is not sufficiently accurate. I have ru

[R] Create Dot Chart

2010-09-19 Thread avsha38
Hello everyone... I would like to create a chart (see below), how can I do it with R? Any help, suggestion, samples... will be greatly appreciated. Thanks... Avi http://r.789695.n4.nabble.com/file/n2545921/DotChart.jpg -- View this message in context: http://r.789695.n4.nabble.com/Create-Do

Re: [R] OT Gmane and r-help moderator approval

2010-09-19 Thread Ted Harding
On 19-Sep-10 09:23:45, Graham Smith wrote: > I have started to read r-help on Gmane using Thunderbird as a reader. > Before that I had messages sent to gmail account. > > The first post through Gmane needed moderator approval, but then I > got a message from > > Your friendly autoauthorizer at G

Re: [R] get time as a number

2010-09-19 Thread Gabor Grothendieck
On Sun, Sep 19, 2010 at 9:19 AM, Hyunchul Kim wrote: > Hi, all, > > How to get a time as a number? > > While script is running, I want to print the elapsed time > > something like TIME_AS_SECOND() in the following script > > inittime <- TIME_AS_SECOND() > for (i in 1:100){ >    do_something(i) >  

Re: [R] get time as a number

2010-09-19 Thread Dimitris Rizopoulos
probably you want to use proc.time() -- have a look at the corresponding help file. I hope it helps. Best, Dimitris On 9/19/2010 3:19 PM, Hyunchul Kim wrote: Hi, all, How to get a time as a number? While script is running, I want to print the elapsed time something like TIME_AS_SECOND()

[R] OT Gmane and r-help moderator approval

2010-09-19 Thread Graham Smith
I have started to read r-help on Gmane using Thunderbird as a reader. Before that I had messages sent to gmail account. The first post through Gmane needed moderator approval, but then I got a message from Your friendly autoauthorizer at Gmane.org saying You are now authorized to post to th

Re: [R] Preparing data frame for Plotrix kiteChart

2010-09-19 Thread Graham Smith
Jim, Ben's solution is excellent, I just thought I would add an alternative starting with the X dataframe: x2<-matrix(X$Count,ncol=3) rownames(x2)<-unique(X$Distance) colnames(x2)<-unique(X$Species) kiteChart(t(X3),xlab="Distance",ylab="Species") Thanks, very useful to see an alternative appr

[R] get time as a number

2010-09-19 Thread Hyunchul Kim
Hi, all, How to get a time as a number? While script is running, I want to print the elapsed time something like TIME_AS_SECOND() in the following script inittime <- TIME_AS_SECOND() for (i in 1:100){ do_something(i) curtime <- TIME_AS_SECOND() elapsedtime <- curtime-inittime pr

[R] ergm crashes

2010-09-19 Thread Iasonas Lamprianou
Dear all, I am doing a social network analysis using ergm. I import a rectangular matrix of data and then I build a network using the following command: ng <-network(mat,directed=FALSE) I then attach vertex names using commands like this: set.vertex.attribute(ng,"SchoolType",mSchType) where Sc

Re: [R] Date issues

2010-09-19 Thread Gabor Grothendieck
On Sun, Sep 19, 2010 at 1:31 AM, Santosh Srinivas wrote: > I tried this and it works too (For most part) strangely for certain > dates (20090831) it is giving NA ... > >> FnO_Data$Date[m:l] >  [1] 20090828 20090828 20090828 20090828 20090828 20090828 20090828 20090828 > 20090828 20090828 2009

Re: [R] Problem with "list"

2010-09-19 Thread Peter Ehlers
On 2010-09-19 4:21, Christofer Bogaso wrote: Dear all, I have following list object: dat<- vector("list", length=4) for(i in 1:4) dat[[i]]<- diag(rnorm(5)^2) names(dat)<- paste("A", 1:4, sep="") It is ok upto this point. However if I want apply, suppose chol() function on any of it's element, I

Re: [R] contr.sum, model summaries and `missing' information

2010-09-19 Thread Christophe Rhodes
Christophe Rhodes writes: > I have a dataset with a response variable and multiple factors with more > than two levels, which I have been fitting using lm() or glm(). In > these fits, I am generally more interested in deviations from the global > mean than I am in comparing to a "control" group,

[R] Problem with "list"

2010-09-19 Thread Christofer Bogaso
Dear all, I have following list object: dat <- vector("list", length=4) for(i in 1:4) dat[[i]] <- diag(rnorm(5)^2) names(dat) <- paste("A", 1:4, sep="") It is ok upto this point. However if I want apply, suppose chol() function on any of it's element, I am getting error: > chol(dat['A1']) Error

Re: [R] Arrrr.

2010-09-19 Thread Jim Lemon
On 09/19/2010 02:36 PM, Thomas Lumley wrote: Ahoy maties, As I'm sure everyone is aware, today (ISOdate(2010,9,19)) is International Talk Like A Pirate Day. I hope Arrr-help and Arrr-devel, and the whole of the Arrr community will be observing the day properly. We have been out in our PiR

Re: [R] class "matrix" lost when extracting a row from matrix

2010-09-19 Thread Tobias Verbeke
On 09/19/2010 10:02 AM, h...@wiseadvice.eu wrote: Good morning experts! situation: class(myMatrix)="matrix" class(myMatrix[(1:2),]))="matrix" class(myMatrix[1,])= "character" consequences are far reaching as, for instance colnames(myMatrix[(1:2),]) != colnames(myMatrix[1,]) or names(myMatrix[

[R] class "matrix" lost when extracting a row from matrix

2010-09-19 Thread h...@wiseadvice.eu
Good morning experts! situation: class(myMatrix)="matrix" class(myMatrix[(1:2),]))="matrix" class(myMatrix[1,])= "character" consequences are far reaching as, for instance colnames(myMatrix[(1:2),]) != colnames(myMatrix[1,]) or names(myMatrix[(1:2),]) != names(myMatrix[1,]) My question: 1.