Re: [R] MANOVA

2009-03-11 Thread Simon Blomberg
You only have one response variable, so MANOVA is not appropriate. One option would be to compare BP ~ Weight + Height with BP ~ 1. That would give you a joint test of weight and height together. Since they are collinear, that should tell you the overall effect of "size". There are other options, m

[R] MANOVA

2009-03-11 Thread Ding Xiao
Hi All, I have questions about MANOVA which I am still not sure if appropriately I should use it. For example I have a data set like this: BloodPressure (BP) Weight Height 120115165 125145198 15699 176 I know that BloodPressure is correlated with both We

Re: [R] heatmap and colour key

2009-03-11 Thread Stephen J. Barr
Check out http://cran.r-project.org/web/packages/RColorBrewer/index.html On Wed, Mar 11, 2009 at 10:41 PM, Daren Tan wrote: > I would like to visualize my data via heatmap so that the value range > c(-2,2) corresponds to greenred(75). However, heatmap uses the min and > max from my dataset instea

[R] heatmap and colour key

2009-03-11 Thread Daren Tan
I would like to visualize my data via heatmap so that the value range c(-2,2) corresponds to greenred(75). However, heatmap uses the min and max from my dataset instead. How to solve this ? __ R-help@r-project.org mailing list https://stat.ethz.ch/mailma

Re: [R] can I draw 3D plot like this using R?

2009-03-11 Thread Rob Denniker
Sure, you can do that. Check out wireframe() in the lattice library. > -Original Message- > From: fwa...@gmail.com > Sent: Wed, 11 Mar 2009 20:35:22 -0700 (PDT) > To: r-help@r-project.org > Subject: [R] can I draw 3D plot like this using R? > > hi, all > > I am looking at R package RGL

Re: [R] can I draw 3D plot like this using R?

2009-03-11 Thread Stephen J. Barr
Yes, you can: For example: http://addictedtor.free.fr/graphiques/RGraphGallery.php?graph=40 In general RGraphGallery is quite useful for getting ideas and source code to different kinds of graphs and plots. Regards, -stephen -- == Stephen J. Barr Univers

[R] can I draw 3D plot like this using R?

2009-03-11 Thread Oliver
hi, all I am looking at R package RGL to draw a colored mesh/surface plot like this one (from matlab). http://www.mathworks.com/access/helpdesk/help/techdoc/visualize/cbar.gif The key features I am looking for is surfaced with grid and color, but not the terrain-like gradient. but I didn't come

[R] R library help files

2009-03-11 Thread Dajiang Liu
Dear All, I am writing an R library myself. The package build ok, and can be installed. But when I load the library into R using library('xyz'), then I type ?xyz for help in one of the functions named xyz as well, the following error occured, No documentation for 'xyz' in specified packages an

Re: [R] Centering multi-line strip text in lattice

2009-03-11 Thread Mike Lawrence
Perfect, thanks! On Wed, Mar 11, 2009 at 7:41 PM, Paul Murrell wrote: > Hi > > > Mike Lawrence wrote: >> I'm having trouble centering multi-line strip text in lattice. As the >> code below demonstrates bounding box of the text is centered within >> the strip, but the first line isn't centered in

Re: [R] R-help: grep in for loop using index - doesn't work

2009-03-11 Thread jim holtman
I think you have to convert the loop value to character; it is not recognized inside the quotes: #doesn't work, but now it should i<-147 p1 <- grep("QueryItem",c1data[as.character(i),],value=FALSE,fixed=FALSE) print(p1) # prints 0 Same thing goes for the 'for' loop: for(i in 137:270) { print(i)

Re: [R] nlme: problem with fitting logistic function

2009-03-11 Thread dave fournier
I think you can do this very efficiently with AD Model Builder's random effects module. The software is now freely available at http://admb-project.org If you want, you can contact me directly to discuss the model. Dave -- David A. Fournier P.O. Box 2040, Sidney, B.C. V8l 3S3 Canada Pho

Re: [R] Date frame

