Re: [R] graphical parameters and acf

2007-11-12 Thread Bernardo Rangel Tura
On Sun, 2007-11-11 at 21:32 -0600, David Kaplan wrote: Hi, I'm plotting 5 autocorrelation plots on one page. Using par(mfrow=c(3,2)) everything comes out fine. However, for each plot, it prints a title on top of each plot that says Series followed by the variable name used in the plot.

[R] specifying decimal places

2007-11-12 Thread raymond chiruka
hie how do I specify the number of decuimal places for my calulations thanks __ [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] interpretation for multiple regression

2007-11-12 Thread Irene Mantzouni
Hi! Yes, I think that you understood it right and made it clear enough to me too! thank you! :) Από: Daniel Malter [mailto:[EMAIL PROTECTED] Αποστολή: Κυρ 11/11/2007 10:55 μμ Προς: 'Rolf Turner'; Irene Mantzouni Κοιν.: [EMAIL PROTECTED] Θέμα: AW: [R]

Re: [R] specifying decimal places

2007-11-12 Thread Katharine Mullen
Your calculations are done with a precision that depends on your machine. I guess that you want to know how to _print_ more decimal digits. See how many digits you print now with getOption(digits) Change this with, e.g., options(digits=12) On Mon, 12 Nov 2007, raymond chiruka wrote: hie

Re: [R] specifying decimal places

2007-11-12 Thread Jim Lemon
raymond chiruka wrote: hie how do I specify the number of decuimal places for my calulations thanks Hi raymond, If you mean the number of decimal places to display, options(digits=...) Jim __ R-help@r-project.org mailing list

Re: [R] slowness of auto.arima() from package forecast (was Execution time very high in linux)

2007-11-12 Thread Joao Santos
Hello Bernardo, Thanks for replying but I think that you miss a small detail, my frequency isn't 1 but 168 and it looks like this is the bottleneck. João Santos Bernardo Rangel tura wrote: On Fri, 2007-11-09 at 06:58 -0800, Joao Santos wrote: Hello, EXAMPLE ##Create time series

[R] how to extract the original data of a glm object

2007-11-12 Thread leffgh
my function is glm(a~log(b)+c+d+e,family=binomial,data=f)-aa I want to extract the original data set of aa. How to do it ? You may suggest the model.frame() function. In fact ,i have tried it. model.frame returns a data frame of containing a,log(b) NOT b,c,d,e I want to extract a

[R] strange `nls' behaviour

2007-11-12 Thread Joerg van den Hoff
I initially thought, this should better be posted to r-devel but alas! no response. so I try it here. sory for the lengthy explanation but it seems unavoidable. to quickly see the problem simply copy the litte example below and execute f(n=5) which crashes. called with n != 5 (and of

Re: [R] how to extract the original data of a glm object

2007-11-12 Thread Henrique Dallazuanna
Try: aa$data On 12/11/2007, leffgh [EMAIL PROTECTED] wrote: my function is glm(a~log(b)+c+d+e,family=binomial,data=f)-aa I want to extract the original data set of aa. How to do it ? You may suggest the model.frame() function. In fact ,i have tried it. model.frame returns a data

Re: [R] strange `nls' behaviour

2007-11-12 Thread Katharine Mullen
I can confirm this behavior on R-2.6.0 but don't have time to look into it further at the moment. On Mon, 12 Nov 2007, Joerg van den Hoff wrote: I initially thought, this should better be posted to r-devel but alas! no response. so I try it here. sory for the lengthy explanation but

Re: [R] how to extract the original data of a glm object

2007-11-12 Thread vito muggeo
See and *read* the help file ?glm the object returned by glm() includes the `data' component hence: aa-glm(..) aa$data or also eval(aa$call$data) leffgh ha scritto: my function is glm(a~log(b)+c+d+e,family=binomial,data=f)-aa I want to extract the original data set of aa. How

[R] decompose () vs. stl ()

2007-11-12 Thread Nuno Prista
Hi, I have been having trouble finding references that compare the classical decomposition methods [decompose()] with the STL method of Cleveland et al. (1990) [stl()]. Can anybody indicate some references that make comparisons between the two methods and the advantage/disadvantages of each one

Re: [R] White's test again

2007-11-12 Thread Achim Zeileis
On Fri, 9 Nov 2007, David Kaplan wrote: Hi all, It seems that I can get White's (HC3) test using MASS. The syntax I used for the particular problem is anova(scireg3, white.adjust=hc3) I don't think this is true. My guess is that you are using Anova() from package car. where scireg3 is

Re: [R] producing output as *.spo (spss output format)

2007-11-12 Thread Muenchen, Robert A (Bob)
You probably don't want to spend time figuring out the .spo format. From SPSS 16 on, that format is obsolete and replaced by the Unicode XML-based .spv file. SPSS 16 users need a separate Legacy Viewer to read .spo files. -Bob = Bob Muenchen

[R] Resid() and estimable() functions with lmer

2007-11-12 Thread Adriana Puentes
Hi all, Two questions: 1. Is there a way to evaluate models from lmer() with a poisson distribution? I get the following error message: library(lme4) lmer(tot.fruit~infl.treat+def.treat+(1|initial.size),family=poisson)-model plot(fitted(model),resid(model)) Error: 'resid' is not implemented

[R] R 2.6.0 RMySQL

2007-11-12 Thread Joachim Claudet
Dear list members -- I have problems in loading the pre-compiled library RMySQL_0.5-7 taken here (http://stat.bell-labs.com/RS-DBI/download/index.html) or RMySQL_0.6-0 taken here (http://www.stats.ox.ac.uk/pub/RWin/bin/windows/contrib/2.5/) on R 2.6.0 under Windows XP. I am using the MySQL

Re: [R] strange `nls' behaviour

2007-11-12 Thread Martin Maechler
DM == Duncan Murdoch [EMAIL PROTECTED] on Mon, 12 Nov 2007 07:36:34 -0500 writes: DM On 11/12/2007 6:51 AM, Joerg van den Hoff wrote: I initially thought, this should better be posted to r-devel but alas! no response. DM I think the reason there was no response is that

Re: [R] R 2.6.0 RMySQL

2007-11-12 Thread Prof Brian Ripley
I don't understand why you are trying to install a 2.5.x binary on R 2.6.0. Perhaps if you tried not to make things so hard for yourself and just used the Packages menu to install RMySQL this might work: it does for me and quite a few others. Otherwise, you do need libMySQL.dll on the path

Re: [R] strange `nls' behaviour

2007-11-12 Thread Joerg van den Hoff
On Mon, Nov 12, 2007 at 03:25:38PM +0100, Martin Maechler wrote: DM == Duncan Murdoch [EMAIL PROTECTED] on Mon, 12 Nov 2007 07:36:34 -0500 writes: DM On 11/12/2007 6:51 AM, Joerg van den Hoff wrote: I initially thought, this should better be posted to r-devel but alas!

[R] R 2.6.0 RMySQL

2007-11-12 Thread Joachim Claudet
Dear Prof. Ripley (and other readers) -- Unfortunately, I already did this (using the packages menu to install RMySQL and copying libMySQL.dll in the RMySQL/libs directory). But after the installation, when I load the package, I have the same error message. Regards, - Joachim Claudet -- º)))

Re: [R] bootstrap

2007-11-12 Thread Prof Brian Ripley
On Mon, 12 Nov 2007, Stefano Ghirlanda wrote: i am using the boot package for some bootstrap calculations in place of anovas. one reason is that my dependent variable is distributed bimodally, but i would also like to learn about bootstrapping in general (i have ordered books but they have

Re: [R] strange `nls' behaviour

2007-11-12 Thread Katharine Mullen
On about line 547 in nls.R there is mf$formula - # replace by one-sided linear model formula as.formula(paste(~, paste(varNames[varIndex], collapse = +)), env = environment(formula)) If this is replaced with mf$formula - # replace by one-sided linear model

[R] plot

2007-11-12 Thread elyakhlifi mustapha
Hi, I have been searched how to do to display in the same chart this following functions: plot(d7,d6,type=b,col=dark red) plot(d7,(a*d7)+b,type=l) in using par it display in 2 diffenrent charts. _ l

Re: [R] plot

2007-11-12 Thread Benilton Carvalho
replace the second plot() by lines(d7, (a*d7)+b) b On Nov 12, 2007, at 10:42 AM, elyakhlifi mustapha wrote: Hi, I have been searched how to do to display in the same chart this following functions: plot(d7,d6,type=b,col=dark red) plot(d7,(a*d7)+b,type=l) in using par it display in 2

Re: [R] strange `nls' behaviour

2007-11-12 Thread Duncan Murdoch
On 11/12/2007 9:14 AM, Joerg van den Hoff wrote: On Mon, Nov 12, 2007 at 07:36:34AM -0500, Duncan Murdoch wrote: On 11/12/2007 6:51 AM, Joerg van den Hoff wrote: I initially thought, this should better be posted to r-devel but alas! no response. I think the reason there was no response is

Re: [R] Rcmdr Mac OS X

2007-11-12 Thread blemcke
Thanks for your answer. I downloaded the recent version today (1.3-8) B Am 12.11.2007 um 17:11 schrieb John Fox: Dear Birgit, I'm not a Mac user, so can only offer limited help. I've just verified, however, that the most recent version of the Rcmdr package on CRAN (version 1.3-8)

Re: [R] Largest N Values Efficiently?

2007-11-12 Thread David Katz
x is a 1XN sparse matrix of numerics. I am using the Matrix package to represent as a sparse matrix; the representation has a numeric vector representing the positions within the matrix. My goal is find the columns with the n largest values, here positive correlations. Part of my strategy is to

[R] dtp point and pdf

2007-11-12 Thread Roland Kaiser
Hi all! I encountered precision problems using pdf(). So far, I found out, that pdf() sets the Mediabox to even values in dtp points (1/72 inch). This can be seen in the following example. page.width - 13.1/2.54 # in centimeters page.height - 19/2.54 pdf(file = foo.pdf, width = page.width,

[R] help in long loops

2007-11-12 Thread Mahmudul Haque
hi, please help me out in the following case. seems like it stuck in some where(already 7 hrs passed). what I want is to combine 4 matrix in to one matrix of desired length. final_matrix-function(ob_feat,content_feat,link_feat,link_feat_transformed){

[R] Package fEcofin fails to download

2007-11-12 Thread Piotr Chmielowski
Download of the fEcofin fails from: http://cran.r-project.org/bin/windows/contrib/r-release/fEcofin_260.72.z ip results in IE complaining Internet Explorer cannot display the webpage Most likely causes: You are not connected to the Internet. The website is encountering problems. There

[R] a very little help with sample weights

2007-11-12 Thread billycorg
I am a very beginner user of R. I have yet sample weights that I would like to apply to all my data set. Which function can I apply? The survey package begins from the survey design.. I have yet, in my dataset, the weights column. thanks a lot, Vincenzo -- View this message in context:

[R] Resample a matrix (table)

2007-11-12 Thread Luca Penasa
I have a matrix of values... for exemple the matrix could be 100 rows and 50 columns... I would like to resample the matrix to obtain a new matrix - a 10x5 matrix So i need to calculate a new value for every cell, i would like to use a weightened mean to do this. I explain this thing better: In

[R] Microsoft SOAP - Help!!

2007-11-12 Thread Metaxab
Hello, I am trying to access Microsoft Live Search Using SOAP through R. In R I am using the RCurl packages to make the calls. I have the following situation that looks crazy and cannot figure out how to solve it: #SOAP Request library(RCurl) h = basicTextGatherer() body='?xml version=1.0

[R] installing R with RPM

2007-11-12 Thread Casey,Richard
Hello, We're installing R v.2.6 on HP Proliant 32-bit server and RedHat Enterprise Linux v.4 using the binaries and RPM's in CRAN in /bin/linux/redhat/el4/i386. I could not find instructions on how to use the RPM's. I assume you issue: rpm -i R-2.6.0-3.rh4.i386.rpm rpm -i

[R] time plotting problem

2007-11-12 Thread John Kane
I am completely misunderstanding how to handle dates. I want to plot a couple of data series against some dates. Simple example 1 below works fine. Unfortunately I have multiple observations per day (no time breakdowns) and observations across years. (example 2 very simplistic version ) Can

Re: [R] help on drawing a tree with ape?

2007-11-12 Thread Ben Bolker
Hua Li wrote: Dear Simon and everyone, Thanks for response. Specifically, I have a tree with species A, B, C and can be written as ((A:45.15,C:45.15):46.19,B:91.34):0.0; . If I use the R command mytreeABC [1] ((A:45.15,C:45.15):46.19,B:91.34):0.0; plot(read.tree(text =

[R] How can I fitting this function from values.

2007-11-12 Thread Horacio Castellini
Hi all, I'd like fit this function: G(t)=A*1/(1+t/B)*1/sqrt(1+t/C) where A, B and C are fitting constants that one like search. I have got a fcs-(t,G(t)) value table in a data frame. Any one can help me? Tahnks Horacio. __ R-help@r-project.org

Re: [R] referring to a data-frame column using a variable

2007-11-12 Thread Rolf Turner
On 13/11/2007, at 8:42 AM, Bernd Jagla wrote: Hi, I would like to refer to a column in a data frame using a variable. How would I do this? Something like: c1-column1 dat${c1} where names(dat) includes 'column1' Use dat[[c1]]. cheers,

Re: [R] Bug (?) in read.fwf

2007-11-12 Thread david.jessop
Jim, That works - thank you; but still doesn't explain why stringsAsFactors doesn't seem to have an effect. Regards, David -Original Message- From: jim holtman [mailto:[EMAIL PROTECTED] Sent: 08 November 2007 13:41 To: Jessop, David Cc: r-help@r-project.org Subject: Re: [R] Bug (?)

Re: [R] strange `nls' behaviour

2007-11-12 Thread Joerg van den Hoff
On Mon, Nov 12, 2007 at 11:09:21AM -0500, Duncan Murdoch wrote: On 11/12/2007 9:14 AM, Joerg van den Hoff wrote: On Mon, Nov 12, 2007 at 07:36:34AM -0500, Duncan Murdoch wrote: On 11/12/2007 6:51 AM, Joerg van den Hoff wrote: I initially thought, this should better be posted to r-devel but

Re: [R] help in long loops

2007-11-12 Thread jim holtman
What happens if you have multiple matches in the comparison between the content_feat and ob_feat? Why don't you just iterate through the content_feat and use 'match' to find the corresponding match in ob_feat? This should speed it up. Also why are you using 'as.matrix' when the values in the

Re: [R] How can I fitting this function from values.

2007-11-12 Thread Joerg van den Hoff
On Mon, Nov 12, 2007 at 04:27:26PM -0300, Horacio Castellini wrote: Hi all, I'd like fit this function: G(t)=A*1/(1+t/B)*1/sqrt(1+t/C) where A, B and C are fitting constants that one like search. I have got a fcs-(t,G(t)) value table in a data frame. Any one can help me? Tahnks Horacio.

Re: [R] How to pool a group of samples and take the ave.

2007-11-12 Thread jim holtman
Try something like this: myAvg - rowMeans(A[,48:243]) B - A[1:47,] / myAvg On Nov 12, 2007 1:37 PM, affy snp [EMAIL PROTECTED] wrote: Dear list, Hi! I have a table A, 238304 rows and 243 columns (representing samples). First of all, I would like to pool a group of samples from 48th column

Re: [R] How to pool a group of samples and take the ave.

2007-11-12 Thread jim holtman
Was supposed to be: B - A[,1:47] / myAvg On Nov 12, 2007 3:10 PM, jim holtman [EMAIL PROTECTED] wrote: Try something like this: myAvg - rowMeans(A[,48:243]) B - A[1:47,] / myAvg On Nov 12, 2007 1:37 PM, affy snp [EMAIL PROTECTED] wrote: Dear list, Hi! I have a table A, 238304 rows

Re: [R] How can I fitting this function from values.

2007-11-12 Thread Rolf Turner
On 13/11/2007, at 8:27 AM, Horacio Castellini wrote: Hi all, I'd like fit this function: G(t)=A*1/(1+t/B)*1/sqrt(1+t/C) where A, B and C are fitting constants that one like search. I have got a fcs-(t,G(t)) value table in a data frame. Any one can help me? Tahnks Horacio. I

Re: [R] time plotting problem

2007-11-12 Thread jim holtman
Now your first data point is 9/26/09; is it supposed to be 9/26/06? On Nov 12, 2007 1:47 PM, John Kane [EMAIL PROTECTED] wrote: I am completely misunderstanding how to handle dates. I want to plot a couple of data series against some dates. Simple example 1 below works fine. Unfortunately I

[R] a repetition of simulation

2007-11-12 Thread sigalit mangut-leiba
Hello, I have a simple (?) simulation problem. I'm doing a simulation with logistic model and I want to reapet it 600 times. The simulation looks like this: z - 0 x - 0 y - 0 aps - 0 tiss - 0 for (i in 1:500){ z[i] - rbinom(1, 1, .6) x[i] - rbinom(1, 1, .95) y[i] - z[i]*x[i] if (y[i]==1) aps[i] -

Re: [R] How to pool a group of samples and take the ave.

2007-11-12 Thread affy snp
Thanks Jim. It is way simple. Great. Is there any function like rowMedians() which could take the median value across samples? Allen On Nov 12, 2007 3:10 PM, jim holtman [EMAIL PROTECTED] wrote: Try something like this: myAvg - rowMeans(A[,48:243]) B - A[1:47,] / myAvg On Nov 12, 2007

[R] How to set up your library location for multiple users

2007-11-12 Thread Dave Jacoby
I'm running R 2.5.0 (with the upgrade to 2.6.0 scheduled) on a and trying to write a few applications that will be run as myself, as my boss and as the web server, on one of many Solaris x86 servers. I'd like to have my library sharable, and I thought I had found the way by putting this line

Re: [R] How to pool a group of samples and take the ave.

2007-11-12 Thread Benilton Carvalho
it's defined in Biobase. On Nov 12, 2007, at 3:30 PM, affy snp wrote: Thanks Jim. It is way simple. Great. Is there any function like rowMedians() which could take the median value across samples? Allen On Nov 12, 2007 3:10 PM, jim holtman [EMAIL PROTECTED] wrote: Try something like

Re: [R] How to pool a group of samples and take the ave.

2007-11-12 Thread affy snp
Thanks Jim and Ben. Allen On Nov 12, 2007 3:43 PM, Benilton Carvalho [EMAIL PROTECTED] wrote: it's defined in Biobase. On Nov 12, 2007, at 3:30 PM, affy snp wrote: Thanks Jim. It is way simple. Great. Is there any function like rowMedians() which could take the median value across

Re: [R] mtry in ctree_control()

2007-11-12 Thread Achim Zeileis
On Mon, 12 Nov 2007, Lam, Kelvin wrote: What is the actual usage of mtry in ctree(), or specifically, ctree_control() since it's a single tree? Thanks in advance. As the associated man page explains: This is useful if you want to build an ensemble (such as a random forest) based on ctree()s.

Re: [R] How to set up your library location for multiple users

2007-11-12 Thread James W. MacDonald
Hi Dave, Not sure what .lib.loc() is supposed to do, but you might want to look at section 6.2 of the R Installation and Administration manual, which covers library path issues. Best, Jim Dave Jacoby wrote: I'm running R 2.5.0 (with the upgrade to 2.6.0 scheduled) on a and trying to

[R] Using lme (nlme) to find the conditional variance of the random effects

2007-11-12 Thread Rick Bilonick
Using lmer in the lme4 package, you can compute the conditional variance-covariance matrix of the random effects using the bVar slot: bVar: A list of the diagonal inner blocks (upper triangles only) of the positive-definite matrices on the diagonal of the inverse of ZtZ+Omega. With the

Re: [R] Using lme (nlme) to find the conditional variance of therandom effects

2007-11-12 Thread Doran, Harold
No, don't reach into the bVar slot. Use the proper extractor function ranef() with postVar=T. There is no similar function for lme() -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Rick Bilonick Sent: Monday, November 12, 2007 4:40 PM To: R Help

[R] update matrix with subset of it where only row names match

2007-11-12 Thread Martin Waller
I guess this has a simple solution: I have matrix 'mat1' which has row and column names, e.g.: A B C row10 0 0 row20 0 0 rown0 0 0 I have a another matrix 'mat2', essentially a subset of 'mat1' where the rownames are all

[R] how to assign a group mean to individual cases?

2007-11-12 Thread Casey Klofstad
I need advice on how to create a variable that is the group mean of another variable. For example, I have a variable called x for which each row in the data set has a value. I also have a nominal variable called g that indicates which of 100 different groups each row belongs to. So, I want to

Re: [R] Sending E-Mail from R

2007-11-12 Thread Brahm, David
Josh Kalish [EMAIL PROTECTED] wrote: Has anyone used R to send out an email via an SMTP server? If your system is Unix or Linux and you use a system call to mail, you might be interested to know that uuencode is a good way to include attachments. Create a temp file containing your body text,

Re: [R] Microsoft SOAP - Help!!

2007-11-12 Thread Duncan Temple Lang
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Konstantinos I am not able to reproduce the error. I can use different search queries of different length, etc. The error is coming from libcurl and, if I have gotten things the right way around, it basically means that the write handler

Re: [R] Multivariate time series

2007-11-12 Thread Giovanni Petris
Giusy, There is also a package dlm that may be useful, but you need to specify the model you want to use. Giovanni Date: Sun, 11 Nov 2007 08:40:42 -0800 (PST) From: Giusy [EMAIL PROTECTED] Sender: [EMAIL PROTECTED] Precedence: list Hello to everyone! I have a question for you..I

Re: [R] State-space model estimation with EM

2007-11-12 Thread Giovanni Petris
Package dlm has a function for maximum likelihood estimation of parameters in general (linear Normal) state space model. The function, dlmMLE, computes the likelihood based on singular value decomposition and appears to be fairly robust. No EM algorithm, though. Giovanni Date: Sun, 11 Nov

[R] MASS library rob.cov ellipse

2007-11-12 Thread Jenifer Larson-Hall
I figured this out so I wanted to post a response to my own question. Thanks to Brian Ripley for his hint, which got me looking in the right direction. The plot I had seen before that I wanted was automatic output to the cor.plot command in the mvoutlier library. A similar tolerance ellipse can

[R] Query an Access database based on a date attribute

2007-11-12 Thread Tudor Bodea
Dear useRs, I would like to query an Access database through R based on a date attribute but, unfortunately, I fail to do so. For example, the table test_table of the test.mdb looks like: ID cd market competitor dd price 1 1 2007-11-20 atl-bos delta 2007-11-20 210 2

Re: [R] strange `nls' behaviour

2007-11-12 Thread Duncan Murdoch
On 12/11/2007 2:56 PM, Joerg van den Hoff wrote: On Mon, Nov 12, 2007 at 11:09:21AM -0500, Duncan Murdoch wrote: On 11/12/2007 9:14 AM, Joerg van den Hoff wrote: On Mon, Nov 12, 2007 at 07:36:34AM -0500, Duncan Murdoch wrote: On 11/12/2007 6:51 AM, Joerg van den Hoff wrote: I initially

Re: [R] how to assign a group mean to individual cases?

2007-11-12 Thread Moshe Olshansky
You can do the following: x - 1:10 g - rep(3:5,len=10) df - data.frame(g=g,x=x) y - aggregate(df$x,list(df$g)) z - sapply(df$g,function(x) which(y[,1]==x)) df1 - data.frame(df,group.mean=y[z,2]) --- Casey Klofstad [EMAIL PROTECTED] wrote: I need advice on how to create a variable that is the

Re: [R] Tick mark puzzle.

2007-11-12 Thread Bert Gunter
Well, let me have a crack at it ... (inline below) Bert Gunter Genentech Nonclinical Statistics -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Rolf Turner Sent: Monday, November 12, 2007 2:16 PM To: r-help@r-project.org Subject: [R] Tick mark puzzle.

Re: [R] update matrix with subset of it where only row names match

2007-11-12 Thread jim holtman
Here is one way of doing it that uses the row and column names: # create test data mat1 - matrix(0, nrow=10, ncol=3) dimnames(mat1) - list(paste('row', 1:10, sep=''), LETTERS[1:3]) mat2 - matrix(1:3, ncol=1, dimnames=list(c('row3', 'row7', 'row5'), B)) mat2 B row3 1 row7 2 row5 3 #

Re: [R] Resample a matrix (table)

2007-11-12 Thread Moshe Olshansky
Hi Luca, One (not very elegant) way of doing this is to use double loop as below: Let A be your matrix (100x50), W your weights matrix (10x10) and you want to produce matrix B (10X5) You can do: B - matrix(0,nrow=10,ncol=5) for (i in 1:10) for (j in 1:5) B[i,j] -

Re: [R] The reverse of do.call(rbind,) on a list

2007-11-12 Thread Gabor Grothendieck
Try: split(xm, row(xm)) On Nov 12, 2007 8:07 PM, Søren Højsgaard [EMAIL PROTECTED] wrote: Dear List, I want to turn the matrix xm [,1] [,2] [1,] a b [2,] d e into a list by rows as: [[1]] [1] a b [[2]] [1] d e A (bad?) way of doing this is as unlist(apply(xm,1, list),

Re: [R] The reverse of do.call(rbind,) on a list

2007-11-12 Thread Christos Hatzis
Try split: x - matrix(letters[1:4], 2) x [,1] [,2] [1,] a c [2,] b d split(x, row(x)) $`1` [1] a c $`2` [1] b d -Christos -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Søren Højsgaard Sent: Monday, November 12, 2007 8:08 PM To:

Re: [R] The reverse of do.call(rbind,) on a list

2007-11-12 Thread Sebastian P. Luque
On Tue, 13 Nov 2007 02:07:39 +0100, Søren Højsgaard [EMAIL PROTECTED] wrote: Dear List, I want to turn the matrix xm [,1] [,2] [1,] a b [2,] d e into a list by rows as: [[1]] [1] a b [[2]] [1] d e A (bad?) way of doing this is as unlist(apply(xm,1, list), recursive=F) [[1]] [1] a b

[R] connection diagram

2007-11-12 Thread Manal Helal
Hi I am practically new to R, and need to construct connection diagrams, I have a table of data, of nodes in vertical rows, and horizontally the number of outgoing connections to other nodes, and the indices of these nodes, each in a column, so some columns are used, and some are not, based on

Re: [R] connection diagram

2007-11-12 Thread elw
hi, You should probably be looking at the functions in the following packages: sna network(s) graph dynamicgraph mathgraph igraph Matrix and a few others ;) what you're describing sounds like, to my ear, a restricted social network diagram; many of the problems you describe are typical of

Re: [R] Multivariate time series

2007-11-12 Thread Paul Gilbert
Package dse does do linear, multivariate time series with multivariate exogenous inputs, using VAR, multivariate ARMA, and state-space models, just like you are describing. You can specify the model or have it automatically determined. Perhaps you could give a few more details about what you

[R] Tick mark puzzle.

2007-11-12 Thread Rolf Turner
I am bewildered by the behaviour of tickmarks as demonstrated by the following code. (What I'm trying to do is draw a single tick mark extending from the axis all the way down to the tick label, which is two lines from the axis to make sure it doesn't overlap with the ``ordinary'' tick

Re: [R] help on drawing a tree with ape?

2007-11-12 Thread Hua Li
Thank you very much for the help, Ben! As a follow up, is there a way to specify the labels, through the way the text is written, rather than reading the edge positions from the graph? For example, mytree = ((A:51.78,(C:24.6,D:24.6):27.18):40.06,B:91.84):0.0; plot(read.tree(text = mytree))

Re: [R] a repetition of simulation

2007-11-12 Thread Stephen Weigand
Dear Sigalit, On Nov 12, 2007 2:18 PM, sigalit mangut-leiba [EMAIL PROTECTED] wrote: Hello, I have a simple (?) simulation problem. I'm doing a simulation with logistic model and I want to reapet it 600 times. The simulation looks like this: z - 0 x - 0 y - 0 aps - 0 tiss - 0 for (i

Re: [R] Using lme (nlme) to find the conditional variance of therandom effects

2007-11-12 Thread Rick Bilonick
On Mon, 2007-11-12 at 16:45 -0500, Doran, Harold wrote: No, don't reach into the bVar slot. Use the proper extractor function ranef() with postVar=T. There is no similar function for lme() -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Rick

[R] percent inclusion in cph

2007-11-12 Thread sushi4u
Dear R-help, I have to calculate the percent inclusion of each variable in a bootstrap validation of a cox proportional hazards model(described in Sauerbrei and Schumacher, Stat Med 11:1093, 1992). First I need to get a bootstrap sample from my dataset, which I did with the sample function.

[R] percent inclusion in cph

2007-11-12 Thread sushi4u
Dear R-help, I have to calculate the percent inclusion of each variable in a bootstrap validation of a cox proportional hazards model(described in Sauerbrei and Schumacher, Stat Med 11:1093, 1992). First I need to get a bootstrap sample from my dataset, which I did with the sample function.

[R] cor.test() and binary sequences

2007-11-12 Thread andrew collier
peter, thanks for your help with my questions regarding cor.test(). i have another question though: does this function make any assumptions about the underlying distribution of the two sequences? does it assume that they have a gaussian distribution? i ask because the data that i am working

Re: [R] a repetition of simulation

2007-11-12 Thread sigalit mangut-leiba
Thank you, Sigalit. On 11/13/07, Moshe Olshansky [EMAIL PROTECTED] wrote: Hi, Look at names(log_v) in your notation to see what you really need. Then you could do something like: results - list(600) for (ij in 1:600) { do what you did results[[ij]] - log_v } So now you have a list

Re: [R] Using lme (nlme) to find the conditional variance of therandom effects

2007-11-12 Thread Rick Bilonick
On Tue, 2007-11-13 at 01:03 -0500, Rick Bilonick wrote: Is there some way to get ranef with postVar=TRUE to show what the variances are, or what the lower and upper bounds are? qqmath makes nice plots but I need to obtain the numerical values. Rick B. I found a way:

Re: [R] Query an Access database based on a date attribute

2007-11-12 Thread Prof Brian Ripley
This is a question about SQL, or more precisely, Microsoft's peculiar dialect of SQL. You haven't even mentioned (let alone credited) package RODBC which you appear to be using. In SQL queries you need to quote numeric values if you want them to be treated as character. Why did you quote

[R] finding the annual maximun within several years

2007-11-12 Thread Dörte Salecker
dear r-helpers i've got a table that in extracts looks like this: V1 V2 V3V4 V5 1 01/01/1975 00:00:00 125.837 3.691 296.618 2 01/01/1975 01:00:00 124.799 3.679 281.307 3 01/01/1975 02:00:00 111.607 3.536 281.307 4 02/24/1976 11:00:00 21.602 2.555 93.893 5

Re: [R] How can I fitting this function from values.

2007-11-12 Thread Frede Aakmann Tøgersen
R is case sensitive ;-) so in your list of start values you must have B=3 and not b=3. Perhaps you have an object named b of a different length than your data somewhere giving rise to your error message. Also brute force wont work as Joerg point out. We have A*1/(1+t/B)*1/sqrt(1+t/C) =