Re: [R] OT Sorta: Odds Are, It's Wrong...

2010-03-15 Thread Berwin A Turlach
G'day all, On Mon, 15 Mar 2010 12:46:42 -0500 Marc Schwartz wrote: > In turn, that reminds me of Stephen Senn's writing in Dicing with > Death: Chance, Risk and Health: > > "We can predict nothing with certainty but we can predict how > uncertain our predictions will be, on average that is." A

Re: [R] R on Linux - a primer

2010-03-15 Thread Jim Lemon
On Sun, 14 Mar 2010, Jonathan Baron wrote: > Just to make this thoroughly confusing, > I will say that I am very happy with Fedora I can second that, as I have found Fedora (and before that, RedHat) plus KDE to create less response interference for those of us who use Windows. Not by choice, b

Re: [R] OT Sorta: Odds Are, It's Wrong...

2010-03-15 Thread Jim Lemon
On 03/16/2010 03:22 AM, Marc Schwartz wrote: Hi all, I thought that readers of R-Help might find the following article at ScienceNews of interest: Odds Are, It's Wrong Science fails to face the shortcomings of statistics By Tom Siegfried March 27th, 2010; Vol.177 #7 (p. 26) http

Re: [R] Frequencies from a matrix - spider from frequencies

2010-03-15 Thread Jim Lemon
On 03/16/2010 02:43 AM, Uwe Dippel wrote: ... Thanks, Jim, this one works (with your random data)! (In case anyone reads and wants this as well, package plotrix provides radial.plot.) The overlap is normal, because it's random data. When the respondents have a less random streak of answering (an

Re: [R] Correlation coefficient of large data sets

2010-03-15 Thread Joshua Wiley
I think what you have done should be fine. read.table() will return a data frame, which cor() can handle happily. For example: my.data <- read.table("file.csv", header = TRUE, row.names = 1, sep=",", strip.white = TRUE) # assign your data to "my.data" cor(my.data) # calculate the correlation ma

[R] Including entire dataframe in svyglm formula

2010-03-15 Thread cerman
Hello! I am attempting to use svyglm {survey package} with a large set of predictors and would like to be able to automatically use all the variables in my data as the predictors without having to type out their names explicitly, similar to the way one can do: x1=c(1,2,3,4) x2=c(3,5,4,1) y = x1

Re: [R] Correlation coefficient of large data sets

2010-03-15 Thread Vincent Davis
> > If you read each of your 230,000 variables in separately, you can > combine them into a matrix or dataframe using cbind(variablename1, 2, > etc.). > > HTH, I used read.table("file.csv", header = TRUE, row.names = 1, sep=",", strip.white = TRUE) to read it in but I could easily only read in th

Re: [R] Correlation coefficient of large data sets

2010-03-15 Thread Joshua Wiley
Hello Vincent, The command to correlate two variables and a set is the same (see ?cor). How have you read the data in? If it is a matrix or data frame, you should be able to just use cor(name_of_your_matrix) and it will return the correlation matrix for all variables in your matrix or data frame

Re: [R] labels gone