2009-03-11 Thread jim holtman
It all depends on what you are going to do with the data. What you want to do can be accomplished with 'list', but probably not dataframes. So what is the problem you are trying to solve? Here is an example of how you can create a list with the information you want: > x <- read.table(textConnec

[R] Test Set Deviances

2009-03-11 Thread Thomas Allen
Dear all I'm building logistic regression models using glm() and then validating their predictive ability on a test set using predict() to get the probabilities. I understand how to attain the deviance of the model fitted to the training set. But is there a way to get the deviance within the test

Re: [R] Centering multi-line strip text in lattice

2009-03-11 Thread Paul Murrell
Hi Mike Lawrence wrote: > I'm having trouble centering multi-line strip text in lattice. As the > code below demonstrates bounding box of the text is centered within > the strip, but the first line isn't centered in relation to the longer > second line. The "adj" argument to par.strip.text doesn'

[R] R-help: grep in for loop using index - doesn't work

2009-03-11 Thread Mohan Singh
Hi everyone I am trying to use grep in a for loop to compare a string value. It works if I use the actual index value but when I use the for loop index, it doesn't work. Any suggestions plz. Here is the code: data <- read.table(file="Sigmoid.csv", head=FALSE, sep=","); c1 <- data$V1 c2 <- dat

Re: [R] Error.bars

2009-03-11 Thread jim holtman
It would appear there is not a carriage return in the sequence ')))g="; I assume that was the unexpected character. Better formatting would be useful. On Wed, Mar 11, 2009 at 7:49 PM, Sueli Rodrigues wrote: > > Hi, > I'm studying the Michael J. Crawley book (Statistics An Introduction using > R

Re: [R] Matrix Construction; Subdiagonal

2009-03-11 Thread Stu Field
Thanks Bill, This one will work perfectly, the others required an existing matrix to be modified, which isn't the case (I'm using this xyz function in a larger construct). Plus it's only a 12x12, so not too big on memory. Thank you! Stu On 11 • Mar • 2009, at 6:34 PM, wrote: > > This is hor

Re: [R] Matrix Construction; Subdiagonal

2009-03-11 Thread Bill.Venables
This is horrible on memory if you are dealing with large matrices. Here is a slightly more slick version of the function I have already posted: xyz <- function (v, k) { n <- length(v) + abs(k) x <- matrix(0, n, n) i <- (1 - min(0, k)):(n - max(0,k)) j <- (1 + max(0, k)):(n + min(

Re: [R] non-positive definite matrix remedies?

2009-03-11 Thread Matthew Keller
Many thanks John. Your suggestion was the type of thing I was looking for and you got me on the right track:apparently there is a newer/more sophisticated function in the matrix package called nearPD which (according to the help page) "implements the algorithm of Higham (2002), and then forces posi

Re: [R] Matrix Construction; Subdiagonal

2009-03-11 Thread Bill.Venables
Why should there be a simple way? R is not primarily a matrix language. Perhaps this will help: xyz <- function (v, k) { n <- length(v) + abs(k) x <- matrix(0, n, n) if (k == 0) diag(x) <- v else if (k < 0) { ## sub-diagonal j <- 1:(n+k) i <- (1 - k)

Re: [R] Matrix Construction; Subdiagonal

2009-03-11 Thread Sundar Dorai-Raj
You can always write your own function: myDiag <- function(x, vec, k) { x[row(x) == col(x) - k] <- vec x } myDiag(A, vec, -1) Of course, you should probably do some input checking too. --sundar On Wed, Mar 11, 2009 at 4:57 PM, Stu Field wrote: > Sure, that'll work fine, thanks. > But I gu

Re: [R] Matrix Construction; Subdiagonal

2009-03-11 Thread Stu Field
Sure, that'll work fine, thanks. But I guess I was looking for something more similar to MatLab, I'm really surprised R doesn't have a preset command for this (?) Thanks again, Stu On 11 • Mar • 2009, at 5:49 PM, Sundar Dorai-Raj wrote: > > Does this help? > > A <- matrix(0, 6, 6) > vec <- 1:5

Re: [R] non-positive definite matrix remedies?

2009-03-11 Thread Albyn Jones
That's an interesting problem. My first thought was to choose the closest positive definite matrix to the given matrix, say in the least squares sense. However, the 2x2 diagonal matrix with diagonal (1,0) makes it clear that there isn't a closest pd symmetric matrix. Perhaps multiple imputatio

[R] Error.bars

2009-03-11 Thread Sueli Rodrigues
Hi, I'm studying the Michael J. Crawley book (Statistics An Introduction using R)and I'm trying to reproduce one example (page 168) for plot a barplot with error bars, but when I put the function I receive the following message. Please, could someone told me what's wrong? error.bars=function(yv,z

Re: [R] Matrix Construction; Subdiagonal

2009-03-11 Thread Sundar Dorai-Raj
Does this help? A <- matrix(0, 6, 6) vec <- 1:5 A[row(A) == col(A) + 1] <- vec --sundar On Wed, Mar 11, 2009 at 4:42 PM, Stu Field wrote: > I'm trying to enter a vector into the subdiagonal of a matrix but > cannot find a command in R which corresponds to the MatLab version of > diag(vec, k), w

[R] Matrix Construction; Subdiagonal

2009-03-11 Thread Stu Field
I'm trying to enter a vector into the subdiagonal of a matrix but cannot find a command in R which corresponds to the MatLab version of diag(vec, k), where vec = the vector of interest, and k = the diagonal (k=0 for the diagonal; k=-1 for the subdiagonal; k=1 for superdiagonal, etc.) Is the

Re: [R] non-positive definite matrix remedies?

2009-03-11 Thread John Fox
Dear Matt, See the pd argument to the hetcor() function in the polycor package. hetcor() makes use of nearcor() in the sfsmisc package to ensure that a matrix of pairwise polychoric, polyserial, and Pearson correlations is positive-definite. I hope this helps, John -

Re: [R] R-help: grep in for loop using index - doesn't work

2009-03-11 Thread Mohan Singh
Thanks very much Phil :) Worked prefect -Original Message- From: Phil Spector [mailto:spec...@stat.berkeley.edu] Sent: Wednesday, March 11, 2009 11:14 PM To: Mohan Singh Subject: Re: [R] R-help: grep in for loop using index - doesn't work Mohan - Sorry about that. I need to check w

Re: [R] R-help: grep in for loop using index - doesn't work

2009-03-11 Thread Mohan Singh
Thanks Phil. That worked. The apply(..) commands gives me a single 1/0 output for each column which has the query item or not. But I am looking to find the index i from the loop to extract that particular value for plotting I'll try to improve the data.frame part; I was not able to access t

[R] R-help: grep in for loop using index - doesn't work

2009-03-11 Thread Mohan Singh
Hi everyone I am trying to use grep in a for loop to compare a string value. It works if I use the actual index value but when I use the for loop index, it doesn't work. Any suggestions plz. Here is the code: data <- read.table(file="Sigmoid.csv", head=FALSE, sep=","); c1 <- data$

[R] non-positive definite matrix remedies?

2009-03-11 Thread Matthew Keller
Hi all, For computational reasons, I need to estimate an 18x18 polychoric correlation matrix two variables at a time (rather than trying to estimate them all simultaneously using ML). The resulting polychoric correlation matrix I am getting is non-positive definite, which is problematic because I'

Re: [R] xyplot() - can you control how the plots are ordered?

2009-03-11 Thread AR
Thanks Mark and Dieter. That helps. Anand On Mar 8, 4:24 am, Dieter Menne wrote: > AR gmail.com> writes: > > > I want to control the plots in the output of thexyplot(). It is > > easier to explain it through an example: > > .. modified example see below > > > > > The output of thexyplot() is so

Re: [R] Couple of Questions about Classification trees

2009-03-11 Thread Jen_mp3
Okay perhaps I should've been more clear about the data. Im actually working on spectroscopic measurements from food authenticity testing. I have five different types of meat: 55 of chicken, 55 of turkey, 55 of pork, 34 of beef and 32 of lamb - 231 in total. On each of these 231 meats, 1024 spect

[R] regsubsets() [leaps package] - please share some good examples of use

2009-03-11 Thread Tal Galili
Hello dear R-help members, I recently became interested in using biglm with leaps, and found myself somewhat confused as to how to use the two together, in different settings. I couldn't find any example codes for the leaps() package (except for in the help file, and the examples there are not as

[R] CI from svyquantile in survey package

2009-03-11 Thread Ron Burns
I am having trouble understanding (i.e. getting) confidence intervals from the survey package. I am using R version 2.8.1 (2008-12-22) and survey package (3.11-2) on FC7 linux. To simplify my question I use an example from that package: R> data(api) R> dclus1<-svydesign(id=~dnum,

Re: [R] Reshape question.

2009-03-11 Thread rkevinburton
Thank you for you reply. I will try this. The inital few rows in the .dat file look like: Year,DayOfYear,Sku,Quantity,CatId,Category,SubCategory 2009,1,100051,1,10113,"MEN","Historical men's" 2009,1,100130,1,10638,"ACCESSORIES & MAKEUP","ALL Kids Accessories" 2009,1,100916,1,10222,"WOMEN","TV & M

[R] Working up examples of barplots with customized marginal items

2009-03-11 Thread Paul Johnson
Hello, everybody: I'm back to share a long piece of example code. Because I had trouble understanding the role of par() and margins when customizing barplots, I have struggled with this example. In case you are a student wanting to place legends or textual markers in the outer regions of a barpl

Re: [R] Comparing data frames and keeping non-matches

2009-03-11 Thread Pele
Hi All, I found a solution that give the correct answer.. year <- c(2100:2110) x1 <- c(F,T,T,F,F,F,T,F,T,T,F) df1 <- data.frame(cbind(year, x1)) df1$subject <- c(1,1,1,2,2,3,3,3,3,4,4) df1$match <- 1 df1$key <- paste(df1$subject, df1$match, sep="") ; df1 df2 <- data.frame(cbind(year, x1)) df2$

Re: [R] Easy "Recall" to get ls(..., all.names=TRUE)?

2009-03-11 Thread Rolf Turner
On 12/03/2009, at 3:16 AM, Szumiloski, John wrote: Dear useRs, I have a utility function which is meant to be a clone of ls(), except with the option all.names=TRUE. Currently however, the function merely consists of a copy of the source code of ls(), except the default value of all.name

[R] matrix multiplication, tensor product, block-diagonal and fast computation

2009-03-11 Thread Camarda, Carlo Giovanni
Dear R-users, I am searching to the "best" way to compute a series of n matrix multiplications between each matrix (mXm) in an array (mXmXn), and each column of a matrix (mXn). Please find below an example with four possible solutions. The first is a simple for-loop which one might avoid; the se

Re: [R] Cholesky Decomposition in R

2009-03-11 Thread Manli Yan
Thank you guys so much Regards~ 2009/3/11 Simon Wood > > A <- matrix(runif(25),5,5); A <- A%*%t(A) ## Example +ve def matrix > > U <- chol(A) ## start from factor given by chol > D <- diag(U) ## extract sqrt(D) > L <- t(U/D) ## get unit lower triangular factor > D <- diag(D^2) #

Re: [R] Reshape question.

2009-03-11 Thread Tal Galili
how about: c2009 <- cast(m2009, Category + SubCategory +DayOfYear ~ variable , sum) ? p.s: toy data would be nice to have :) On Wed, Mar 11, 2009 at 9:47 PM, wrote: > This hopefully is trivial. I am trying to reshape the data using the > reshape package. > > First I read in the data: > >

Re: [R] error.bars

2009-03-11 Thread Tal Galili
oh, and first do: install.packages("psych") and then: library(psych) On Wed, Mar 11, 2009 at 9:57 PM, Sueli Rodrigues wrote: > > Hi, I'm trying to use the function "error.bars", but the program don't > find it, and I dont't found any package with this function. Is there some > another functin

Re: [R] error.bars

2009-03-11 Thread Tal Galili
Hi Sueli, Try this: http://users.fmg.uva.nl/rgrasman/rpages/2005/09/error-bars-in-plots.html and this: http://egret.psychol.cam.ac.uk/statistics/R/graphs1.html On Wed, Mar 11, 2009 at 9:57 PM, Sueli Rodrigues wrote: > > Hi, I'm trying to use the function "error.bars", but the program don't > f

Re: [R] error.bars

2009-03-11 Thread David Winsemius
http://finzi.psych.upenn.edu/R/library/psych/html/error.bars.html On Mar 11, 2009, at 3:57 PM, Sueli Rodrigues wrote: Hi, I'm trying to use the function "error.bars", but the program don't find it, and I dont't found any package with this function. Is there some another functin to draw ba

Re: [R] Couple of Questions about Classification trees

2009-03-11 Thread Frank E Harrell Jr
Jen_mp3 wrote: So I have 2 sets of data - a training data set and a test data set. I've been doing the analysis on the training data set and then using predict and feeding the test data through that. There are 114 rows in the training data and 117 in the test data and 1024 columns in both. It's a

Re: [R] About the merge

2009-03-11 Thread William Dunlap
You can assign a group number to each run of identical values of 'Rep' with firstInRun <- with(data, c(TRUE, Rep[-1]!=Rep[-length(Rep)])) group <- cumsum(firstInRun) where 'data' is your data.frame's name. Once you've assigned the runs to groups then you can use, e.g., sapply(split()) to c

[R] error.bars

2009-03-11 Thread Sueli Rodrigues
Hi, I'm trying to use the function "error.bars", but the program don't find it, and I dont't found any package with this function. Is there some another functin to draw barplots with error bars? Sueli Rodrigues Eng. Agrônoma - UNESP Mestranda - USP/ESALQ PPG-Solos e Nutrição de Plantas Fones (19

Re: [R] Pseudo-random numbers between two numbers

2009-03-11 Thread Ted Harding
Because of a mistake I made in copying code into email, there has been confusion (expressed in some private emails). Hence the corrected version is appended at the end. On 11-Mar-09 00:05:26, Ted Harding wrote: > I have modified my example to make it more convincing! See at end. > > On 10-Mar-09

[R] Reshape question.

2009-03-11 Thread rkevinburton
This hopefully is trivial. I am trying to reshape the data using the reshape package. First I read in the data: a2009 <- read.csv("Total2009.dat", header = TRUE) Then I trim it so that it only contains the columns that I have interested in: m2009 <- melt(a2009, id.var=c("DayOfYear","Category",

[R] tracing SV3 methods

2009-03-11 Thread William Dunlap
I would like to put traces on the methods for an SV3 generic and trace() doesn't seem to work. E.g., > median(1:10) [1] 5.5 > trace(median.default) > median(1:10) # expect "Tracing median.default ..." [1] 5.5 I can tell that median.default is getting called, since a trace on sort() sho

Re: [R] Iterations of random sampling

2009-03-11 Thread Chuck Cleland
On 3/11/2009 3:15 PM, René Pineda wrote: > I have a univariate binary (1,0) 230,000 records, I need to make 20,000 > iterations of random sampling of a fixed size. Where I put the result of the > sum of selected records for each repetition X <- rbinom(23, 1, .5) sample.sums <- replicate(200

[R] Couple of Questions about Classification trees

2009-03-11 Thread Jen_mp3
So I have 2 sets of data - a training data set and a test data set. I've been doing the analysis on the training data set and then using predict and feeding the test data through that. There are 114 rows in the training data and 117 in the test data and 1024 columns in both. It's actually the same

Re: [R] Is there any difference between <- and =

2009-03-11 Thread Wacek Kusnierczyk
Duncan Murdoch wrote: > > Use <- for assignment, and = for function arguments. Then the > difference between > > f( a = 3 ) > f( a <- 3 ) > > is clear, and you won't be surprised that a gets changed in the second > case. If you use = for assignment, the two lines above will be > written as > >

Re: [R] Forecasting with dlm

2009-03-11 Thread Giovanni Petris
Hi Michael, There was a bug in dlmForecast that I have fixed. While the new version of the package makes its way to CRAN, you can source the attached file, which contains the amended version of dlmForecast. Best, Giovanni Petris > Date: Wed, 11 Mar 2009 13:39:36 + > From: Michael Pearmain

[R] Iterations of random sampling

2009-03-11 Thread René Pineda
I have a univariate binary (1,0) 230,000 records, I need to make 20,000 iterations of random sampling of a fixed size. Where I put the result of the sum of selected records for each repetition Thank's _ of your life

Re: [R] Is this a documentation bug? Spss dates import

2009-03-11 Thread HBaize
Luca, I ran your code using SPSS 17.0 and R 2.8.1. I found that the correct date was returned in R using this code: test.df$newdate <- as.Date(as.POSIXct(test.df$mydate , origin="1582-10-14")) Also note that SPSS 17.0 is case sensitive in storing variable names, so the R code in your post need

Re: [R] Multilevel Modeling using glmmPQL

2009-03-11 Thread Chuck Cleland
On 3/11/2009 11:29 AM, Howard Alper wrote: > Hi, > > I'm trying to perform a power simulation for a simple multilevel > model, using the function glmmPQL in R version 2.8.1. I want to extract > the p-value for the fixed-effects portion of the regression, but I'm > having trouble doing that. I

[R] "ets()" initialization

2009-03-11 Thread Yagci, Kezban
Hi, I have been working on "ets()" for exponential smoothing. R initialize the forecast itself to minimize the error, I want to set an initialization value for the first period(such as first period's acutal value). However, I could not find how to do it. Would you please help me? Regards, Kezb

Re: [R] Multilevel Modeling using glmmPQL

2009-03-11 Thread Howard Alper
Hi, I'm trying to perform a power simulation for a simple multilevel model, using the function glmmPQL in R version 2.8.1. I want to extract the p-value for the fixed-effects portion of the regression, but I'm having trouble doing that. I can extract the coefficients (summary(fit)$coef

Re: [R] compile under Ubuntu 8.10 (Ibex) - Thanks

2009-03-11 Thread Terry Therneau
Thanks for the good replies. 1. "build-essential" -- this is likely the essential thing that I forgot. I tend to leave running machines alone (for years at a time) so forget things like this. My laptop is Fedore core 6 I think, when the prior laptop died. I did remember bin-utils though.

Re: [R] RES: North Arrow (.png file) on a Map

2009-03-11 Thread Kingsford Jones
Also, see # install.packages('sp') example('spplot', package='sp') Kingsford Jones On Wed, Mar 11, 2009 at 9:38 AM, Greg Snow wrote: > Another possibility is the my.symbols function in the TeachingDemos package.   > You can define a polygon of your arrow (or other symbol), then use my.symbols

Re: [R] compile under Ubuntu 8.10 (Ibex)

2009-03-11 Thread Douglas Bates
On Wed, Mar 11, 2009 at 11:11 AM, Terry Therneau wrote: >  I fired up a new machine last night and loaded Ubuntu 8.10 on it.  I then had > to add in the usual compiler stuff which is not loaded by default: make, > emacs, > fortran, c++, etc. >  I'm having trouble compiling R 2.8 however.  I get

Re: [R] OT: Likelihood ratio for the randomization/permutation test?

2009-03-11 Thread Charles C. Berry
On Wed, 11 Mar 2009, Mike Lawrence wrote: Hi guRus, My discipline (experimental psychology) is gradually moving away from Null Hypothesis Testing and towards measures of evidence. One measure of evidence that has been popular of late is the likelihood ratio. Glover & Dixon (2005) demonstrate th

[R] Comparing data frames and keeping non-matches

2009-03-11 Thread Pele
Hi R users, I am trying to compare 2 data frames by subject and match and save the no matches to an object called nomatch, but I am getting unexpected results... Can anyone tell me how to correct the code to get the expected results shown in the last table? Many thanks in advance for your any h

Re: [R] Mixed models fixed effects

2009-03-11 Thread Mark Difford
Hi Simon, Carefull, someone is likely to tell you that the "bible" is Pinheiro, J.C., and Bates, D.M. (2000) "Mixed-Effects Models in S and S-PLUS", Springer, and that would be much closer to being correct. Others might mention something by Searle. Nothing against Crawley, of course. But it usual

Re: [R] Question about datatypes/plotting issue

2009-03-11 Thread Gabor Grothendieck
Another approach is to use yearmon. e.g. > library(zoo) > as.yearmon("January 1987", "%B %Y") [1] "Jan 1987" Thus we can replace the w <- line in my example code with: w <- zoo(as.matrix(W[-1]), as.yearmon(W[,1], "%B %Y")) On Wed, Mar 11, 2009 at 12:48 PM, Oscar Bonilla wrote: > David, > > I s

Re: [R] Question about datatypes/plotting issue

2009-03-11 Thread Oscar Bonilla
David, I struggled with this for a while. I think the problem with the dates I have is that they are not specific dates, they are "partial" dates. A workaround for that that I got from someone else in the list was: as.Date(paste(x$Date, '1'), '%B %Y %d') to make them specific dates (the fi

[R] how to check the model adequacy for a cox proportional hazard model fit?

2009-03-11 Thread li li
Anybody has any suggestion? Thanks! [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and p

Re: [R] Combining math and variables in expression

2009-03-11 Thread David Winsemius
Dear socrates; It did not take me 2.5 hours but it did take longer than I thought it would. I worked off the example given by Henrique Dallazuanna seen at: http://finzi.psych.upenn.edu/R/Rhelp08/archive/120065.html This seems "to work": mtext(bquote(100~"%" ~ Area == ~ .(text.val)~ Km^2), s

Re: [R] Using a NAMESPACE or the Imports field in DESCRIPTION?

2009-03-11 Thread Martin Morgan
Hi Wolfgang -- Wolfgang Koller wrote: Hello list, I am writing a package which builds on a function ("foo") of another package. I only need that particular function. What is the state of the art to do this? Do I need a NAMESPACE file in my package? Currently I still don't have one. Or can I

Re: [R] Combining math and variables in expression

2009-03-11 Thread Greg Snow
> tmp <- '120.000' > mtext(bquote( '100% Area' == .(tmp)~km^2 )) Hope this helps, -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- > proj

[R] Two new R courses in April (US)

2009-03-11 Thread David M Smith
REvolution Computing is hosting two new R courses in New York City and Chicago in April. Short descriptions are below, but further information and registration details can be found in the links at: http://blog.revolution-computing.com/2009/03/r-courses-from-revolution-april.html April 1 (New York

[R] Using a NAMESPACE or the Imports field in DESCRIPTION?

2009-03-11 Thread Wolfgang Koller
Hello list, I am writing a package which builds on a function ("foo") of another package. I only need that particular function. What is the state of the art to do this? Do I need a NAMESPACE file in my package? Currently I still don't have one. Or can I do this with the Imports field in my DE

[R] compile under Ubuntu 8.10 (Ibex)

2009-03-11 Thread Terry Therneau
I fired up a new machine last night and loaded Ubuntu 8.10 on it. I then had to add in the usual compiler stuff which is not loaded by default: make, emacs, fortran, c++, etc. I'm having trouble compiling R 2.8 however. I get a message that it cannot figure out how to link f77 and C. I'v

Re: [R] Help on MLInterfaces

2009-03-11 Thread Martin Morgan
Hi Tulgan -- MLInterfaces is a Bioconductor package, so please ask on the Bioc mailing list (the package maintainer is more likely to read that list) https://stat.ethz.ch/mailman/listinfo/bioconductor Martin Tul Gan writes: > Hi, >   I am trying to use MLearn in MLInterfaces package

Re: [R] Is there any difference between <- and =

2009-03-11 Thread David M Smith
On Wed, Mar 11, 2009 at 7:18 AM, Sean Zhang wrote: > Dear R-helpers: > > I have a question related to <- and =. > > I saw very experienced R programmers use = rather than <- quite > consistently. > However, I heard from others that do not use = but always stick to <- when > assigning valuese. > >

[R] OT: Likelihood ratio for the randomization/permutation test?

2009-03-11 Thread Mike Lawrence
Hi guRus, My discipline (experimental psychology) is gradually moving away from Null Hypothesis Testing and towards measures of evidence. One measure of evidence that has been popular of late is the likelihood ratio. Glover & Dixon (2005) demonstrate the calculation of the likelihood ratio from AN

Re: [R] RES: North Arrow (.png file) on a Map

2009-03-11 Thread Greg Snow
Another possibility is the my.symbols function in the TeachingDemos package. You can define a polygon of your arrow (or other symbol), then use my.symbols to add it to an existing graph, the advantage of my.symbols is that the size of the arrow is absolute, not in terms of the scale of the orig

Re: [R] Mixed models fixed effects

2009-03-11 Thread Simon Pickett
Also check out these pdfs http://cran.r-project.org/other-docs.html and try to get your hands on the bible http://www.amazon.co.uk/R-Book-Michael-J-Crawley/dp/0470510242 Simon. Hi Emma, Continuous predictors are no problem at all. You can mix both continuous and categorial predictors if n

Re: [R] adding text and other elements to ggplot2 plots

2009-03-11 Thread hadley wickham
Have a look at the annotations section of http://had.co.nz/ggplot2/book/toolbox.pdf Hadley On Wed, Mar 11, 2009 at 8:44 AM, levyofi wrote: > > Hello, > I really like the interface and flexibility of the ggplots package. However, > I cannot find how to add text to a plot (like the 'text' and 'rec

Re: [R] Creating a directory for my data

2009-03-11 Thread miya
Sorry, I did forget to add what it is I want to get. I wish to get a result like the following: Legend: ID Title 1 Article A 2 Article B 3 Article C 4 Article D ... i Article "N" -- View this message in context: http://www.nabble.com/Creating-a-d

[R] Combining math and variables in expression

2009-03-11 Thread socrates
I am trying to get the following line in a plot margin using mtext: 100% Area = 120.000 km^2 Where I intend that "100% Area =" is text, 120.000 is a number that varies according to different data, and km^2 should be a neat km-with-superscript-2. The expression function fails me, since it appare

Re: [R] RServe

2009-03-11 Thread Maxl18
I solved the problem. With a big C in RConnection and asDoubles() it works... try{ RConnection r = new RConnection(); double[] d = r.eval("rnorm(10)").asDoubles(); } catch(Exception e){} -- View this message in context: http://www.nabble.com/RServe-tp22452051p22454401.html Sent from the R help

[R] RServe

2009-03-11 Thread Maxl18
Dear all, I'm trying to use R-functions from Java. I want to use the Package Rserve. Everthing is installed and I can run my Java-testprogramm. ... Rconnection r = new Rconnection(); double[] d = r.eval("rnorm(10)").asDoubleArray(); ... But now I get always arrays with ten "0.0", which is not c

[R] how to rotate the histogram

2009-03-11 Thread Abelian
Dear all I want to combine two figures on one plot. First figure display the data distribution. The x-axis of first figure is individual's ranking and the y-axis of first figure is probability. However, the second figure is a histogram about probability. In order to make the figure more clearly, i

[R] problem with rfImpute (package randomForest)

2009-03-11 Thread lionel fugon
Hello everybody, this is my first request about R so I am sorry if I send it to a bad mail or if I am not very clear. So my problem is about the use of rfImpute from randomForest package. I am interested in imputations of missing values and I read that randomForest can make it. So i write the

Re: [R] Is there any difference between <- and =

2009-03-11 Thread Duncan Murdoch
On 3/11/2009 10:18 AM, Sean Zhang wrote: Dear R-helpers: I have a question related to <- and =. I saw very experienced R programmers use = rather than <- quite consistently. However, I heard from others that do not use = but always stick to <- when assigning valuese. I personally like = becaus

Re: [R] Mixed models fixed effects

2009-03-11 Thread ONKELINX, Thierry
Hi Emma, Continuous predictors are no problem at all. You can mix both continuous and categorial predictors if needed. I suppose your response are counts (the number of bats that passes)? In that case a generalised linear mixed model is more appropriate. With the lme4 package you could try somethi

Re: [R] Mixed models fixed effects

2009-03-11 Thread Emma Stone
Dear All, This may sound like a dumb question but I am trying to use a mixed model to determine the predictors of bat activity along hedges within 8 sites. So my response is continuous (bat passes) my predictors fixed effects are continuous (height metres), width (metres) etc and the random ef

Re: [R] chisq.test: decreasing p-value

2009-03-11 Thread soeren . vogel
Thanks to Peter, David, and Michael! After having corrected the coding error, the p values converge to particular value, not necessarily zero. The whole story is, 634 respondents in 6 different areas marked their answer on a 7-step Likert scale (very bad, bad, ..., very good -- later recode

[R] Is there any difference between <- and =

2009-03-11 Thread Sean Zhang
Dear R-helpers: I have a question related to <- and =. I saw very experienced R programmers use = rather than <- quite consistently. However, I heard from others that do not use = but always stick to <- when assigning valuese. I personally like = because I was using Matabl, But, would like to re

[R] About the merge

2009-03-11 Thread Tammy Ma
hi, All. DateDtime Hour Min Second Rep App_dur 9 2006-02-22 14:36:11 14 36 11 4 1 10 2006-02-22 14:36:12 14 36 12 3 86 11 2006-02-22 14:37:38 14 37 38 0 58 14 2006-02-22 14:38:36 14 38 36 3 1 15 2006-02-22 14:38:37 14 38

[R] Easy "Recall" to get ls(..., all.names=TRUE)?

2009-03-11 Thread Szumiloski, John
Dear useRs, I have a utility function which is meant to be a clone of ls(), except with the option all.names=TRUE. Currently however, the function merely consists of a copy of the source code of ls(), except the default value of all.names is different. That approach has the drawback of future in

[R] Bias correction for random forests?

2009-03-11 Thread Zhou Fang
Hi, Way back in 2004, an update to randomForest added an option 'corr.bias'. The explanation was a bit vague, but it turns out it improves RF's predictive fit with my data substantially. But I am having trouble understanding it. Does anyone know what this 'bias correction' actually does? Or

Re: [R] trying to run odfWeave()

2009-03-11 Thread Max Kuhn
> Unzipping ODF file using unzip -o "SampleOdf.odt" > Erreur dans odfWeave(file.in, file.out) : Error unzipping file > De plus : Warning message: > In system(zipCmd[2], invisible = TRUE) : unzip introuvable I get this question about twice a week. Look at the help file. ?odfWeave says: "Since OD

Re: [R] How to monthly,daily,yearly average

2009-03-11 Thread Gabor Grothendieck
Here is an example. See the three vignettes in zoo: vignette("zoo") and R News 4/1 for info on dates. # assume this input Lines <- "Date Time Value 01/01/08 00:00:00 1 01/01/08 00:30:00 2 01/01/08 01:00:00 3 01/01/08 01:30:00 4 01/01/08 02:00:00 5 01/01/08 02:30:00 6 01/01/08 03:00:00 7 01/01/08

Re: [R] LDL' Cholesky decomposition

2009-03-11 Thread Terry Therneau
The gchol function in library(kinship) does an LDL decomposition. An updated version has just recently been posted on Rforge, in the bdsmatrix library which is part of survival. > temp <- matrix(c(1,1,1,1,5,8,1,8,14), 3) > gt <- gchol(temp) > as.matrix(gt) # L [,1] [,2] [,3] [1,]

Re: [R] Creating an Excel file with multiple spreadsheets

2009-03-11 Thread Hans-Peter Suter
2009/3/9 Phil Spector : > The xlsReadWrite package provides write.xls for Windows, but it cannot write _multiple_ spreadsheets -- Regards, Hans-Peter __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

Re: [R] odfWeave & xtable still best packages to produce tables

2009-03-11 Thread Max Kuhn
Jason, > I found several references to odfWeave and xtable.  My question is, are those > still best R packages to produce publication quality tables tables from R? I think the file type you want (and how you will use the output) should probably drive your choice. If you are going to pdf, then Sw

  1   2   >