[R] How to Code Random Nested Variables within Two-way Fixed Model in lmer or lme

2011-09-28 Thread Dave Robichaud
Hi All, I am frustrated by mixed-effects model! I have searched the web for hours, and found lots on the nested anova, but nothing useful on my specific case, which is: a random factor (C) is nested within one of the fixed-factors (A), and a second fixed factor (B) is crossed with the first fi

Re: [R] How does the survfit.coxph calculate the survival value?

2011-09-28 Thread koshihaku
Thank you very much! I am analyzing software stress test data using R, and fiting data by coxph. I think the survfit.coxph can give the estimated baseline survival S_0(t_i), and we can calculated the survival S(t_i) by using S_0(t_i) and the x(t_i). Then can I use the function lambda={S(t_(i-1))

Re: [R] How does the survfit.coxph calculate the survival value?

2011-09-28 Thread koshihaku
Dear Professor Terry Therneau, Sorry for another naive question about R. Some one suggested me to use mathematica to analyze Cox proportional hazard model. For example estimate the coefficients, and calculate the survival and hazard function. But I think that may be not possible, especially that a

Re: [R] survival analysis: interval censored data

2011-09-28 Thread Ruth Arias
Thanks for taking time to answer this De: Terry Therneau Para: David Winsemius .org> Enviado: miércoles 28 de septiembre de 2011 23:03 Asunto: Re: [R] survival analysis: interval censored data David,   Thanks for taking time to answer this.   When ther

Re: [R] htmlParse hangs or crashes

2011-09-28 Thread Jorge Cornejo
Hi, I been having the same problem all the afternoon, and I just realize that only happens when I use the R64 and is not crashing using the 32 bits version. This must be a bug in this R version. I hope this could helps. -- View this message in context: http://r.789695.n4.nabble.com/htmlParse-ha

Re: [R] How to Store the executed values in a dataframe & rle function

2011-09-28 Thread jim holtman
I only used textConnection for the sample data. Just put your file name in the read.table; e.g., x<-read.table("test.txt",sep='\t',header=TRUE,colClasses=c('character','integer','integer','numeric','numeric')) as you have in your email. I used 'x' in my code, so I replaced your 'm' with 'x'. T

Re: [R] Plotting Lines Through multiple groups

2011-09-28 Thread clara_eco
Thank you Eik Vettorazzi-2 That was exactly what I wanted! Regards Clara -- View this message in context: http://r.789695.n4.nabble.com/Plotting-Lines-Through-multiple-groups-tp3850099p3853753.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] Accessing data via url

2011-09-28 Thread moldovean
hi I think this already a closed topic since you figure it out yourself. but you can always try to fetch data from Google docs (first make the spreadsheet public) and then writing this snippet: library(RCurl) u="https://docs.google.com/spreadsheet/pub?hl=en_US&hl=en_US&key=0As6HUAxhy0Q7dDB0bjh4T2

[R] PCA: prcomp rotations

2011-09-28 Thread Colin Wahl
Hi all, I think I may be confused by different people/programs using the word rotation differently. Does prcomp not perform rotations by default? If I understand it correctly retx=TRUE returns ordinated data, that I can plot for individual samples (prcomp()$x: which is the scaled and centered (rot

Re: [R] Testing for arguments in a function

2011-09-28 Thread Paul Johnson
On Mon, Sep 26, 2011 at 2:39 PM, Gene Leynes wrote: > I don't understand how this function can subset by i when i is missing > > ## My function: > myfun = function(vec, i){ >    ret = vec[i] >    ret > } > > ## My data: > i = 10 > vec = 1:100 > > ## Expected input and behavior: > myfun(vec, i)

Re: [R] Multiplying a list of matrices with a vector

2011-09-28 Thread R. Michael Weylandt
Untested: mapply('*', LL, vec) Those should be backticks but I can't type them on my phone Michael On Sep 28, 2011, at 6:04 PM, "Mendolia, Franco" wrote: > Hi all! > > I have a list of matrices and I want to multiply the ith element of the list > with the ith element of a another vector. Th

[R] Multiplying a list of matrices with a vector

2011-09-28 Thread Mendolia, Franco
Hi all! I have a list of matrices and I want to multiply the ith element of the list with the ith element of a another vector. That is, > LL <- list(A=diag(3),B=diag(3),C=diag(3)) > vec <- 1:3 > for(i in 1:3) + { + LL[[i]] <- LL[[i]]*vec[i] + } > LL $A [,1] [,2] [,3] [1,]100 [

Re: [R] survival analysis: interval censored data

2011-09-28 Thread Terry Therneau
David, Thanks for taking time to answer this. When there are interval censored data, computation of the MLE first finds a minimal number of time points such that every interval with a death contains one of those points. Those are the points at which the final curve can have a jump. The alg

Re: [R] Adding axis to an ellipse: "ellipse" package

2011-09-28 Thread Rolf Turner
On 28/09/11 20:34, Antoine wrote: Thanks a lot Rolf, I knew it would be possible to do it that way but I was just curious to know if the ellipse package was offering such a feature. Thanks again for you help! Well, since the help for "ellipse" makes no mention of such a facility it is *highly*

Re: [R] dump.frames, debugger and the "..." argument

2011-09-28 Thread Duncan Murdoch
On 28/09/2011 12:25 PM, Jannis wrote: dummyFunct = function(a, ...) { b = 2* a c = d # should cause error return(b) } options(error = quote(dump.frames(dumpto = "last.dump", to.file = TRUE))) dummyFunct(1) load("last.dump.rda") debugger(last.dump) # selection of call 1 causes

Re: [R] survival analysis: interval censored data

2011-09-28 Thread David Winsemius
On Sep 28, 2011, at 10:56 AM, Ruth Arias wrote: hallo terry: I attached araceae data set, The usual survival analysis via the Kaplan-Meier method only make estimates at the time of events. When you tabulate your data, you see that there were no events for the missing (starting) "time"

[R] compare proportions

2011-09-28 Thread array chip
Hi all, I asked this yesterday, but hadn't got any response yet. Understand this is not pure R technical question, but more of statistical. With many statistical experts in the list, I would appreciate any suggestions... Many thanks John -- Hi,

Re: [R] Wilcox test and data collection

2011-09-28 Thread Jean V Adams
Francesca Pancotto wrote on 09/28/2011 10:23:17 AM: > > Dear Contributors > I have a problem with the collection of data from the results of a test. > I need to perform a comparative test over groups of data , recall the value > of the pvalue and create a table. > My problem is in the way to repl

Re: [R] Robust covariance matrix with NeweyWest()

2011-09-28 Thread Achim Zeileis
On Wed, 28 Sep 2011, Andreas Klein wrote: Dear R-users, I would like to compute a robust covariance matrix of two series of realizations of random variables: ###Begin Example### data <- cbind(rnorm(100), rnorm(100)) model <- lm(data ~ 1) vcov(model) library(sandwich) NeweyWest(model) #prod

Re: [R] Error: could not find function

2011-09-28 Thread Jeff Newmiller
Then don't define BPGC inside another function. --- Jeff Newmiller The . . Go Live... DCN: Basics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#.. Playing Research Engineer (Solar/Batteries O.O#. #.O#. with /Software/Emb

[R] Error: could not find function

2011-09-28 Thread Franckx Laurent
Dear all I have written a function, "calibrateCES", in which a function is called, "BPGC", which was written in the enclosure of "calibrateCES". Until the most recent version of my program, "calibrateCES" always used "BPGC" as planned. Following a modification which does not affect "BPGC" direc

Re: [R] How to Store the executed values in a dataframe & rle function

2011-09-28 Thread viritha k
Hi Jim, Thanks for the reply, ok but I dont want to use textConnection and paste each line but want the input to be read from a file like m<-read.table("test.txt",sep='\t',header=TRUE,colClasses=c('character','integer','integer','numeric','numeric'). So how do I incorporate that in your code. Than

Re: [R] How to Store the executed values in a dataframe & rle function

2011-09-28 Thread viritha k
Hi, This is the code that I wrote for 3 samples: code: >m<-read.table("test.txt",sep='\t',header=TRUE,colClasses=c('character','integer','integer','numeric','numeric','numeric')) > s<-data.frame(c(rle(m$Sample1)[[2]],rle(m$Sample2)[[2]],rle(m$Sample3)[[2]]),c(rle(m$Sample1)[[1]],rle(m$Sample2)[[1]]

[R] svd (via MFA): All coordinates fall on straight lines?

2011-09-28 Thread Pundurs, Mark
Applying the svd function to my data by way of the FactoMineR package's MFA function: dfmfa <- MFA(df, group=c(2,96), type=c("n","c")) the result is that all my data points fall on one of 8 straight parallel lines when projected onto any two axes, e.g., points(dfmfa$ind$coord[, c(1, 2)]) Furt

[R] Robust covariance matrix with NeweyWest()

2011-09-28 Thread Andreas Klein
Dear R-users, I would like to compute a robust covariance matrix of two series of realizations of random variables: ###Begin Example### data <- cbind(rnorm(100), rnorm(100)) model <- lm(data ~ 1) vcov(model) library(sandwich) NeweyWest(model) #produces an error ###End Example### NeweyWest()

[R] survexp with large dataframes

2011-09-28 Thread Mike Harwood
Hello, and thank you in advance. I would like to capture the expected survival from a coxph model for subjects in an observational study with recurrent events, but the survexp statement is failing due to memory. I am using R version 2.13.1 (2011-07-08) on Windows XP. My objective is to plot the

Re: [R] How to Store the executed values in a dataframe & rle function

2011-09-28 Thread jim holtman
The solution that I sent will handle the 150 different samples; just list the column names in the argument to the top 'lapply'. You don't need the 'rle' in my approach. On Wed, Sep 28, 2011 at 2:13 PM, viritha k wrote: > Hi, > This is the code that I wrote for 3 samples: > code: >>m<-read.table(

Re: [R] number of items to replace is not a multiple of replacement length

2011-09-28 Thread Jean V Adams
dunner wrote on 09/28/2011 08:43:32 AM: > > Please help with this error message > > drugbook is an 885 x 32 dataframe > > >names(drugbook) > > [1] "DRUG1" "DRUG2" "DRUG3" "DRUG4" "DRUG5" > [6] "DRUG6" "DRUG7" "DRUG8" "DRUG9" "DRUG10" > [11] "DRUG11"

Re: [R] how to solve a simple discrete Bayesian Belief Network?

2011-09-28 Thread Marcio Pupin Mello
I found a solution using the gRain package... see (but using another example).. I studied a little (I mean "a lot") and found out a solution. Then I decided to post here aiming to help people who are interested... The solution uses the "gRain" package... but because one dependence (the "graph"

Re: [R] compute probabilities on a Bayesian Network (SOLVED)

2011-09-28 Thread Marcio Pupin Mello
I studied a little (I mean "a lot") and found out a solution. Then I decided to post here aiming to help people who are interested... The solution uses the "gRain" package... but because one dependence (the "graph" package) has been removed from the CRAN repository you have to use the follow scr

Re: [R] Password protected R Repository

2011-09-28 Thread Stefan Petersson
> >> > > > > The helpfiles for 'download.file' was not that helpful. But maybe it's just me > > not being able to read them correctly. > > Yes, looks like this is the case. > > > I tried to call install.packages with the 'method=wget', and hoped for a > > username and password dialog. But no luc

Re: [R] Handling missing values

2011-09-28 Thread David Winsemius
On Sep 28, 2011, at 11:49 AM, Samir Benzerfa wrote: Hi everyone, I've got a question concerning missing values in R. I'm looking for an R code which removes all NA values in my data.frame. I found many answers about how to remove rows or columns which contain NA's. My problem however

Re: [R] using the system command

2011-09-28 Thread William Dunlap
system(wait=FALSE, command) means to return to R without waiting for the command to finish. E.g., on Linux with the following function f <- function (seconds, wait) { tf <- tempfile() on.exit(unlink(tf)) system(sprintf("(sleep %d ; date) > '%s'", seconds, tf), wait =

Re: [R] how to get old packages to work on R 2.12.1

2011-09-28 Thread Richard M. Heiberger
Joe, Most firewall issues can be resolved by entering setInternet2(use = TRUE) prior to the update.packges call. Rich On Wed, Sep 28, 2011 at 11:23 AM, Joseph Boyer wrote: > Many thanks for all the suggestions. > > For me, the update.packages command will not work behind the firewall at my

Re: [R] removing outliers in non-normal distributions

2011-09-28 Thread Christian Hennig
Dear Ben, not specifically an R-related response, but the best "philosophy" of defining outliers, as far as I'm concerned, you'll find in Davies and Gather, "The identification of multiple outliers", JASA 1993. The idea is that you can only properly define what an outlier is relative to a r

Re: [R] fGarch - Fitting and APARCH-Modell with fixed delta

2011-09-28 Thread Jean-Christophe BOUËTTÉ
Hi there, an answer from someone who's not an expert in the field but used to play around with time series: The action of simulating a process using with input parameters then estimating the parameters is not an invariant, especially when the process involves nonlinearities. Did you try increasing

[R] using the system command

2011-09-28 Thread Data Analytics Corp.
Hi, I started playing around with a function for using StatTransfer (version 10) for importing data. This started as a simple task but it's not working and so now I'm very frustrated. I'm using R version 2.13 on Windows 7. The function, called fn.importData, is: function(file = N

[R] Handling missing values

2011-09-28 Thread Samir Benzerfa
Hi everyone, I've got a question concerning missing values in R. I'm looking for an R code which removes all NA values in my data.frame. I found many answers about how to remove rows or columns which contain NA's. My problem however is a bit different. I have a list of vectors. Each vector

Re: [R] How to Store the executed values in a dataframe & rle function

2011-09-28 Thread jim holtman
Here one approach: > x <- read.table(textConnection("Chr start end sample1 sample2 + chr2 9896633 9896683 0 0 + chr2 9896639 9896690 0 0 + chr2 14314039 14314098 0 -0.35 + chr2 14404467 14404502 0 -0.35 + chr2 14421718 14421777 -0.43 -0.35 + chr2 16031710 16031769 -0.43 -0.35 + chr2 16036178 16036

[R] number of items to replace is not a multiple of replacement length

2011-09-28 Thread dunner
Please help with this error message drugbook is an 885 x 32 dataframe >names(drugbook) [1] "DRUG1" "DRUG2" "DRUG3" "DRUG4" "DRUG5" [6] "DRUG6" "DRUG7" "DRUG8" "DRUG9" "DRUG10" [11] "DRUG11" "DRUG12" "DRUG13" "DRUG14" "DRUG15"

[R] Rle function to expand for many samples

2011-09-28 Thread sujitha
Dear R experts, code: >m<-read.table("test.txt",sep='\t',header=TRUE,colClasses=c('character','integer','integer','rep('numeric',150)) > s<-data.frame(c(rle(m$Sample1)[[2]],rle(m$Sample2)[[2]],rle(m$Sample3)[[2]]),c(rle(m$Sample1)[[1]],rle(m$Sample2)[[1]],rle(m$Sample3)[[1]])) > names(s)=c("Values"

[R] generic argument passing to plot function

2011-09-28 Thread statquant2
Hello I am trying to write a function that would plot timeseries easily... I aim at plotting two time-series on 2 different y axis sharing the same x-axis I succeded in doing so: plotTimeSerie(x,y,y2,[a lot of other args]){ ... plot() axis.POSIXct(side=1) #here I build the x-axis points() #here

Re: [R] read.csv behaviour

2011-09-28 Thread Jim Lemon
On 09/28/2011 09:23 AM, Mehmet Suzen wrote: This might be obvious but I was wondering if anyone knows quick and easy way of writing out a CSV file with varying row lengths, ideally an initial data read from a CSV file which has the same format. See example below. I found it quite strange that

[R] cointegration test

2011-09-28 Thread upananda pani
Dear All, I am looking for a cointegration relationship between Spot and Future Price of commodites. The problem i am facing follows: 1. After estimating by Engle-Grranger Method, i found that the residuals are stationary at their level I (o), which is required to fulfill the cointegration test.

Re: [R] GAMs in R : How to put the new data into the model?

2011-09-28 Thread pigpigmeow
For example: GAMs and after stepwise regression: cod<-gam(newCO~RH+s(solar,bs="cr")+windspeed+s(transport,bs="cr"),family=gaussian (link=log),groupD,methods=REML) I used 10 year meterorology data (2000-2010) to form equation of concentration of carbon monoxide. NOW, I have 2011 meteorology data,

[R] autocorrelation problem with cointegration

2011-09-28 Thread upani1982
Dear All, I am looking for a cointegration relationship between Spot and Future Price of commodites. The problem i am facing follows: 1. After estimating by Engle-Grranger Method, i found that the residuals are stationary at their level I (o), which is required to fulfill the cointegration test.

[R] fGarch - Fitting and APARCH-Modell with fixed delta

2011-09-28 Thread Bogey
Hi there, I'm trying to fit a GJR-GARCH Model using fGarch. I wanted to try that by fitting an APARCH model with a fixed delta of 2 and a non-fixed gamma. So I was simply trying to use: spec <- garchFit(~aparch(1,1),data=garchSim(),delta=2) coef(spec) And sometimes, it's working like a charm and

[R] removing outliers in non-normal distributions

2011-09-28 Thread Ben qant
Hello, I'm seeking ideas on how to remove outliers from a non-normal distribution predictor variable. We wish to reset points deemed outliers to a truncated value that is less extreme. (I've seen many posts requesting outlier removal systems. It seems like most of the replies center around "why do

Re: [R] dump.frames, debugger and the "..." argument

2011-09-28 Thread Jannis
Well, its 2.10, a slightly old version. I know that I am advised to upgrade to the current version. Unfortunately the installed version on the machine I am using is out of my reach. The reproducible example would be: dummyFunct = function(a, ...) { b = 2* a c = d # should cause err

Re: [R] inset one map on top of another map

2011-09-28 Thread Jean V Adams
Thank you, Ray! That worked. Thank you also, Yihui. I tried your subplot() suggestion, but couldn't get it to work with a map() on a map() Jean Ray Brownrigg wrote on 09/27/2011 07:26:34 PM: > > On Wed, 28 Sep 2011, Jean V Adams wrote: > > I want to overlay a small inset map on top of ano

Re: [R] Question concerning Box.test

2011-09-28 Thread R. Michael Weylandt
Well, you could to the following to throw out the NAs on a column basis before being passed to Box.test" apply(P, 2, function(x) Box.test(na.omit(x))$p.value) and that probably will work for you. This will only throw out the NAs in each column and won't cancel across columns. However, all the sta

Re: [R] dump.frames, debugger and the "..." argument

2011-09-28 Thread Duncan Murdoch
On 28/09/2011 9:59 AM, Jannis wrote: Dear List, i run R non interactively and use option(error = dump.frames) to reconstruct the cause of errors for debugging. One of the functions in the call stack however uses the "..." (dot dot dot) argument. When I run debugger() and try to browse to this

Re: [R] how to get old packages to work on R 2.12.1

2011-09-28 Thread Joseph Boyer
Many thanks for all the suggestions. For me, the update.packages command will not work behind the firewall at my workplace. But the respondents have given me more than enough suggestions to work with. __ R-help@r-project.org mailing list https://stat.

Re: [R] Download statistics for a package

2011-09-28 Thread Uwe Ligges
On 28.09.2011 16:10, Ravi Varadhan wrote: Hi, How can I get information on how many times a particular package has been downloaded from CRAN? You cannot since I guess not even all mirrors will have logs and there is no aggregation of mirror logs happening nor is it clear if we can use mir

[R] Wilcox test and data collection

2011-09-28 Thread Francesca Pancotto
Dear Contributors I have a problem with the collection of data from the results of a test. I need to perform a comparative test over groups of data , recall the value of the pvalue and create a table. My problem is in the way to replicate the analysis over and over again over subsets of data accord

Re: [R] Password protected R Repository

2011-09-28 Thread Uwe Ligges
On 28.09.2011 15:51, Stefan Petersson wrote: Prof Brian Ripley stats.ox.ac.uk> writes: Who said that RCurl::getURL worked with install.packages? (At least, I assume this is from RCurl: you did not mention it.) install.packages() first calls available.packages(), and that uses download.fil

Re: [R] survival analysis: interval censored data

2011-09-28 Thread Ruth Arias
hallo terry: I attached araceae data set, when I use this: surara<-survfit(Surv(time,time2,event)~categoria) Call: survfit(formula = Surv(time, time2, event) ~ categoria)     records n.max n.start events median 0.95LCL 0.95UCL categoria=C  94    63   0 21 NA  NA 

Re: [R] GLMER Syntax Question

2011-09-28 Thread Ben Bolker
Ubuntu Diego gmail.com> writes: > I was wondering is someone can explain me the differences > between these (random slopes and intercept) models > > model1 <- glmer(output~A+B+C+(A+B+C | F) ) > model2 <- glmer(output~A+B+C+(A | F)+(B | F)+(C | F) > You should ask this question on the r-sig-

[R] GLMER Syntax Question

2011-09-28 Thread Ubuntu Diego
I was wondering is someone can explain me the differences between these (random slopes and intercept) models model1 <- glmer(output~A+B+C+(A+B+C | F) ) model2 <- glmer(output~A+B+C+(A | F)+(B | F)+(C | F) Thanks. __ R-help@r-project.org mailing list

[R] Download statistics for a package

2011-09-28 Thread Ravi Varadhan
Hi, How can I get information on how many times a particular package has been downloaded from CRAN? Thanks, Ravi. --- Ravi Varadhan, Ph.D. Assistant Professor, Division of Geriatric Medicine and Gerontology School of Medicine Johns Hopkins Uni

Re: [R] survival analysis: interval censored data

2011-09-28 Thread Terry Therneau
You have still not given me enough information to reproduce your problem. "Why doesn't it include all years?" I have no way of knowing, since we have no data. --- begin included message -- halo david when I use type= 'interval' Call: survfit(formula = Surv(ingreso, fecha, estado, type = "inter

[R] dump.frames, debugger and the "..." argument

2011-09-28 Thread Jannis
Dear List, i run R non interactively and use option(error = dump.frames) to reconstruct the cause of errors for debugging. One of the functions in the call stack however uses the "..." (dot dot dot) argument. When I run debugger() and try to browse to this functions' environment I get the foll

Re: [R] Not saving plot

2011-09-28 Thread Joel
You sir are a hero! It works now thanks to your fast and accurate answer. Thanks for the help. //joel -- View this message in context: http://r.789695.n4.nabble.com/Not-saving-plot-tp3850981p3851331.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] How does the survfit.coxph calculate the survival value?

2011-09-28 Thread Terry Therneau
The answers to your questions consume an entire chapter of my book, so it is difficult to write a reasonable email response. When there are time dependent covariates, the creation and interpretation of a survival curve is particularly subtle. The survfit.coxph routine calculates the usual estima

Re: [R] Not saving plot

2011-09-28 Thread Rich Shepard
On Wed, 28 Sep 2011, Joel wrote: Seems to have something todo with barchart. Cuz if I just change it to plot it works. But I want to use barchart due to the graphical advantages so do anyone have an ide. Joel, Perhaps. Do you want to save your figure to disk as a .pdf, .jpg, or .png? If

Re: [R] Password protected R Repository

2011-09-28 Thread Stefan Petersson
Prof Brian Ripley stats.ox.ac.uk> writes: > > Who said that RCurl::getURL worked with install.packages? > (At least, I assume this is from RCurl: you did not mention it.) > > install.packages() first calls available.packages(), and that uses > download.file to get the PACKAGES[.gz] file. It t

Re: [R] Not saving plot

2011-09-28 Thread Ben Tupper
On Sep 28, 2011, at 8:19 AM, Joel wrote: > Hi > > I got a strange problem. > > I got this code: > poc<-function(USER="nana",REGISTRY="nana",...){ > require(RMySQL) > require(R2HTML) > require(lattice) > > ... (removed the dataprocessing) > > > toReturn=capture.output(HTML(as.title("En liten

Re: [R] Not saving plot

2011-09-28 Thread Joel
Seems to have something todo with barchart. Cuz if I just change it to plot it works. But I want to use barchart due to the graphical advantages so do anyone have an ide. -- View this message in context: http://r.789695.n4.nabble.com/Not-saving-plot-tp3850981p3851255.html Sent from the R help ma

Re: [R] Asking an old housekeeping question...

2011-09-28 Thread S Ellison
??dependencies shows up (on my system) tools::package.dependencies tools::dependsOnPkgs The first looks for dependencies; the second for reverse dependencies. > -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Brian Lunergan >

[R] Asking an old housekeeping question...

2011-09-28 Thread Brian Lunergan
My bad. I know I've asked this some time back but I'm afraid I've lost the post along the way and am not having much luck searching the net. Don't want to pad my R setup with orphan packages. Is there a small snippet of code or even a single command that would allow me to check the packages I do u

Re: [R] Negative Quartile

2011-09-28 Thread Jeff Newmiller
This mailing list is about R help, not basic statistics help. Your message is full of what appear to be misconceptions, though it could be just something basic that affects the whole thing. You should consult with a statistician locally for most effective communication. -

[R] Not saving plot

2011-09-28 Thread Joel
Hi I got a strange problem. I got this code: poc<-function(USER="nana",REGISTRY="nana",...){ require(RMySQL) require(R2HTML) require(lattice) ... (removed the dataprocessing) toReturn=capture.output(HTML(as.title("En liten rapport!"),file="",align="center")) fileDir<-paste("/home/joel/tmpR/rik

[R] how to solve a simple discrete Bayesian Belief Network?

2011-09-28 Thread Marcio Pupin Mello
Can somebody save-me? Thanks in advance! #R script: #trying to find out how solve a discrete Bayesian Belief Network. #option: using 'catnet' package #BEGIN library(catnet) cnet <- cnNew(nodes = c("a", "b", "c"), cats = list(c("1", "2"), c("1", "2"), c("1", "2")), parents = list(NULL, c(1), c(1

[R] Problems using the 'HPloglik' function in the SDE package

2011-09-28 Thread Steven Craig
Hello all, I am trying to produce the closed-form Ait-Sahalia approximation to the log-likelihood function of a diffusion process but the function arguments I am passing to the function result in NaN being returned. I've checked the 'Transform','S' and 'M' functions and the problem doesn't seem to

Re: [R] apply lm function to dataset split by two variables

2011-09-28 Thread Michael Dewey
At 09:41 28/09/2011, Elena Guijarro wrote: Dear all, I am not fluent in R and am struggling to 1) apply a lm to a weight-size dataset, thus the model has to run separately for each species, each year; 2) extract coefs, r-squared, n, etc. The data look like this: yearsps cm w 2009

Re: [R] apply lm function to dataset split by two variables

2011-09-28 Thread Dennis Murphy
Hi: Here's one way to do it with the plyr package: dd <- read.table(textConnection(" yearsps cm w 200950 16 22 200950 17 42 200950 18 45 200951 15 45 200951 16 53 200951 17 73 201050 15

Re: [R] Data transformation & cleaning

2011-09-28 Thread Jim Lemon
On 09/28/2011 01:13 PM, pip56789 wrote: Hi, I have a few methodological and implementation questions for ya'll. Thank you in advance for your help. I have a dataset that reflects people's preference choices. I want to see if there's any kind of clustering effect among certain preference choices

[R] Printing an xtable with type = html

2011-09-28 Thread David Scott
I have been playing around with producing tables using xtable and the type = "html" argument when printing. For example, if xtbl is the output of a dataframe which has been run through xtable, using the command: print(xtbl, type = "html", html.table.attributes = "border = '1', align = '

Re: [R] Password protected R Repository

2011-09-28 Thread Prof Brian Ripley
Who said that RCurl::getURL worked with install.packages? (At least, I assume this is from RCurl: you did not mention it.) install.packages() first calls available.packages(), and that uses download.file to get the PACKAGES[.gz] file. It then calls download.file to get the packages. So pleas

Re: [R] Password protected R Repository

2011-09-28 Thread Stefan Petersson
inizio.se> writes: > > > Hi, > > I've set up a very simple R repository. Just a single source > library. Everything works fine. I can install the package on my client > using: > > install.packages(repos='http://www.myServer.se/myRepo/', > pkgs='myLib', dep=TRUE) > > However, I want to prote

[R] Password protected R Repository

2011-09-28 Thread stefan . petersson
Hi, I've set up a very simple R repository. Just a single source library. Everything works fine. I can install the package on my client using: install.packages(repos='http://www.myServer.se/myRepo/', pkgs='myLib', dep=TRUE) However, I want to protect the repo, so I use a .htaccess, placed di

Re: [R] Plotting Lines Through multiple groups

2011-09-28 Thread Eik Vettorazzi
Hi Clara, are there repeated measures of an animal on the same day? Otherwise I did not get the point of the level of aggregation. Using lattice you can do sth like xyplot(Cort~Day,groups=Animal,type=c("p","a"),data=df) but with your given data this just connects the raw points hth. Am 28.09.20

Re: [R] metaMDS

2011-09-28 Thread Gavin Simpson
On Fri, 2011-09-23 at 12:43 -0500, Jean V Adams wrote: > Lineth Contreras wrote on 09/23/2011 11:35:10 AM: > > > > Hello R-user community, > > > > I am applying the function metaMDS. However, I would like to know if > there > > is any option to export the data I got from the axis as a data frame

[R] apply lm function to dataset split by two variables

2011-09-28 Thread Elena Guijarro
Dear all, I am not fluent in R and am struggling to 1) apply a lm to a weight-size dataset, thus the model has to run separately for each species, each year; 2) extract coefs, r-squared, n, etc. The data look like this: yearsps cm w 200950 16 22 200950 17

Re: [R] OT: (quasi-?) separation in a logistic GLM

2011-09-28 Thread lincoln
I know that this is a quite old post but I am dealing with a similar warning message and, also after reading all the posts here, I am still in doubt with what I should do with my analysis. I have a dataset where the binary response variable is sex, and the predictors are several variables (they ar

[R] Fitting a GLM: Problems with ns & date functions

2011-09-28 Thread Cal
Hello, I am attempting to use R as part of a time-series analysis investigating the influence of meteorological factors on health outcomes. The test csv dta file that i am working with contains a complete daily set of the variables ‘DATE’, ‘ADMINS’, ‘NOX’, ‘TEMP’ across a 5 year period (1827 days)

Re: [R] Plotting Lines Through multiple groups

2011-09-28 Thread Timothy Bates
if it was me, i'd do library("ggplot2") df <- read.table(pipe("pbpaste"), header=T, sep='\t') df$Animus=factor(df$Animal, labels=c("Tom", "Dick", "Harry")) qplot(Day, Cort, data = df, geom="line", colour=Animus) On Sep 28, 2011, at 8:03 AM, clara_eco wrote: > Hi I have data in the following forma

Re: [R] Envfit, inconsistant result?

2011-09-28 Thread Jari Oksanen
rodrock gmail.com> writes: > I am using the envfit function over an ordination of floristic data. > > The problem is that every time that I run it changes the results. Sometimes > dramatically, selecting variables that the first time were not significant. > I do not get what could be the proble

Re: [R] Matrix and list indices

2011-09-28 Thread fernando.cabrera
Thanks Michael it works! Have to say it is amazing what you can do in R with a few lines (a line in this case) of code. Fernando From: R. Michael Weylandt [mailto:michael.weyla...@gmail.com] Sent: 27. september 2011 15:43 To: Cabrera, Fernando Álvarez Subject: Re: [R] Matrix and list indices U

Re: [R] Adding axis to an ellipse: "ellipse" package

2011-09-28 Thread Antoine
Thanks a lot Rolf, I knew it would be possible to do it that way but I was just curious to know if the ellipse package was offering such a feature. Thanks again for you help! Antoine Le 28 sept. 11 à 09:30, Rolf Turner-3 [via R] a écrit : > On 28/09/11 04:53, Antoine wrote: > > Dear list me

[R] Plotting Lines Through multiple groups

2011-09-28 Thread clara_eco
Hi I have data in the following format Cort Day Animal 230 1 273 1 240 2 271 2 342 2 303 2 244 2 200 3 241 3 282 3 344 3 etc. It is measured across time(day) however no every individual is measured th

Re: [R] Data transformation & cleaning

2011-09-28 Thread Weidong Gu
Seems your questions belong to rule mining for frequent item sets. check arules package Weidong Gu On Tue, Sep 27, 2011 at 11:13 PM, pip56789 wrote: > Hi, > > I have a few methodological and implementation questions for ya'll. Thank > you in advance for your help. I have a dataset that reflects

[R] Negative Quartile

2011-09-28 Thread Damian Abalo
Hello, I have a doubt, but it is more statistic than just about R: How the people deal usually with negative percentile and quartile? In my concrete case, I want to know the distribution of an error, so the nearest it is to 0 the better (I think it would be optimun to have the nearest values to 0 i

Re: [R] Adding axis to an ellipse: "ellipse" package

2011-09-28 Thread Rolf Turner
On 28/09/11 04:53, Antoine wrote: Dear list members, This might be a silly question but I just can't figure it out. I am using the "ellipse" package on covariance matrices. I would simply like to plot my ellipses WITH its two axis ploted as well. These axis represents the 2 eigen vectors of my m