2010-03-15 Thread milton ruser
Hi Zhongyi, I must confess I not understood completely what you need, but... Tau<-seq(0.05,0.95,0.05); Pi <- seq(0.19,0.01,-0.01); par(cex.axis=0.8,ps=9,mar=c(1.5,1,0.5,1), oma=c(1,1,0.2,1) ,tck=-0.01); plot(Tau,Pi, type='l', xlab="Tau",ylab="Pi",col=4, xaxt="n", yaxt="n"); axis(1,labels=F) axis(

[R] Correlation coefficient of large data sets

2010-03-15 Thread Vincent Davis
So I am very new to R. Have been using python for a project and need to calculate the correlation coefficient matrix for my data set. the data is in the range of 10-15 observations of 230,000 variables. ie the correlation matrix would be 230,000X230,000 Using python and the numpy.corrcoef() I run

[R] labels gone

2010-03-15 Thread Zhongyi Yuan
Dear R users: I am drawing a graph with the following code: Tau<-seq(0.05,0.95,0.05); Pi <- seq(0.19,0.01,-0.01); par(cex.axis=0.8,ps=9,mar=c(1.5,1,0.5,1), oma=c(1,1,0.2,1) ,tck=-0.01); plot(Tau,Pi, type='l', xlab="Tau",ylab="Pi",col=4); I want to make the graph take as little space as possible.

[R] Regarding variable importance in the randomForest package

2010-03-15 Thread Corinne Staley
For anyone who is knowledgeable about the randomForest package in R, I have a question: When I look at the variable importance for data, I see that my response variable is included along with my predictor variables. That is, I am getting a MeanDecreaseGini for my response variable, and therefore i

[R] evaluating multivariate time series

2010-03-15 Thread Erin Hodgess
Dear R People: Here are some steps for the "simulate" from the dse package: mod1 <- ARMA(A=array(c(1,-.25,-.05), c(3,1,1)), B=array(1,c(1,1,1))) AR <- array(c(1, .5, .3, 0, .2, .1, 0, .2, .05, 1, .5, .3) ,c(3,2,2)) VAR <- ARMA(A=AR, B=diag(1,2)) print(VAR) simData <- simulate(

Re: [R] Package documentation in dissertation

2010-03-15 Thread statmobile
Hey Gabor, Thanks, I tried that, although I can't compile it directly. Do you know where I can get the R LaTeX definitions in order to compile that? Thanks! Gabor Grothendieck wrote: Try: R CMD Rdconv --type=latex myfile.Rd On Mon, Mar 15, 2010 at 8:46 PM, statmobile wrote: Hey Everyon

Re: [R] Package documentation in dissertation

2010-03-15 Thread Gabor Grothendieck
Try: R CMD Rdconv --type=latex myfile.Rd On Mon, Mar 15, 2010 at 8:46 PM, statmobile wrote: > Hey Everyone, > > I wrote up a library for my dissertation work, and I'd love to include it as > an appendix.  I have found ways to export the Rd files as html, txt and > pdf/ps, but not a raw tex expo

Re: [R] Package documentation in dissertation

2010-03-15 Thread statmobile
The closest I can get to the compiled LaTeX pdf version as possible as an appendix. Is there a way to get the raw LaTeX code from the package documentation, as well as the configuration/commands for compiling them? stephen sefick wrote: What would you like to do? Is it not the code that you

Re: [R] Package documentation in dissertation

2010-03-15 Thread RICHARD M. HEIBERGER
I have several responses, not necessarily consistent with each other. 1. An appendix should be a user manual with screen shots. 2. The archival version of the package should be Yourpackage_x.y-z.tar.gz stored at your university's archival web location. The actual usable version of your package w

Re: [R] RGtk2:::gdkColorToString throws an error

2010-03-15 Thread Wincent
Thanks, both of you. Regards Ronggui 2010/3/13 Uwe Ligges : > > > On 13.03.2010 14:00, Michael Lawrence wrote: >> >> Actually, the problem is more likely that RGtk2 is not built against GTK+ >> 2.12 on Windows. I assume you're using an up-to-date version of R. I'll >> ask >> Uwe about getting a n

Re: [R] A complex case of distribution fitting

2010-03-15 Thread GlenB
Are you referring to a truncated normal? (http://en.wikipedia.org/wiki/Truncated_normal_distribution) Glen -- View this message in context: http://n4.nabble.com/A-complex-case-of-distribution-fitting-tp1593273p1594311.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] Package documentation in dissertation

2010-03-15 Thread stephen sefick
What would you like to do? Is it not the code that you would like to include in your dissertation? Stephen On Mon, Mar 15, 2010 at 7:46 PM, statmobile wrote: > Hey Everyone, > > I wrote up a library for my dissertation work, and I'd love to include it as > an appendix.  I have found ways to exp

Re: [R] Error in -class : invalid argument to unary operator

2010-03-15 Thread rwmccauley
I was having a similar problem, then found that a previous format statement had changed the column with the dash in front of it to a string. I changed the column back into floats, and the dash worked fine, no longer giving me a unary operator error. -- View this message in context: http://n4.nab

Re: [R] Form using R

2010-03-15 Thread Nilza BARROS
I really appreciate the advices and suggestions. But Gail`s information about google docs it`s exactly what I need. It`s amazing. Thank you very much indeed. Nilza Baroros On Sun, Mar 14, 2010 at 9:33 PM, Farrel Buchinsky wrote: > Tal Galili gmail.com> writes: > > > > > Hi Nilza, > > I just wr

[R] Package documentation in dissertation

2010-03-15 Thread statmobile
Hey Everyone, I wrote up a library for my dissertation work, and I'd love to include it as an appendix. I have found ways to export the Rd files as html, txt and pdf/ps, but not a raw tex export. I've had to resort to dumping it into text files, and just using verbatim in my LaTeX code. Doe

[R] binary response: from p_hat to 0, 1

2010-03-15 Thread noclue_
I am using PROC LOGISTIC to model binary outcomes. I have observed Y (1 or 0) from original data. I also have got predicted probability for each observation (i.e. predicted probability of event Y=1) from PROC LOGISTIC. Let us call it - p_hat. for example, I would have two columns - Y p_hat

[R] kknn and logistic regression: how to cross-validate binary prediction

2010-03-15 Thread noclue_
I am comparing kknn and logistic regression for binary outcome prediction - For kknn, I can do - kknn_<-kknn(out_come ~ age + gender , learn_, valid_) fit<-fitted(kknn_) table(valid_$out_come, fit) to get validation results in cross-tabulation. - For logistic, how can I do the equival

[R] Dimnames of array inside loop

2010-03-15 Thread Márcio Resende
hello R-helpers, I have an array acuracia <- array(NA, dim = c(1, 1, A, B, C)) which is first defined and in the example above with dimensions 1x1xAxBxC. My array is then filled using 3 loops (I am not well familiar yet with lapply or sapply functions so I am still a loop-user): for (i in 1:A)

Re: [R] R example code of Split-plot Manova

2010-03-15 Thread John Fox
Dear Xiang Gao, See the OBrienKaiser example in ?Anova in the car package. I hope this helps, John John Fox Senator William McMaster Professor of Social Statistics Department of Sociology McMaster University Hamilton, Ontario, Canada web: socserv.mcmaster.ca/

Re: [R] Multiple comparisons for a two-factor ANCOVA

2010-03-15 Thread RICHARD M. HEIBERGER
In addtition to the example I mentioned previously, demo("MMC.WoodEnergy-aov", "HH") Please also see demo("MMC.WoodEnergy", "HH") In this example, since anova(energy.aov.4), shows that the Wood factor and Stove:Wood interaction are significant, all possible pairwise comparisons of the 12 Stove:Wo

Re: [R] [R-SIG-Mac] How to interrupt an R process that hangs

2010-03-15 Thread Ted Harding
On 15-Mar-10 21:10:03, Matthew Keller wrote: > Hi all, > Thanks for the responses. Ted - thank you for your help. I had > to laugh. I'm no computer guru, but I do know unix well enough > to know not to type "". But then again, my original code > did contain a matrix with >>2^31-1 elements, so maybe

Re: [R] Aggregate and select mode

2010-03-15 Thread Gabor Grothendieck
This gives the first mode in each group: # test data xx <- structure(list(v1 = c(1, 1, 1, 2, 2, 2, 3, 3, 3, 1), v2 = structure(c(1L, 2L, 2L, 2L, 4L, 4L, 3L, 3L, 5L, 1L), .Label = c("A", "B", "D", "W", "Z"), class = "factor")), .Names = c("v1", "v2"), row.names = c(NA, 10L), class = "data.f

Re: [R] [R-SIG-Mac] How to interrupt an R process that hangs

2010-03-15 Thread Simon Urbanek
On Mar 15, 2010, at 17:10 , Matthew Keller wrote: Hi all, Thanks for the responses. Ted - thank you for your help. I had to laugh. I'm no computer guru, but I do know unix well enough to know not to type "". But then again, my original code did contain a matrix with >>2^31-1 elements, so maybe

Re: [R] XML: Slower parsing over time with htmlTreeParse()

2010-03-15 Thread Yihui Xie
So you are parsing a *URL* instead of a local HTML file? I guess it might have something to do with your internet connection as well as the web server for that URL (some servers may restrict your access if you visit it too frequently). Can you provide a reproducible example? Regards, Yihui -- Yihu

Re: [R] [R-SIG-Mac] How to interrupt an R process that hangs

2010-03-15 Thread Matthew Keller
Hi all, Thanks for the responses. Ted - thank you for your help. I had to laugh. I'm no computer guru, but I do know unix well enough to know not to type "". But then again, my original code did contain a matrix with >>2^31-1 elements, so maybe your assumption was reasonable ;) Anyway, all your k

Re: [R] [R-SIG-Mac] How to interrupt an R process that hangs

2010-03-15 Thread Simon Urbanek
On Mar 15, 2010, at 16:20 , Matthew Keller wrote: Hi all, Thanks Simon and Duncan for the help. Sorry to be dense, but I'm still unsure how to interrupt such processes. Here's an example: for (i in 1:10){ a <- matrix(rnorm(10*10),ncol=10) b <- svd(a) } If you

Re: [R] [R-SIG-Mac] How to interrupt an R process that hangs

2010-03-15 Thread Ted Harding
[Though I'm not using a Mac, OS X is a Unix variant and should have the commands used below installed] Did you *literally* do kill -s INT without substituting the R PID for " Hi all, > > Thanks Simon and Duncan for the help. Sorry to be dense, but I'm still > unsure how to interrupt such proce

Re: [R] Error in library(eda) : there is no package called 'eda'

2010-03-15 Thread Phil Spector
Peter - While the message hasn't been shown in more recent versions of R, older (< 2.9) versions of R used to print the following: library(eda) Warning message: package 'eda' has been merged into 'stats' So I would guess the functions you're looking for are now automatically loaded when you

[R] R example code of Split-plot Manova

2010-03-15 Thread Xiang Gao
Hi, Urgent help- I have not been using R and statistics in my research for a long time, but still remember some concept. I would like to have a sample code for Manova analysis of Split-plot experiment. Could someone please post a sample code and a short input sample as well? Thank you so much!

[R] Error in library(eda) : there is no package called 'eda'

2010-03-15 Thread Peter Lauren
I am using RGui version 2.10.1 (2009-12-14) for Windows.  When I enter the call   library(eda)   the following message ensues.   Error in library(eda) : there is no package called 'eda'   I thought that eda was a standard library for exploratory data analysis.  However I could not find it in the l

Re: [R] [R-SIG-Mac] How to interrupt an R process that hangs

2010-03-15 Thread Matthew Keller
Hi all, Thanks Simon and Duncan for the help. Sorry to be dense, but I'm still unsure how to interrupt such processes. Here's an example: for (i in 1:10){ a <- matrix(rnorm(10*10),ncol=10) b <- svd(a) } If you run this, R will hang (i.e., it's a legitimate exe

[R] Help with calculating entropy of data

2010-03-15 Thread mnstn
Hello All, My question is not directly related to R but rather on which statistical method I should look in to for capturing the entropy of a data-set as a number. In this figure http://www.twitpic.com/18sob5 are two data sets blue and green (x-axis is time) that fluctuate between (-1,+1). Clearly

[R] Fw: assign colnames to data

2010-03-15 Thread Xumin Zeng
Patrick, Thanks. I tried colnames, but it doesn't work. Seems more transformation is needed. But now I got names, that's good enough. Best. Xumin Patrick Burns 03/15/2010 04:04 PM To Xumin Zeng cc Subject Re: [R] assign colnames to data Those are names, not colnames. See the 'Mo

Re: [R] R on Linux - a primer

2010-03-15 Thread Joseph Magagnoli
I would have to agree with Mike Miller. As a novice to both R and Linux I choose to use Ubuntu. The substantial amount of help guides and forums really made the transition easier and will save some frustration. Once you get used to linux you can always try a different distribution later, if you

Re: [R] assign colnames to data

2010-03-15 Thread Xumin Zeng
Thanks, it works. Xumin Henrique Dallazuanna 03/15/2010 03:57 PM To Xumin Zeng cc r-help@r-project.org Subject Re: [R] assign colnames to data Try: names(a) <- b On Mon, Mar 15, 2010 at 4:55 PM, Xumin Zeng wrote: > Hi, > > Do you know how to assign colnames from one list to anoth

Re: [R] assign colnames to data

2010-03-15 Thread Henrique Dallazuanna
Try: names(a) <- b On Mon, Mar 15, 2010 at 4:55 PM, Xumin Zeng wrote: > Hi, > > Do you know how to assign colnames from one list to another, for example. > a=c(1,2,3) > b=c("A","B","C") > > how can I get the dataset > > A B C > 1  2 3 > > where A, B and C are colnames. Thanks. > > Xumin > >    

[R] assign colnames to data

2010-03-15 Thread Xumin Zeng
Hi, Do you know how to assign colnames from one list to another, for example. a=c(1,2,3) b=c("A","B","C") how can I get the dataset A B C 1 2 3 where A, B and C are colnames. Thanks. Xumin [[alternative HTML version deleted]] __ R-help@r-p

[R] Cumulative normal distr

2010-03-15 Thread Антон Морковин
Hi, How to fit data to cumulative normal distribution? I tried such way: library(MASS) ed<-c(1:10) cnd<-function(mn,sdd){pnorm(c(1:10),mn,sdd)} fitdistr(ed,cnd,start=list(mn=mean(ed),sdd=sd(ed))) .but an error occured: Error in solve.default(res$hessian) : function Lapack 'dgesv': system are

[R] (no subject)

2010-03-15 Thread Антон Морковин
Hi, How to fit data to cumulative normal distribution? I tried such way: library(MASS) ed<-c(1:10) cnd<-function(mn,sdd){pnorm(c(1:10),mn,sdd)} fitdistr(ed,cnd,start=list(mn=mean(ed),sdd=sd(ed))) .but an error occured: Error in solve.default(res$hessian) : function Lapack 'dgesv': system are

[R] (no subject)

2010-03-15 Thread Антон Морковин
-- Отправлено из мобильной Яндекс.Почты: http://m.ya.ru/ymail __ 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 commented, minimal

[R] (no subject)

2010-03-15 Thread Антон Морковин
-- Отправлено из мобильной Яндекс.Почты: http://m.ya.ru/ymail __ 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 commented, minimal

Re: [R] R on Linux - a primer

2010-03-15 Thread Mike Miller
On Sun, 14 Mar 2010, Jonathan Baron wrote: Just to make this thoroughly confusing, I will say that I am very happy with Fedora Just to make this less confusing: choose Ubuntu. I say this because it is easy to use, has great repositories and it is the most popular Linux distro, so it should

[R] Cut-aways with contour3d

2010-03-15 Thread Waichler, Scott R
Luke, Thanks for your previous advice on using misc3d; I've been able to get a good start with it. Most of my colleagues use Tecplot for graphing and are wondering if I can make "cut-aways" using R. An example is attached. The idea is show a 3D isosurface of one property together with a 2D c

Re: [R] gaps in time series

2010-03-15 Thread Gabor Grothendieck
There is a new FAQ #13 in the zoo-faq vignette in the development version of the zoo package which illustrates several approaches to this (all of which work in the current version of zoo as well). See: http://pages.citebite.com/l2m2b3i4k5fnv On Mon, Mar 15, 2010 at 1:02 PM, Joe Calderon wrote:

Re: [R] [R-SIG-Mac] How to interrupt an R process that hangs

2010-03-15 Thread Simon Urbanek
On Mar 15, 2010, at 14:42 , Adam D. I. Kramer wrote: +1--this is the single most-annoying issue with R that I know of. My usual solution, after accomplishing nothing as R spins idly for a couple hours, is to kill the process and lose any un-saved work. save.history() is my friend, but is

Re: [R] Assigning a sequence to a subsetted data frame variable

2010-03-15 Thread jim holtman
try this: > x <- data.frame(day=rep(1:10, each=4), site=rep(sample(101:104, 10, TRUE), each=4)) > s.f <- function(start){ + start <- start[1] + 0:3 # generate the sequence + ifelse(start > 104, start - 4, start) + } > x$siteNew <- ave(x$site, x$day, FUN=s.f) > x day site siteNew 11

Re: [R] rbind, data.frame, classes

2010-03-15 Thread Rob Forler
a hah, that works :) simple but sweet, thanks, Rob On Mon, Mar 15, 2010 at 1:59 PM, Henrique Dallazuanna wrote: > Try this: > > do.call(rbind, lapply(list(list1, list2), as.data.frame)) > > On Mon, Mar 15, 2010 at 3:42 PM, Rob Forler wrote: > > Hi, > > > > This has bugged me for a bit. First

[R] map2poly - map lat/long cannot be unconstrained?

2010-03-15 Thread Euan Reavie
Using the maptools function "map2poly" I have created a map/polylist object - a map of the Great Lakes. My goal is to passively plot additional data on this map. Unfortunately I am not able to change (distort) the relative scale of the axes for the map, and so the sample points do not line up corre

Re: [R] [R-SIG-Mac] How to interrupt an R process that hangs

2010-03-15 Thread Duncan Murdoch
On 15/03/2010 2:42 PM, Adam D. I. Kramer wrote: +1--this is the single most-annoying issue with R that I know of. My usual solution, after accomplishing nothing as R spins idly for a couple hours, is to kill the process and lose any un-saved work. save.history() is my friend, but is a big delay

Re: [R] problem in reading trajectory file

2010-03-15 Thread Phil Spector
Arnaud - A reproducible example would be nice, but something like this might work, assuming your data is in a file called 'traj.txt': dat = readLines('traj.txt') triallines = grep('trial',dat) starts = triallines + 2 ends = c(triallines[-1] - 1,length(dat)) thetrials = sub('# *trial *(\\d+)

Re: [R] rbind, data.frame, classes

2010-03-15 Thread Henrique Dallazuanna
Try this: do.call(rbind, lapply(list(list1, list2), as.data.frame)) On Mon, Mar 15, 2010 at 3:42 PM, Rob Forler wrote: > Hi, > > This has bugged me for a bit. First question is how to keep classes with > rbind, and second question is how to properly return vecotrs instead of > lists after turnin

Re: [R] [R-SIG-Mac] How to interrupt an R process that hangs

2010-03-15 Thread Adam D. I. Kramer
+1--this is the single most-annoying issue with R that I know of. My usual solution, after accomplishing nothing as R spins idly for a couple hours, is to kill the process and lose any un-saved work. save.history() is my friend, but is a big delay when you work with big data sets as I do, so I d

[R] rbind, data.frame, classes

2010-03-15 Thread Rob Forler
Hi, This has bugged me for a bit. First question is how to keep classes with rbind, and second question is how to properly return vecotrs instead of lists after turning an rbind of lists into a data.frame list1=list(a=2, b=as.Date("20090102", format="%Y%m%d")) list2=list(a=2, b=as.Date("20090102"

[R] Eliminate border in wireframe plot

2010-03-15 Thread Waichler, Scott R
How can I eliminate the border drawn by default around a wireframe plot? I've tried using border=NA and box=FALSE to no avail. Scott Waichler Pacific Northwest National Laboratory scott.waich...@pnl.gov __ R-help@r-project.org mailing list https://s

[R] problem in reading trajectory file

2010-03-15 Thread arnaud chozo
Hi, I'm trying to read some trajectory files (text files) which have the form: # trial n # t X Y 0 1 2 0.2 1 3 0.41.2 4 ... # trial n+1 # t X Y 0 1 2 0.2 1.3 3.3 0.4 1.5 5 ... ... where the symbol # means that the

Re: [R] OT Sorta: Odds Are, It's Wrong...

2010-03-15 Thread JLucke
Which in turn reminds me of Box & Tiao's line "Since small differences in probability cannot be appreciated by the human mind, there seems little point in being excessively precise about uncertainty." Box, G. E. P. & Tiao, G. C. (1973), Bayesian inference in statistical analysis, Addison-Wesle

[R] question regarding variance function in gls

2010-03-15 Thread Yu, Xuesong
Dear R-help members, I have a question regarding how to use varComb function to specify a variance function for the "weights" in the gls. I need to fit a linear model with heteroscedasticity. The variance function is exp(c0+nu0*W +nu1*W^2) where W is a covariate. Initially I want to use varFu

Re: [R] Multiple comparisons for a two-factor ANCOVA

2010-03-15 Thread Eric Scott
Thanks for the example, but I'm still not sure from this example how to see the pairwise comparisons for the interaction. For example, if I have two factors, X and Y; and X has 2 levels, A and B, and Y has 3 levels, 1, 2, and 3, a TukeyHSD would give the following comparisons with p-values for eac

Re: [R] Resizing Graphic Device Windows

2010-03-15 Thread Sarah Goslee
Normally the command to create the device allows you to specify parameters like width and height. pdf() has width, height and paper arguments. Other than that, I'm not certain what you mean by: "without having to manually tinker with it to show everything in terms of tick marks and x/y lims that y

[R] Resizing Graphic Device Windows

2010-03-15 Thread Kindra Martinenko
Hi all, I have been struggling with this one. When creating graphic devices, how do you go about resizing the output device window automatically without having to manually tinker with it to show everything in terms of tick marks and x/y lims that you specify? I have tried the aspect="" function,

Re: [R] Stacking matrices

2010-03-15 Thread Chuck Cleland
On 3/15/2010 1:37 PM, jlu...@ria.buffalo.edu wrote: > What is an easy way to stack a matrix multiple times? E.g. I have a 6x6 > matrix that I need to stack vertically 154 times to get a 6*154 by 6 > matrix. I would rather not rbind(X,X,...,X) matrices.--Joe X <- matrix(runif(36), ncol=6)

Re: [R] OT Sorta: Odds Are, It's Wrong...

2010-03-15 Thread Marc Schwartz
On Mar 15, 2010, at 12:21 PM, Ted Harding wrote: > On 15-Mar-10 16:22:13, Marc Schwartz wrote: >> Hi all, >> I thought that readers of R-Help might find the following article at >> ScienceNews of interest: >> >> Odds Are, It's Wrong >> Science fails to face the shortcomings of statistics >> By

[R] Aggregate and select mode

2010-03-15 Thread Gabriel Yospin
Greetings Everyone - I have a data frame "x" that looks like this: v1 v2 1 A 1 B 1 B 2 B 2 W 2 W 3 D 3 D 3 Z What I would like to do is create a new data frame, "y", that has one row for each unique value of v1, and returns the corresponding mode of v2. If

[R] testing hipotheses using GAMLSS package

2010-03-15 Thread Gustavo Pereira
Hi all. In a GLM in which g(mu) = b0 + b1X1 + b2X2 + b3X3 + b4X4 + b5X5 + b6X6 + b7X7, if I want to test if b1 + b5 = b2 + b6, I can use the contrast package or multicomp package. How can I do a similar test if I am fitting a GAMLSS using the gamlss package? Thank you for your help. Gustavo

Re: [R] Frequencies from a matrix - spider from frequencies

2010-03-15 Thread William Dunlap
> -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Uwe Dippel > Sent: Monday, March 15, 2010 8:27 AM > To: Dennis Murphy > Cc: r-help@r-project.org > Subject: Re: [R] Frequencies from a matrix - spider from frequencies > > Denni

Re: [R] Stacking matrices

2010-03-15 Thread Benilton Carvalho
how about y = X[rep(1:nrow(X), 6), ] ? On Mon, Mar 15, 2010 at 5:37 PM, wrote: > What is an easy way to stack a matrix multiple times?  E.g.  I have a 6x6 > matrix that I need to stack vertically 154 times to get a 6*154 by 6 > matrix.  I would rather not rbind(X,X,...,X) matrices.    --Joe >

[R] Stacking matrices

2010-03-15 Thread JLucke
What is an easy way to stack a matrix multiple times? E.g. I have a 6x6 matrix that I need to stack vertically 154 times to get a 6*154 by 6 matrix. I would rather not rbind(X,X,...,X) matrices.--Joe [[alternative HTML version deleted]]

Re: [R] OT Sorta: Odds Are, It's Wrong...

2010-03-15 Thread Ted Harding
On 15-Mar-10 16:22:13, Marc Schwartz wrote: > Hi all, > I thought that readers of R-Help might find the following article at > ScienceNews of interest: > > Odds Are, It's Wrong > Science fails to face the shortcomings of statistics > By Tom Siegfried > March 27th, 2010; Vol.177 #7 (p. 26)

Re: [R] aggregate without removing empty subset

2010-03-15 Thread Henrique Dallazuanna
Try this: apply(m, 2, tapply, part, mean) On Mon, Mar 15, 2010 at 2:10 PM, Christophe Genolini wrote: > Hi the list, > > As it is say in its doc, the aggregate function remove empty subsets. Is it > possible to NOT remove empty subset ? > --- 8< --- > m <- matrix(1:12,4) > part <- factor(c("

Re: [R] gaps in time series

2010-03-15 Thread Henrique Dallazuanna
Try this: x V1 V2 1 2010-03-01 9 2 2010-03-03 17 3 2010-03-04 2 4 2010-03-05 9 5 2010-03-07 3 rng <- range(as.Date(x$V1)) with(merge(data.frame(V1 = seq(rng[1], rng[2], by = 'day')), x, all = TRUE), aggregate(V2, list(V1), FUN = sum, na.rm = TRUE)) On Mon, Mar 15, 2010 at 2

[R] aggregate without removing empty subset

2010-03-15 Thread Christophe Genolini
Hi the list, As it is say in its doc, the aggregate function remove empty subsets. Is it possible to NOT remove empty subset ? --- 8< --- m <- matrix(1:12,4) part <- factor(c("A","B","A","B"),levels=c("A","B","C")) aggregate(m,list(part),mean) ### I get: # Group.1 V1 V2 V3 # 1 A 2

[R] gaps in time series

2010-03-15 Thread Joe Calderon
hello *, im new to the list (and R in general), i have a problem that im hoping someone can help me solve. i have data that i want to turn into a time series per day, ex. 2010-03-01 9 2010-03-03 17 2010-03-04 2 2010-03-05 9 2010-03-07 3 is there an easy way to fill in the gaps for the m

Re: [R] sqlFetch maximum rows

2010-03-15 Thread ryusuke
The problem has been cope after I copy a new *.mdb file, just wondering if it will be happened again beyond future... :confused: -- View this message in context: http://n4.nabble.com/sqlFetch-maximum-rows-tp1593601p1593660.html Sent from the R help mailing list archive at Nabble.com. __

Re: [R] Time in minutes

2010-03-15 Thread Miguel Porto
Hi! That should do it: yourtime$min+yourtime$hour*60 In case your object is of class POSIXlt. Otherwise, convert it with as.POSIXlt first. Miguel On Mon, Mar 15, 2010 at 3:57 PM, Carlos Nader wrote: > Hi there! > > I have some data in POSIXlt format: > > 2009-07-18 5:53:00 > 2008-11-23 7:27:0

[R] Time in minutes

2010-03-15 Thread Carlos Nader
Hi there! I have some data in POSIXlt format: 2009-07-18 5:53:00 2008-11-23 7:27:00 2008-11-24 5:25:00 and would like to extract information about only the minutes of the day, like: 5:53 --> 353 minutes 7:27 --> 447 minutes can you help me? Carlos Nader [[alternative HTML version del

[R] OT Sorta: Odds Are, It's Wrong...

2010-03-15 Thread Marc Schwartz
Hi all, I thought that readers of R-Help might find the following article at ScienceNews of interest: Odds Are, It's Wrong Science fails to face the shortcomings of statistics By Tom Siegfried March 27th, 2010; Vol.177 #7 (p. 26) http://www.sciencenews.org/view/feature/id/57091/title/O

Re: [R] storing matrix(variables) in loop

2010-03-15 Thread Miguel Porto
Yeah, that sounds inefficient to me also. I think you'd be better off using multidimensional arrays instead of lists, since all your values are numeric. See ?array. Miguel 2010/3/15 Márcio Resende > > Hello R-helpers, > I have the following code that works well, > > b <-list() > for (i in 1:3)

[R] sqlFetch maximum rows

2010-03-15 Thread Ryusuke Kenji
Hi, I was trying to import data from MS Access while face some capacity problem. There was only 320 rows sqlFetch into R even though I write max equal to 0: >sqlFetch(channel, tablenames='Sample', max=0) When I try sqlFetchMore there was only shown -1. May I know if there gotta better way t

Re: [R] A complex case of distribution fitting

2010-03-15 Thread Charles C. Berry
On Mon, 15 Mar 2010, ? wrote: Dear all, I need to fit a set of empirical data to cumulative normal distribution to find the mean and sd of theoretical distribution. But I assume that my data set describes only part of PDF, for example, only half of theoretical distribu

[R] Error in pruning hclust object using maptree package

2010-03-15 Thread Keith
Dear R users, Due to too many children in my clustering result, I would like to prune the tree-like hclust object into a certain groups. However, an error: > clip.clust: no data provided for hclust object always shows up. Firstly, I tried the example in the maptree package, and it worked wel

Re: [R] storing matrix(variables) in loop

2010-03-15 Thread William Dunlap
> -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Márcio Resende > Sent: Monday, March 15, 2010 7:45 AM > To: r-help@r-project.org > Subject: [R] storing matrix(variables) in loop > > > Hello R-helpers, > I have the following c

Re: [R] Frequencies from a matrix - spider from frequencies

2010-03-15 Thread Uwe Dippel
Jim Lemon wrote: Hi Uwe, Here's one way to get your spider plot: ld1<-matrix(sample(1:5,310,TRUE),nrow=31) ld2<-apply(ld1,2,table) radial.plot(ld2,line.col=2:6,rp.type="p", radial.pos=seq(0,9*pi/5,by=pi/5), labels=paste("Q",1:10,sep=""),start=pi/2, clockwise=TRUE,main="Frequency of respons

Re: [R] Error loading R Commander with version 2.10.1 on MacOS 10.5 or 10.6

2010-03-15 Thread John Fox
Dear Dwight, The tcltk package *is* part of the standard R distribution. It is Tcl/Tk itself for X11 that you needed to install. I think that it too is part of the standard R distribution and am not sure why wasn't on your system. I'm copying this reply to Rob Goedman, who is much more knowledgeab

Re: [R] storing matrix(variables) in loop

2010-03-15 Thread Miguel Porto
Just in case... b=array(NA,c(3,3,3,4))# that means b[matrix-row,matrix-col,i,j] for (i in 1:3){ for (j in 1:4){ b[,,i,j]=matrix(runif(1),3,3) } } b (I think there are better ways to do this anyway...) Miguel [[alternative HTML version deleted]] __

Re: [R] storing matrix(variables) in loop

2010-03-15 Thread Benilton Carvalho
If you could describe exactly what is it that you're trying to accomplish, we could be of better help (the reason I say this is because the way you're trying to implement things is a bit inefficient). Anyways, you can't use two indices with a list. One approach would be to nest lists, and you'd g

Re: [R] storing matrix(variables) in loop

2010-03-15 Thread jim holtman
quick and dirty, use 'paste' > b <- list() > for (i in 1:3){ + for (j in 1:4){ + a <- matrix(runif(1),3,3) + b[[paste(i,j)]] <- a #but this doesn´t work + } + } > b $`1 1` [,1] [,2] [,3] [1,] 0.2059746 0.2059746 0.2059746 [2,] 0.2059746 0.2059746 0.2059746 [3,] 0.2059746 0.2059

[R] storing matrix(variables) in loop

2010-03-15 Thread Márcio Resende
Hello R-helpers, I have the following code that works well, b <-list() for (i in 1:3){ a <- matrix(runif(1),3,3) b[[i]] <- a } b however, I need to do something similar with two loops and I was looking for something that would look like b <- list() for (i in 1:3){ for (j in 1:4){ a <- matrix(r

Re: [R] inner join sqldf

2010-03-15 Thread Newbie19_02
Dear Gabor, require(sqldf) file(description="http://n4.nabble.com/file/n1593282/test_sql_psd.txt";, open="") file(description="http://n4.nabble.com/file/n1593282/test_sql_tsf.txt";, open="") test_sql_psd <- read.table(file="http://n4.nabble.com/file/n1593282/test_sql_psd.txt";, header=TRUE, se

Re: [R] nice log-log plots

2010-03-15 Thread Martin Maechler
> "JL" == Jim Lemon > on Mon, 15 Mar 2010 17:53:40 +1100 writes: JL> On 03/15/2010 03:12 AM, ElManuelito wrote: >> I'm open to any suggestions and improvements... >> ... >> #plot.loglog(f,S,type="o",col=4,pch="",xaxs="i",yaxs="i"); >> JL> Hi ElManuelito, The

Re: [R] Error loading R Commander with version 2.10.1 on MacOS 10.5 or 10.6

2010-03-15 Thread Krehbiel, Dwight
Thanks very much, John. Installing that tcltk package is all that is required. It would be nice to make this a part of the download of 2.10.1 as it is wasting a significant amount of time for R Commander users on the Mac. Dwight -Original Message- From: John Fox [mailto:j...@mcmaster.c

Re: [R] Multiple comparisons for a two-factor ANCOVA

2010-03-15 Thread RICHARD M. HEIBERGER
Please see the maiz example in ?MMC in the HH package. maiz is the last example in the help file. Keep going all the way to the end of the help file. See also the demo("MMC.WoodEnergy-aov", "HH") These examples show how to use glht in the presence of interactions and covariates. Rich

Re: [R] for() loop

2010-03-15 Thread Miguel Porto
Sorry, I missed the [,4] : aggregate(datjan[,4],by=list(datjan[,4]),sum) Miguel [[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

  1   2   >