Re: [R] Statet on Eclipse: ${project_path} is empty

2010-03-11 Thread Tobias Verbeke
Hi Paul, Paul wrote: I'm tryign to use Statet on Eclipse on my Kubuntu Karmic PC. I've set everything up and I can start the R configuration, but the working directory is set to my home directory. If I set the start in directory to ${worspace_loc}/${project_path} I can't start the console,

[R] please, cant install rodbc into R-project

2010-03-11 Thread maysider
I have working unixODBC (tested isql), but rodbc does not want to installIve read the manual how to install rodbc, but I am not linux user so I do not understand well. Can anyone write me the necessary steps? thank you m > install.packages(c("RODBC")) --- Please select a CRAN mirror for use

Re: [R] How to format dates (with no century)?

2010-03-11 Thread johannes rara
Actually I found it: > as.Date(strptime(dates, "%d.%m.%y"), "%Y-%m-%d") [1] "2007-04-06" "1998-12-29" "1991-10-19" "1992-06-20" "2003-09-02" "2003-06-23" "1993-07-13" "2007-03-23" "1995-06-26" "2010-02-15" -J 2010/3/12 johannes rara : > Hi, > > I have dates in this kind of format (day, month, y

[R] How to format dates (with no century)?

2010-03-11 Thread johannes rara
Hi, I have dates in this kind of format (day, month, year): > dput(head(dates, 10)) c("6.4.7", "29.12.98", "19.10.91", "20.6.92", "2.9.3", "23.6.3", "13.7.93", "23.3.7", "26.6.95", "15.2.10") So, as you can see, there is no century. How can I change this character data into dates? Any help would

Re: [R] Question regarding to maxNR

2010-03-11 Thread Bill.Venables
PS there is a better option still. Replace log(prod(dcauchy(x,mu,s))) with sum(dcauchy(x,mu,s, log = TRUE)) For huge samples this will me milliseconds faster... Bill Venables CSIRO/CMIS Cleveland Laboratories -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun.

Re: [R] generic function body display

2010-03-11 Thread Martin Morgan
Hi Alok -- On 03/11/2010 06:59 PM, Alok Jadhav wrote: > > I recently restructured my R project to make use of S4 class objects. I > converted some of the functions to generic functions. If I type the name of > the function i can see the body for non generic functions. I am not able to > retrieve

Re: [R] Question regarding to maxNR

2010-03-11 Thread Bill.Venables
Your problem is numerical. Try replacing log(prod(dcauchy(x,mu,s))) by sum(log(dcauchy(x,mu,s))) and see the difference. Here's what I get: > mu <- 2 > s <- 1 > n <- 300 > library(maxLik) > set.seed(1004) > x <- rcauchy(n,mu,s) > loglik <- function(mu) { + sum(log(dcauchy(x,mu,s))) + } > m

Re: [R] Question regarding to maxNR

2010-03-11 Thread Arne Henningsen
Hi Kate! On Fri, Mar 12, 2010 at 6:20 AM, kate wrote: > Hi R-users, > > Recently, I use maxNR function to find maximizer. I have error appears as > follows > Error in maxNRCompute(fn = fn, grad = grad, hess = hess, start = start,  : >  NA in the initial gradient > > My code is > > mu=2 > s=1 > n

[R] rmaxwell in C

2010-03-11 Thread 王杰彪
Hi R useRs: How can I generate a random sample from Maxwell Distribution in C language? Since I know the function rmaxwell {VGAM}, I tried the function r2c {r2c}. But I still cannot find the source code. Thanks for your kind help. RegaRds, 2010-03-12 Randel [[alternative HTML version

[R] construct a list that consists of lists

2010-03-11 Thread Zhongyi Yuan
Dear R users: I am hoping that someone can help with constructing a list that consists of list with the number of lists variable. i.e. to find a convenient express(or loop sentences) to realize the following: list( list(para1=p1, para2=p2), list(para1=p1, para2=p2), , list(para1=p1,para2=p2) )

[R] How (and where) to get aligned tRNA sequences (and import/align it using R)

2010-03-11 Thread Tal Galili
Hi all, I already posted this to seqinr-fo...@lists.r-forge.r-project.org but since (so far) no reply was given, I decided to try my luck in this list too. Dear list. I wish (for my thesis work), to import tRNA data into R and have it aligned. My questions are: 1) What resources can I use for t

Re: [R] Installing R cmdr

2010-03-11 Thread Ista Zahn
Hi Taleb, You might have better luck posting this to the mac-specific mailing list: https://stat.ethz.ch/mailman/listinfo/r-sig-mac In fact I think this issue has come up there before. See https://stat.ethz.ch/pipermail/r-sig-mac/2010-January/007007.html Best, Ista On Thu, Mar 11, 2010 at 10:37

[R] Question regarding to maxNR

2010-03-11 Thread kate
Hi R-users, Recently, I use maxNR function to find maximizer. I have error appears as follows Error in maxNRCompute(fn = fn, grad = grad, hess = hess, start = start, : NA in the initial gradient My code is mu=2 s=1 n=300 library(maxLik) set.seed(1004) x<-rcauchy(n,mu,s) loglik<-function(mu

Re: [R] NAs and row/column calculations

2010-03-11 Thread David Winsemius
On Mar 11, 2010, at 11:28 PM, David Winsemius wrote: On Mar 11, 2010, at 6:20 PM, Jim Bouldin wrote: On 12/03/2010, at 11:25 AM, Jim Bouldin wrote: I continue to have great frustrations with NA values--in particular making summary calculations on rows or cols of a matrix containing

Re: [R] parse an HTML page with verbose error message (using XML)

2010-03-11 Thread Duncan Temple Lang
Hi Yihui It took me a moment to see the error message as the latest development version of the XML package suppresses/hides them by default for htmlParse(). You can provide your own function via the error parameter. If you just want to see more detailed error messages on the console you can us

[R] help about cluster package

2010-03-11 Thread Jie TANG
hello,everyone. I tried to use cluster analysis package by reading the manual "chapter 15 cluster package" .But when I tried to use the function "agnes",the R said :there is no function.Can you tell me which package I should load? Can anyone give me some sample scripts about clustering analysis ?T

Re: [R] NAs and row/column calculations

2010-03-11 Thread David Winsemius
On Mar 11, 2010, at 6:20 PM, Jim Bouldin wrote: On 12/03/2010, at 11:25 AM, Jim Bouldin wrote: I continue to have great frustrations with NA values--in particular making summary calculations on rows or cols of a matrix containing them. For example, why does: a = matrix(1:30,nrow=5)

[R] Installing R cmdr

2010-03-11 Thread Taleb Alkhajah
Dear John Fox, I am using Snowleopard with a Intel Core 2 Duo processor. I have installed the R console and followed your steps at: http://socserv.mcmaster.ca/jfox/Misc/Rcmdr/installation-notes.html but every time I try "library(Rcmdr)" it loads Tcl/tk infinitely. I have tried loading "libra

Re: [R] Can't convert list to matrix properly

2010-03-11 Thread David Winsemius
On Mar 11, 2010, at 11:16 AM, anna wrote: so I was getting ones because it converted the characters into numeric? No, it did not. The internal representation of the factors is of type integer and those values were used with no reference to the factor levels. - Anna Lippel -- Vi

[R] generic function body display

2010-03-11 Thread Alok Jadhav
I recently restructured my R project to make use of S4 class objects. I converted some of the functions to generic functions. If I type the name of the function i can see the body for non generic functions. I am not able to retrieve the code for Generic functions. It is very convinient for users t

Re: [R] big panel: filehash, bigmemory or other

2010-03-11 Thread Johan Jackson
Hello Eric, If you can do a project like this (that manages huge datasets) in SAS, I'd recommend to just do them in SAS rather than use R. I've sadly come to the conclusion that R isn't very good at working with large datasets, and until the powers that be try to do something about to help users l

Re: [R] Dicrete Laplace distribution

2010-03-11 Thread Moshe Olshansky
Dear Nicolette, You can always use the bruit force solution which works for every discrete distribution with finite number of states: let p0,p1,...,pK be the probabilities of 0,1,...,K (such that they sum up to 1). Let P <- c(p0,p1,...,pK) and P1 <- c(cumsum(P),1) Now let x = runif() (uniform in

Re: [R] Append to outfile in R CMD BATCH mode

2010-03-11 Thread Turchin, Michael
So I have a semi-answer for myself. I don't think this way is preferable, but if you're going through the same thing as me, maybe it'll help. If you pass your desired outfile as an argument in '--args filename', you can redirect the output the following way: cmd_args = commandArgs() print (cmd

Re: [R] help about solving two equations

2010-03-11 Thread Shaoqiong Zhao
Hello Professor Ravi, I tried to load BB into R, but I got the following message: library("BB") Error in library("BB") : there is no package called 'BB' > library(BB) Error in library(BB) : there is no package called 'BB' Can you tell me why? Thanks a lot. Annie - Original Message -

Re: [R] help about solving two equations

2010-03-11 Thread Ravi Varadhan
You have to install it from CRAN before you can load it into your session. Ravi Varadhan, Ph.D. Assistant Professor, Division of Geriatric Medicine and Gerontology School of Medicine Johns Hopkins University Ph. (410) 502-2619

Re: [R] argument is of length zero

2010-03-11 Thread jim holtman
Test for the condition you are looking for. If the grep does not match, it returns a vector of length zero > a='hello world' > if (length(grep('hellow',a)) != 0) { + print("wow") + } else { + print("wow2") +} [1] "wow2" > On Thu, Mar 11, 2010 at 6:59 PM, Dan Joo wrote: > I am new to R, so

Re: [R] as.integer and indexes error

2010-03-11 Thread jim holtman
another way: > x <- c(1.1,2.1,3.1,4.1,5.1) > as.integer((x - round(x)) * 10) [1] 1 1 1 0 0 > as.integer((10 * x - round(10 * x, -1))) [1] 1 1 1 1 1 > 2010/3/11 Lilia Leticia Ramírez Ramírez > Hello All, > > I would like to report the following bug or maybe you can explain if I am > wrong. > >

Re: [R] as.integer and indexes error

2010-03-11 Thread jim holtman
FAQ 7.31 2010/3/11 Lilia Leticia Ramírez Ramírez > Hello All, > > I would like to report the following bug or maybe you can explain if I am > wrong. > > I am sampling from two different populations with weights. The two > populations have the same age groups and I want to distinguish where I a

[R] simple plot in ggplot2, wrong error bars

2010-03-11 Thread hpdutra
I was wondering if anyone could help me with this, simple problem. I am essentially following the example on Hadley's webpage (http://had.co.nz/ggplot2/geom_errorbar.html), but it still doesn't make any sense to me. df <- data.frame(trt = factor(c("intact", "intact", "removed", "removed")),

[R] as.integer and indexes error

2010-03-11 Thread Lilia Leticia Ramírez Ramírez
Hello All, I would like to report the following bug or maybe you can explain if I am wrong. I am sampling from two different populations with weights. The two populations have the same age groups and I want to distinguish where I am sampling from. That is why I am using a matrix such as: matrix a

[R] argument is of length zero

2010-03-11 Thread Dan Joo
I am new to R, so I beg your indulgence. > a='hello world' > if (grep('hellow',a)) { print("wow") } else { print("wow2") } Error in if (grep("hellow", a)) { : argument is of length zero What is the proper syntax to ensure that "wow2" gets printed? Thank you for your help! Dan [[alte

Re: [R] Problem installing new packages

2010-03-11 Thread Jim Burke
Never mind, thanks Jim Burke wrote: Hi everyone, Using R 2.10.1 on Windows Vista. DOWNLOADED PACKAGES DO NOT INSTALL. I expect to see them in C:\Program Files\R\R-2.10.1\library These files download (see below). And they are all in zip format. What am I doing wrong? Please help. All suggest

[R] Problem installing new packages

2010-03-11 Thread Jim Burke
Hi everyone, Using R 2.10.1 on Windows Vista. DOWNLOADED PACKAGES DO NOT INSTALL. I expect to see them in C:\Program Files\R\R-2.10.1\library These files download (see below). And they are all in zip format. What am I doing wrong? Please help. All suggestions appreciated. trying URL 'htt

[R] VAR with contemporaneous effects

2010-03-11 Thread Downey, Patrick
Hi, I would like to estimate a VAR of the form: Ay_t = By_t-1 + Cy_t-2 + ... + Dx_t + e_t Where A is a non-diagonal matrix of coefficients, B and C are matricies of coefficients and D is a matrix of coefficients for the exogenous variables. I don't think the package {vars} can do this because I

Re: [R] NAs and row/column calculations

2010-03-11 Thread RICHARD M. HEIBERGER
Jim, The next step for understanding what happens is to subset a complicated expression and see what its sub-pieces are doing. Since apply(a[!is.na(a)],2,sum) doesn't work, start by looking at each of the arguments to apply. You already verified that !is.na(a) gives what you want. Now take t

Re: [R] NAs and row/column calculations

2010-03-11 Thread Jim Bouldin
> > On 12/03/2010, at 11:25 AM, Jim Bouldin wrote: > > > > > I continue to have great frustrations with NA values--in particular > making > > summary calculations on rows or cols of a matrix containing them. For > > example, why does: > > > >> a = matrix(1:30,nrow=5) > >> is.na(a[c(1:2),c(3:4

Re: [R] NAs and row/column calculations

2010-03-11 Thread Rolf Turner
On 12/03/2010, at 11:25 AM, Jim Bouldin wrote: > > I continue to have great frustrations with NA values--in particular making > summary calculations on rows or cols of a matrix containing them. For > example, why does: > >> a = matrix(1:30,nrow=5) >> is.na(a[c(1:2),c(3:4)]);a > [,1] [,2] [

Re: [R] NAs and row/column calculations

2010-03-11 Thread Greg Snow
What do you expect a[!is.na(a)] to be? The a matrix has 30 elements, 5 rows, and 6 columns. You tell R to throw away 4 elements leaving you with 26, the computer (and most of the rest of us) doesn't know how to make a 5x6 matrix with only 26 elements. It could make a 2x13 or 13x2, but that is

[R] parse an HTML page with verbose error message (using XML)

2010-03-11 Thread Yihui Xie
I'm using the function htmlParse() in the XML package, and I need a little bit help on error handling while parsing an HTML page. So far I can use either the default way: # error = xmlErrorCumulator(), by default library(XML) doc = htmlParse("http://www.public.iastate.edu/~pdixon/stat500/";) # the

Re: [R] tm[,-1]

2010-03-11 Thread Ted Harding
On 11-Mar-10 22:12:47, Greg Snow wrote: >> -Original Message- >> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- >> project.org] On Behalf Of ManInMoon >> Sent: Thursday, March 11, 2010 4:22 AM >> To: r-help@r-project.org >> Subject: [R] tm[,-1] > [snip] >> Please don't tell me

Re: [R] Help Files Now Load in the Internet Browser?

2010-03-11 Thread Carl Witthoft
On 11/03/2010 12:21 PM, David Bapst wrote: > Hello, > I recently had to reinstall R on my windows machine, because MASS > mysteriously vanished from my packages list. Before, when I used > help(), the files would load in a Windows help window. Now, the help > files load in my internet browser, whi

[R] Append to outfile in R CMD BATCH mode

2010-03-11 Thread Turchin, Michael
Is there a way to append to the outfile when using R CMD BATCH? My code, right now, is: R CMD BATCH --slave --vanilla '--args place .2 -.1 .9 .6' StratificationSimulation example.output Everything else is working the way I'd like it. The first few lines of code of my script file are: options(

[R] NAs and row/column calculations

2010-03-11 Thread Jim Bouldin
I continue to have great frustrations with NA values--in particular making summary calculations on rows or cols of a matrix containing them. For example, why does: > a = matrix(1:30,nrow=5) > is.na(a[c(1:2),c(3:4)]);a [,1] [,2] [,3] [,4] [,5] [,6] [1,]16 NA NA 21 26 [2,]

[R] Statet on Eclipse: ${project_path} is empty

2010-03-11 Thread Paul
Hello, I'm tryign to use Statet on Eclipse on my Kubuntu Karmic PC. I've set everything up and I can start the R configuration, but the working directory is set to my home directory. If I set the start in directory to ${worspace_loc}/${project_path} I can't start the console, with an error

Re: [R] tm[,-1]

2010-03-11 Thread Greg Snow
> -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- > project.org] On Behalf Of ManInMoon > Sent: Thursday, March 11, 2010 4:22 AM > To: r-help@r-project.org > Subject: [R] tm[,-1] > [snip] > > > Please don't tell me to check the manual - I tried and fai

Re: [R] Ubunut + Eclipse + StatET: Console terminates upon error

2010-03-11 Thread Tom La Bone
I don't want to hijack the thread here, but since you mentioned "hover pop-up help" can you suggest a way to turn it OFF, totally and completely? Tom LaBone -- View this message in context: http://n4.nabble.com/Ubunut-Eclipse-StatET-Console-terminates-upon-error-tp1589479p1589800.html Sent from

Re: [R] combinations/ indexing a matrix

2010-03-11 Thread RICHARD M. HEIBERGER
res <- combn(4,2) result <- LETTERS[res] dim(result) <- dim(res) result ## Rich [[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] combinations/ indexing a matrix

2010-03-11 Thread Michael Friendly
For a package application, I want to generate all 1-way, or 2-way, ... combinations of factors, symbolically, as a matrix. E.g., all two-way terms among 4 factors. > factors <- LETTERS[1:4] > combn(4,2) [,1] [,2] [,3] [,4] [,5] [,6] [1,]111223 [2,]2343

Re: [R] cut.POSIXt misconception/feature/bug?

2010-03-11 Thread Brian Diggs
On 3/11/2010 11:52 AM, Brian Diggs wrote: I've included a patch against cut.POSIXt.Rd with these proposed changes. Apparently the patch didn't make it through, so I'm just pasting it below. -- Brian Diggs, Ph.D. Senior Research Associate, Department of Surgery, Oregon Health & Science Univer

Re: [R] Searching for option explanations

2010-03-11 Thread Turchin, Michael
Yep, looks like that is what I'm asking about. Didn't realize it! Thank you, exactly what I needed. ~Michael From: Charles C. Berry [cbe...@tajo.ucsd.edu] Sent: Thursday, March 11, 2010 3:37 PM To: Turchin, Michael Cc: r-help@r-project.org Subject: Re: [R]

Re: [R] Importing Time Series Data for an R Beginner

2010-03-11 Thread ManInMoon
z<-read.table("C:/yourfile.txt",header=TRUE,as.is=TRUE); zdates<-as.POSIXct(strptime(paste(z[,2],z[,3]), "%m/%d/%Y %H:%M:%S"),origin="1970-01-01" ); I would then convert z from a dataframe to a numeric matrix, and put zdates in there as numeric too. zm<-cbind(z[,1],as.numeric(zdates),z[,4]) I a

Re: [R] colname of ... arguments

2010-03-11 Thread ManInMoon
Thanks Duncan - that works perfectly. -- View this message in context: http://n4.nabble.com/colname-of-arguments-tp1588146p1589687.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/

Re: [R] Importing Time Series Data for an R Beginner

2010-03-11 Thread Cedrick W. Johnson
Actually I just learned something myself that you can do on the dataset *without* the additional step in Excel.. I changed the format in strptime to match the format (d'oh) and whala: x Subject Date Time Value 1 1 7/23/2003 13:05:0084 2 1 7/23/2003 13:10:0087

Re: [R] Importing Time Series Data for an R Beginner

2010-03-11 Thread Cedrick W. Johnson (CJ)
Hi Clay- You may want to look at both the XTS package, in addition to 'strptime' and 'as.POSIXct' When I get datasets in Excel, what I normally do is change the date (column) format to -mm-dd.. But that's due to my own shortcomings with date formatting in R. Here's a quick example: >

Re: [R] Searching for option explanations

2010-03-11 Thread Charles C. Berry
On Thu, 11 Mar 2010, Turchin, Michael wrote: Hey all, Sorry if this is redundant, but I can't figure out a good search query for either the mailing list, or google, to find an answer to this. Let's say I have a couple of R options I'm interested in learning more about, but their details are

Re: [R] logistic model diagnostics residuals.lrm {design}, residuals()

2010-03-11 Thread Chaudhari, Bimal
I am working on applying Sequential Multiple Decision Procedure to genetic association studies of complex disease. Province in 2000 (http://www.ncbi.nlm.nih.gov/pubmed/11108641) developed the method for QTL linkage and Province and Zhang extended it to association with quantitative traits in 2005.

[R] Searching for option explanations

2010-03-11 Thread Turchin, Michael
Hey all, Sorry if this is redundant, but I can't figure out a good search query for either the mailing list, or google, to find an answer to this. Let's say I have a couple of R options I'm interested in learning more about, but their details aren't explained in the command's help file. For exa

[R] Importing Time Series Data for an R Beginner

2010-03-11 Thread Clay Heaton
Hi, I'm trying to learn R for a project I'm working on. I know several programming languages, so I'm comfortable with the syntax. What I can't figure out is how to import the file of time series data that I have and parse it into individual series. The data was given to me in Excel, but I can o

Re: [R] Group by

2010-03-11 Thread ManInMoon
My point is this: if we do temp<-tDates aggregate(DF[,c('V2', 'V3')], list(format(temp, "%H:%M:00")), FUN = sum) Does agrregate still know it's refering to DF$V1 - and if so- how? -- View this message in context: http://n4.nabble.com/Group-by-tp1588694p1589600.html Se

Re: [R] cut.POSIXt misconception/feature/bug?

2010-03-11 Thread Brian Diggs
On 3/10/2010 11:26 PM, Petr PIKAL wrote: > Hi > > Thanks for clarification. Actually I knew that with first case I get some > data with NAs at the beginning and at the end. Maybe my English is not > good enough to understand that to get vector of dates split to several > chunks I need to put al

Re: [R] how does R compute Std. Error's?

2010-03-11 Thread Rnewb
ah yes, my mistake was dividing by sigma instead of multiplying... thank you very much sincerely, Rnewb -- View this message in context: http://n4.nabble.com/how-does-R-compute-Std-Error-s-tp1588537p1589657.html Sent from the R help mailing list archive at Nabble.com. _

Re: [R] Ubunut + Eclipse + StatET: Console terminates upon error

2010-03-11 Thread Ted Harding
On 11-Mar-10 19:19:26, Janko Thyson wrote: > [...] > First of, I'm still confused about Ubuntu's "sudo" way of doing things. > Not knowing how to authorize me as "root" when installing packages from > a R-script, I can't write on "/usr/local/lib/R/site-library" or > "/usr/lib/R/site-library". On t

Re: [R] How to take out the content of character string

2010-03-11 Thread Thomas Lumley
On Wed, 10 Mar 2010, Henrique Dallazuanna wrote: On Wed, Mar 10, 2010 at 7:50 PM, Thomas Lumley wrote: On Wed, 10 Mar 2010, baptiste auguie wrote: Hi, it's generally considered a bad practice but try this, eval(parse(text=AA)) library(fortunes) fortune(106) HTH, baptiste On 10 March 20

Re: [R] Ubunut + Eclipse + StatET: Console terminates upon error

2010-03-11 Thread Tobias Verbeke
Hi Janko, I'm not an rJava install expert (on all but my own system I often end up setting the appropriate environment variables related to Java manually before launching the R CMD INSTALL for the package), but with respect to the choice Rterm vs. RJ Console, I would strongly advise to use the RJ

Re: [R] Ubunut + Eclipse + StatET: Console terminates upon error

2010-03-11 Thread Tobias Verbeke
Hi Dirk, Janko, Dirk Eddelbuettel wrote: On 11 March 2010 at 19:19, Janko Thyson wrote: | I'm trying to set up Eclispe (3.5.1) with the StatET-Plugin (0.8.1) under | Ubuntu (Karmic) and found it strange that my console terminates every time | something in a script produces an arbitrary error (e

Re: [R] Ubunut + Eclipse + StatET: Console terminates upon error

2010-03-11 Thread Janko Thyson
Thanks for the quick reply. I was following your hint with "rJava", but I'm still a little lost. I maybe should have added that the console terminating happens when launching it as "Rterm", it works fine when running it as "RJ". However, I would like to use "Rterm". Here is what I did so far:

Re: [R] Calculate mean slope of a function

2010-03-11 Thread Rolf Turner
On 12/03/2010, at 4:27 AM, Antje Steller wrote: > Hallo, > hope you can help me with this question: > > I have calculated a function using f<-smooth.spline(data) and > approxfun(f). Now I want to calculate the mean slope of the resulting > function. > > Haven't found the right R command yet, ma

Re: [R] ggplot2: "varwidth"-equivalent for geom_boxplot?

2010-03-11 Thread hadley wickham
No this currently isn't possible - it would require changes to stat_boxplot to work. Hadley On Wed, Mar 10, 2010 at 9:12 AM, Johannes Graumann wrote: > Apologies. > > from the "boxplot" documentation: > "... if varwidth is TRUE, the boxes are drawn with widths proportional to the > square-roots

Re: [R] about IRT simulation

2010-03-11 Thread JLucke
Helen Your program makes no sense. Try the following script I <- 10 J <- 5 response <- matrix(0, 10, 5) #function for probability of response #revised but equivalent version of Helen's formula pij <- function(a,b,theta) {1/(1+exp(-a*(theta-b)))} a <- rnorm(J, 0.8, 0.04) a b <- rnorm(J, 0, 1

[R] Multiple comparisons with a mixed effects model

2010-03-11 Thread Sean Henderson
Hello, I have used R in the past to conduct multiple comparisons on standard linear models, but am a bit confused as to how to go about doing it with a mixed effects model. I am conducting a bioindication study using carabid beetles in which I have four treatment types (forest harvest types wi

Re: [R] Robust estimation of variance components for a nested design

2010-03-11 Thread Liaw, Andy
I believe Pinhiero et al published a paper in JCGS a few years back on the subject, modeling the random effects with t distributions. No software were publicly available, as far as I know. Andy From: S Ellison > Sent: Thursday, March 11, 2010 9:56 AM > To: r-help@r-project.org > Subject: [R] Ro

Re: [R] Ubunut + Eclipse + StatET: Console terminates upon error

2010-03-11 Thread Dirk Eddelbuettel
On 11 March 2010 at 19:19, Janko Thyson wrote: | I'm trying to set up Eclispe (3.5.1) with the StatET-Plugin (0.8.1) under | Ubuntu (Karmic) and found it strange that my console terminates every time | something in a script produces an arbitrary error (e.g. just calling a | missing variable, tryin

Re: [R] logistic model diagnostics residuals.lrm {design}, residuals()

2010-03-11 Thread Frank E Harrell Jr
Chaudhari, Bimal wrote: I am interested in a model diagnostic for logistic regression which is normally distributed (much like the residuals in linear regression with are ~ N(0,variance unknown). My understanding is that most (all?) of the residuals returned by residuals.lrm {design} either d

Re: [R] logistic model diagnostics residuals.lrm {design}, residuals()

2010-03-11 Thread Greg Snow
Why do you need a diagnostic that has properties from the normal? Logistic regression is based on binary (binomial distribution) data, not continuous data. Any transform that forced normality (even just under a given null hypothesis) would probably distort any real information that might be gl

[R] Ubunut + Eclipse + StatET: Console terminates upon error

2010-03-11 Thread Janko Thyson
Dear List, I'm trying to set up Eclispe (3.5.1) with the StatET-Plugin (0.8.1) under Ubuntu (Karmic) and found it strange that my console terminates every time something in a script produces an arbitrary error (e.g. just calling a missing variable, trying to perform an illegal operation etc.).

Re: [R] Failed install of package xlsReadWrite

2010-03-11 Thread Hans-Peter Suter
> Hi, all. I too got this error, and when I went to register the correct DLL > (thinking the one downloaded but not installed might have been the > development version) I got an error that the registration had failed. > > What I typed: > > C:\Program Files\R\R-2.10.0\library\xlsReadWrite\libs>regsv

[R] Bug in Cairo?

2010-03-11 Thread Lorenzo Isella
Dear All, I am not really an expert about visualization and plotting, but consider the code snippet at the end of this email. On my machine ((X)Ubuntu for the amd64 bit architecture, Cairo installed from Cran, R 2.10), the two plots (one with R basic graphics, the other generated using Cairo)

Re: [R] console window always on top

2010-03-11 Thread Robert M. Flight
I don't remember inputting anything like that previously, but that worked perfectly. Thank you. -Robert On Thu, Mar 11, 2010 at 13:12, Duncan Murdoch wrote: > On 11/03/2010 11:59 AM, Robert M. Flight wrote: >> >> In R on Windows (ver 7) I have somehow set the preferences for the R >> console win

Re: [R] Forecasting with Panel Data

2010-03-11 Thread Matthew Dowle
Ricardo, I see you got no public answer so far, on either of the two lists you posted to at the same time yesterday. You are therefore unlikely to ever get a reply. I also see you've been having trouble getting answers in the past, back to Nov 09, at least. For example no reply to "Credit M

Re: [R] Help Files Now Load in the Internet Browser?

2010-03-11 Thread Duncan Murdoch
On 11/03/2010 12:21 PM, David Bapst wrote: Hello, I recently had to reinstall R on my windows machine, because MASS mysteriously vanished from my packages list. Before, when I used help(), the files would load in a Windows help window. Now, the help files load in my internet browser, which actual

Re: [R] console window always on top

2010-03-11 Thread Duncan Murdoch
On 11/03/2010 11:59 AM, Robert M. Flight wrote: In R on Windows (ver 7) I have somehow set the preferences for the R console window to be always on top. I'm sure at the time I did this it seemed like a good idea, but in practice it is not. Unfortunately, I cannot remember where the setting is cha

[R] Fwd: function to create multiple matrices

2010-03-11 Thread Lanna Jin
Jim Holtman's solution generates a data frame that can be easily indexed by year: setwd("/r-help/2010-03-10") x <- read.csv("restored.csv", as.is=TRUE) require(reshape) x.m <- melt(x, id=c('Year', 'LocationID', 'SpeciesCode'), measure='PlotFreq') x.binary <- cast(x.m, Year + LocationID ~ SpeciesC

Re: [R] see the example and help me

2010-03-11 Thread Jonathan Christensen
Hi, On Thu, Mar 11, 2010 at 3:46 AM, chinna wrote: > > Hi Peter konings, > Sorry man the forecasted values i have given wrong > once again see my question and please give me the answer. > > > > This is the forecasted report that i get using the reporting tool cognos(BI > Reporting Too

Re: [R] Problem with rcmd SHLIB

2010-03-11 Thread denise xifaras
Thank you Duncan, the paths were first so that wasn't the problem, but when I changed to the directory of the file and then typed rcmd SHLIB it did work, like you said. Great news. Best, Denise --- On Thu, 3/11/10, Duncan Murdoch wrote: From: Duncan Murdoch Subject: Re: [R] Problem with rcm

[R] Help Files Now Load in the Internet Browser?

2010-03-11 Thread David Bapst
Hello, I recently had to reinstall R on my windows machine, because MASS mysteriously vanished from my packages list. Before, when I used help(), the files would load in a Windows help window. Now, the help files load in my internet browser, which actually is problematic because I always made use o

[R] Help Files Now Load in the Internet Browser?

2010-03-11 Thread David Bapst
Hello, I recently had to reinstall R on my windows machine, because MASS mysteriously vanished from my packages list. Before, when I used help(), the files would load in a Windows help window. Now, the help files load in my internet browser, which actually is problematic because I always made use o

Re: [R] using sprintf to pass a variable to a RMySQL query

2010-03-11 Thread alison waller
Hi all, I re-installed R and tcltk. I find some of the documentation misleading as it indicates that tcltk is included with R. And when you type library() it shows tcltk, even though it hasn't been installed. Anyways, I've decided to go with sprintf. I am having errors with my query criteria.

[R] console window always on top

2010-03-11 Thread Robert M. Flight
In R on Windows (ver 7) I have somehow set the preferences for the R console window to be always on top. I'm sure at the time I did this it seemed like a good idea, but in practice it is not. Unfortunately, I cannot remember where the setting is changed, and thus it is stuck this way. Does anyone k

Re: [R] which coefficients for a gam(mgcv) model equation?

2010-03-11 Thread Darren Norris
I have spent a few days trying to figure this from the reply out but am still stuck! I need the equation to reply to a request from a referee that was to: "show the specific estimating equation associated with the fitted line". the model I am running is (I hope the data frame is not necessary as I

Re: [R] Obtaining name of data frame used in a function argument

2010-03-11 Thread Henrique Dallazuanna
Try this: foo <- function(data)print(deparse(substitute(data))) foo(DF) On Thu, Mar 11, 2010 at 2:31 PM, Jason Baucom wrote: > I'm writing a function that can take a data.frame as an argument. I'd > like to be able to obtain the name of the data.frame and print it out > within the function. My c

[R] Obtaining name of data frame used in a function argument

2010-03-11 Thread Jason Baucom
I'm writing a function that can take a data.frame as an argument. I'd like to be able to obtain the name of the data.frame and print it out within the function. My current function looks like this: examineIt<-function(x) { print(nrow(x)) print(x[ceiling(runif(10)*nrow(x)),]) print(summary(x)

Re: [R] Help with aggregate and cor

2010-03-11 Thread James Marca
On Wed, Mar 10, 2010 at 07:48:45PM +, hadley wickham wrote: > > Run that function hourly with plyr > > > > output.hourly <- dlply(df.i1,"tshour",cor.dat) > > Why not > > output.hourly <- ddply(df.i1,"tshour",cor.dat) Doh! Because I didn't read the docs properly and missed it. Thanks, much n

[R] mixed-effects survival

2010-03-11 Thread HAKAN DEMIRTAS
Hi, What R libraries should I use to implement mixed effects models with continuous time and discrete-time survival data? What if I have two crossed random effects? I'd appreciate any help. Regards, Hakan Demirtas [[alternative HTML version deleted]] ___

[R] logistic model diagnostics residuals.lrm {design}, residuals()

2010-03-11 Thread Chaudhari, Bimal
I am interested in a model diagnostic for logistic regression which is normally distributed (much like the residuals in linear regression with are ~ N(0,variance unknown). My understanding is that most (all?) of the residuals returned by residuals.lrm {design} either don't have a well defined d

Re: [R] Can't convert list to matrix properly

2010-03-11 Thread Miguel Porto
see for yourself - AFAIK it'll just concatenate eveverything which is "atomic" into a vector, thus losing all the structure associated. Miguel On Thu, Mar 11, 2010 at 4:14 PM, anna wrote: > > Yes, definitely! so unlist() turns the list components into a vector? What > if > the component are vec

Re: [R] Can't convert list to matrix properly

2010-03-11 Thread anna
ok guys, thanks a lot! - Anna Lippel -- View this message in context: http://n4.nabble.com/Can-t-convert-list-to-matrix-properly-tp1589187p1589246.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

Re: [R] Can't convert list to matrix properly

2010-03-11 Thread Ivan Calandra
I would say so; it would make sense. Le 3/11/2010 17:16, anna a écrit : so I was getting ones because it converted the characters into numeric? - Anna Lippel -- Ivan CALANDRA PhD Student University of Hamburg Biozentrum Grindel und Zoologisches Museum Abt. Säugetiere Martin-Luther-Kin

Re: [R] Can't convert list to matrix properly

2010-03-11 Thread anna
so I was getting ones because it converted the characters into numeric? - Anna Lippel -- View this message in context: http://n4.nabble.com/Can-t-convert-list-to-matrix-properly-tp1589187p1589211.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] Can't convert list to matrix properly

2010-03-11 Thread anna
Yes, definitely! so unlist() turns the list components into a vector? What if the component are vectors, matrices etc? Thank you Miguel! - Anna Lippel -- View this message in context: http://n4.nabble.com/Can-t-convert-list-to-matrix-properly-tp1589187p1589209.html Sent from the R help mail

Re: [R] Can't convert list to matrix properly

2010-03-11 Thread Ivan Calandra
Hi! Try: myMatrix <- as.matrix(myDataFrame) Looking at ?data.matrix: "Return the matrix obtained by converting all the variables in a data frame to numeric mode". You could also do directly: myMatrix <- as.matrix(myList) Though you might need to transpose (see ?t) HTH, Ivan Le 3/11/2010 1

  1   2   >