Re: [R] Matching and merging two rows with missing values

2007-10-11 Thread Iris Kolder
Thank you for your help this works!! x <-c("AA","AG","GG",NA, NA) y <- c(NA, "AG", "GG", "AA", NA) x[is.na(x)] <- y[is.na(x)] Hello, I have two rows which are almost identical but miss different values at different locations. I would like to merge these two rows so that the missing values

Re: [R] A read.table mystery (data for Framemaker Mac)

2007-10-11 Thread Mark Wardle
1. Which version of Filemaker? NB: Framemaker is a different program (desktop publishing), so do be a little precise! 2. If it is an ancient version, then I suggest exporting a block of columns at a time, and then using merge() in R to join it all back up 3. I store all my clinical data in Filemake

Re: [R] A read.table mystery (data for Framemaker Mac)

2007-10-11 Thread Emmanuel Charpentier
Gabor Grothendieck a écrit : > On 10/11/07, Emmanuel Charpentier <[EMAIL PROTECTED]> wrote: >> I have to read some clinical data a file coming from Filemaker on >> Macintosh (Ugh ! But it could be worse and come from Excel...). >> Exporting via Excel is out of question since the file has 467 column

Re: [R] wireframe shade=T colorkey

2007-10-11 Thread Karim Rahim
Hi, colorkey: logical indicating whether a color key should be drawn alongside, or a list describing such a key. See 'levelplot' for details. So I would like an appropriate colour key (legend perhaps) mapping the colours to the z-axis values. Ex: wireframe(volcano, drape = T

Re: [R] load non-default libraries during start-up

2007-10-11 Thread Prof Brian Ripley
?Startup tells you how. BTW, you will need to search for the correct term 'packages' to find this. On Fri, 12 Oct 2007, Wang Chengbin wrote: > Are there ways to load a set of non-default libraries (i.e. MASS, etc.) when > R is launched? Thanks for the help. > > [[alternative HTML version d

[R] load non-default libraries during start-up

2007-10-11 Thread Wang Chengbin
Are there ways to load a set of non-default libraries (i.e. MASS, etc.) when R is launched? Thanks for the help. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do rea

[R] Confused about Tukey mult. comp. after ANCOVA

2007-10-11 Thread Chabot Denis
Hi, I am reposting this as I fear my original post (on Oct. 4th) got buried by all the excitement of the R 2.6 release... I had a first occasion to try multiple comparisons (of intercepts, I suppose) following a significant result in an ANCOVA. As until now I was doing this with JMP, I comp

Re: [R] rearranging vectors

2007-10-11 Thread Benilton Carvalho
?rev On Oct 11, 2007, at 9:20 PM, [EMAIL PROTECTED] wrote: > Hi everyone > I have a vector that I want to modify. A simple eg of what i want > to do is below > I have a vector x > > x<-c(1,2,3,4) > > I want to change this vector or make a new one such that > > x<-c(4,3,2,1) > > Any help would

[R] rearranging vectors

2007-10-11 Thread Nigel . Walker
Hi everyone I have a vector that I want to modify. A simple eg of what i want to do is below I have a vector x x<-c(1,2,3,4) I want to change this vector or make a new one such that x<-c(4,3,2,1) Any help would be great. I just want to swap the order. Thanks _

Re: [R] chisq.test in batch

2007-10-11 Thread Ted Harding
On 11-Oct-07 22:11:46, João Fadista wrote: > Dear all, > > I would like to compute hundreds of chisq.test ´s, and for each test > output I would like to extract only the p-values. So my question is: > how can I make this without making it manually? ?chisq.test (under "Value") tells you that one

Re: [R] wireframe shade=T colorkey

2007-10-11 Thread Deepayan Sarkar
On 10/11/07, Karim Rahim <[EMAIL PROTECTED]> wrote: > Thank you for your reply. > > In this graphics context, I'm not sure what the incident or reflected > light rays are. > > May I ask for an example of using a colour key with the volcano data > using the colours that appear when you select the sh

Re: [R] confusion with R syntax

2007-10-11 Thread Giovanni Petris
Mark, That has to do with how operators bind and their precedence. > Date: Thu, 11 Oct 2007 15:34:22 -0400 > From: "Leeds, Mark (IED)" <[EMAIL PROTECTED]> > Sender: [EMAIL PROTECTED] > Importance: normal > Priority: normal > Precedence: list > Thread-topic: confusion with R syntax > Thread-ind

Re: [R] wireframe shade=T colorkey

2007-10-11 Thread Karim Rahim
Thank you for your reply. In this graphics context, I'm not sure what the incident or reflected light rays are. May I ask for an example of using a colour key with the volcano data using the colours that appear when you select the shade option? It is simple to have the colour key appear using dr

[R] chisq.test in batch

2007-10-11 Thread João Fadista
Dear all, I would like to compute hundreds of chisq.test ´s, and for each test output I would like to extract only the p-values. So my question is: how can I make this without making it manually? Example: # Test nº1 > chisq.test(c(220,240)) Chi-squared test for given probabilit

Re: [R] confusion with R syntax

2007-10-11 Thread hadley wickham
On 10/11/07, Leeds, Mark (IED) <[EMAIL PROTECTED]> wrote: > thanks to all for your explanations. It seems like, because it's done > sequentially, you can put as many [] on as > you like as long as they make sense. It probably was a bad question but > this concept is quite different > from C which i

Re: [R] confusion with R syntax

2007-10-11 Thread Leeds, Mark (IED)
thanks to all for your explanations. It seems like, because it's done sequentially, you can put as many [] on as you like as long as they make sense. It probably was a bad question but this concept is quite different from C which is mainly where I came from. Thanks again. Mark -Or

Re: [R] PS graphs in R 2.6.0

2007-10-11 Thread Peter Dalgaard
Jorge Ivan Velez Valbuena wrote: > Dear R-users: > > I have been working in R for few years and never I'd been the problems like > this. I'm running the last R version and when I try to save a graph in PS > format I have the next error > > Error: Invalid font type > In addition: Warning messages:

[R] PS graphs in R 2.6.0

2007-10-11 Thread Jorge Ivan Velez Valbuena
Dear R-users: I have been working in R for few years and never I'd been the problems like this. I'm running the last R version and when I try to save a graph in PS format I have the next error Error: Invalid font type In addition: Warning messages: 1: font family not found in PostScript font d

Re: [R] Identifying and characterizing strings of NA in a vector

2007-10-11 Thread Jorge Ivan Velez Valbuena
Hi Marie-Pierre, You first should identify wich components of vec are NA, then compute the length. vec <- c(1, 2, 1, NA, NA, 1, 2, NA, NA, NA, 3, 4, NA, NA) # Which component is NA? wcs<-which(-is.na(vec)) # Number of NA's in vector vec length(wcs) If you need to do the same for many vector,

Re: [R] A read.table mystery (data for Framemaker Mac)

2007-10-11 Thread Gabor Grothendieck
On 10/11/07, Emmanuel Charpentier <[EMAIL PROTECTED]> wrote: > I have to read some clinical data a file coming from Filemaker on > Macintosh (Ugh ! But it could be worse and come from Excel...). > Exporting via Excel is out of question since the file has 467 columns > and 121 lines (+ headers), whi

Re: [R] how to get the sample size in lm

2007-10-11 Thread Rolf Turner
On 12/10/2007, at 7:41 AM, Jiong Zhang, PhD wrote: > Hi All, > > How do I get the sample size in lm? I know it is not reported by > "summary". Variety of ways. One such is length(resid()). cheers, Rolf Turner

Re: [R] confusion with R syntax

2007-10-11 Thread Greg Snow
It is not 2 dimensional indexing, but 1 dimensional indexing done twice. Would this surprise you?: > x <- 1:10 > y <- x[2:4] > y[ c(TRUE,FALSE,TRUE) ] [1] 2 4 Because your code is just the same (skipping the intermediate y step). You start with x, then apply a subscripting argument to that grab

Re: [R] how to get the sample size in lm

2007-10-11 Thread Marc Schwartz
On Thu, 2007-10-11 at 11:41 -0700, Jiong Zhang, PhD wrote: > Hi All, > > How do I get the sample size in lm? I know it is not reported by "summary". > > Thanks. > > jiong You need to be careful to understand the difference between the sample size in the original data frame and the actual sample

[R] A read.table mystery (data for Framemaker Mac)

2007-10-11 Thread Emmanuel Charpentier
Dear list, I have to read some clinical data a file coming from Filemaker on Macintosh (Ugh ! But it could be worse and come from Excel...). Exporting via Excel is out of question since the file has 467 columns and 121 lines (+ headers), which is out of reach of Excel. So I received an "mer"" file

Re: [R] problem installing MCMCpack

2007-10-11 Thread Prof Brian Ripley
On Thu, 11 Oct 2007, Ben Bolker wrote: > > > > J. Henrikson wrote: >> >> I'm completely new to R and am trying to install an add-on package for one >> of our faculty members. >> I've had no problems with most of them, but am completely stuck trying to >> figure out why MCMCpack won't install.. >>

[R] Centroid

2007-10-11 Thread Alessandra Trimarchi
Hi, I'm a new user of R. I should make a cluster analysis using the centroid method. I have used the hclust function of the stats package, but I would also visualize the centroids for each cluster in order to be able in a better interpretation.Could you give me any advice? Thanks Alex

Re: [R] confusion with R syntax

2007-10-11 Thread Gabor Grothendieck
Or with x <- 1:10 # these are all the same x[2:4][1] (x[2:4])[1] y <- x[2:4] y[1] On 10/11/07, Andrew Robinson <[EMAIL PROTECTED]> wrote: > Hi Mark, > > what's happening here is that R is applying the one-dimensional > subscripting operations sequentially. > > Try > > x <- seq(1,10) > x[2:4][

Re: [R] confusion with R syntax

2007-10-11 Thread Mark Wardle
On 11/10/2007, Leeds, Mark (IED) <[EMAIL PROTECTED]> wrote: > I just noticed something by accident with R syntax that I'm sure is > correct but I don't understand it. If I have > a simple numeric vector x and I subscript it, it seems that I can then > subscript a second time with TRUE > or FALSE, s

Re: [R] which package does interpSpline belong to ?

2007-10-11 Thread Marc Schwartz
On Thu, 2007-10-11 at 14:23 -0500, Maura E Monville wrote: > I have searched for "interpSpline" and got the following: > > interpSpline(splines) Create an Interpolation Spline > > > Type 'help(FOO, package = PKG)' to inspect entry 'FOO(PKG) TITLE'. > > I looked for a package named "splines"

Re: [R] confusion with R syntax

2007-10-11 Thread Jim Lemon
Leeds, Mark (IED) wrote: > I just noticed something by accident with R syntax that I'm sure is > correct but I don't understand it. If I have > a simple numeric vector x and I subscript it, it seems that I can then > subscript a second time with TRUE > or FALSE, sort of like a 2 dimensional array i

Re: [R] confusion with R syntax

2007-10-11 Thread Nordlund, Dan (DSHS/RDA)
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Leeds, Mark (IED) > Sent: Thursday, October 11, 2007 12:34 PM > To: [EMAIL PROTECTED] > Subject: [R] confusion with R syntax > > I just noticed something by accident with R syntax that I'm sure is > co

Re: [R] confusion with R syntax

2007-10-11 Thread Andrew Robinson
Hi Mark, what's happening here is that R is applying the one-dimensional subscripting operations sequentially. Try x <- seq(1,10) x[2:4][1] Cheers Andrew On Thu, Oct 11, 2007 at 03:34:22PM -0400, Leeds, Mark (IED) wrote: > I just noticed something by accident with R syntax that I'm sure is >

[R] how to get the sample size in lm

2007-10-11 Thread Jiong Zhang, PhD
Hi All, How do I get the sample size in lm? I know it is not reported by "summary". Thanks. jiong The email message (and any attachments) is for the sole...{{dropped:11}} __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-he

[R] confusion with R syntax

2007-10-11 Thread Leeds, Mark (IED)
I just noticed something by accident with R syntax that I'm sure is correct but I don't understand it. If I have a simple numeric vector x and I subscript it, it seems that I can then subscript a second time with TRUE or FALSE, sort of like a 2 dimensional array in C. Does someone know if this is d

[R] which package does interpSpline belong to ?

2007-10-11 Thread Maura E Monville
I have searched for "interpSpline" and got the following: interpSpline(splines) Create an Interpolation Spline Type 'help(FOO, package = PKG)' to inspect entry 'FOO(PKG) TITLE'. I looked for a package named "splines" executable for Windows but could not find it. Thank you in adavance --

Re: [R] maps does not work

2007-10-11 Thread Ray Brownrigg
On Thu, 11 Oct 2007, Lukas Gudmundsson wrote: > Hello, > I am trying to draw geographical maps with the maps package. However > > if I try to access the data following error occurs: > > require(maps) > > map() > > Fehler in zip.file.extract(file, "Rdata.zip") : > 'destination' existiert nicht > #

Re: [R] reason for error in small function?

2007-10-11 Thread Philipp Pagel
On Thu, Oct 11, 2007 at 02:17:14PM -0400, Dale Steele wrote: > Running the function below, tested using the cardiff dataset from > splancs generates the following error. What changes do I need to > make to get the function to work? Thanks. --Dale > > > gen.rpoints(events, poly, 99) > > rpoin

Re: [R] Type III sum of squares and appropriate contrasts

2007-10-11 Thread John Fox
Dear Mark and Mel, For some reason, I didn't see Mel's original posting. For a different perspective on tests in, e.g., unbalanced ANOVA, see the discussion in my text, Applied Regression Analysis, Linear Models, and Related Methods (Sage, 1997). Briefly, if the contrasts for different terms aren

Re: [R] reason for error in small function?

2007-10-11 Thread jim holtman
You need to return the value from the function. "rpoints" is local to the function and not visible. gen.rpoints <- function(events, poly, nsim){ rpoints <- array(0, dim=c(nrow(events),2,nsim)) for (i in 1:nsim) { rpoints[, ,i] <- csr(poly, nrow(events)) } rpoints } rpoints <- gen.rpoints(e

Re: [R] reason for error in small function?

2007-10-11 Thread Duncan Murdoch
On 10/11/2007 2:17 PM, Dale Steele wrote: > Running the function below, tested using the cardiff dataset from > splancs generates the following error. What changes do I need to > make to get the function to work? Thanks. --Dale > >> gen.rpoints(events, poly, 99) >> rpoints > Error: object "rpo

[R] test for whether dataset comes from a known MVN

2007-10-11 Thread Desmond Campbell
Dear Ben Bolker, Thanks for replying and offering advice, unfortunately it doesn't solve my problem. 1) The mshapiro.test() in the mvnormtest package appears only applicable for datasets containing 3-5000 samples, whereas my dataset contains 100,000 samples. 2) As you said in your email if

[R] reason for error in small function?

2007-10-11 Thread Dale Steele
Running the function below, tested using the cardiff dataset from splancs generates the following error. What changes do I need to make to get the function to work? Thanks. --Dale > gen.rpoints(events, poly, 99) > rpoints Error: object "rpoints" not found # test spatial data library(splancs)

[R] SAS Enterprise Miner -- OT

2007-10-11 Thread Doran, Harold
Sorry for the OT query, but does anyone know if there is open-source software that can read data saved as SAS enterprise miner? We have recently received data in this format for a project and the SAS add-on is $35,000. I've searched around a bit using my friends google and r-site, but haven't found

Re: [R] Fiting of gamma distribution

2007-10-11 Thread Ben Bolker
Dr. Abhey Ram Bansal wrote: > > Hi, > Could any one help me finding specific codes for fitting gamma > distribution > to the the data in log scale? thanks for the help. > cheers! > yours sincerely > Abhey Ram Bansal > Does library(MASS) fitdistr(log(x),"gamma") work for you? You'll need

Re: [R] Operating matrix positions

2007-10-11 Thread Charles C. Berry
On Thu, 11 Oct 2007, Svempa wrote: > > I have two equally long lists of equally large matrices . I now want to > generate a column that consists of the differences between position [i,j] in > matrix k in each list. That is, the first position in this new column is > 'position [1,1] in matrix 1 (of

Re: [R] simulated data using empirical distribution

2007-10-11 Thread Daniel Lakeland
On Thu, Oct 11, 2007 at 07:30:16AM -0400, tom sgouros wrote: > > Hello all: > > Many thanks to the people who have responded to my question, on and > off-list. My problem isn't completely solved, though, and perhaps you > can help again. > > The problem, again, is that I have what is essentiall

Re: [R] Type III sum of squares and appropriate contrasts

2007-10-11 Thread Greg Snow
Using type III sums of squares with non-orthogonal contrasts is like the classic grade school puzzle: "3 men decide to share a hotel room that costs $30, so each pays $10. The maneger realizes that the room they received is only $25 and sends $5 back with the bellboy. The bellboy realizes that th

Re: [R] Type III sum of squares and appropriate contrasts

2007-10-11 Thread Marc Schwartz
On Thu, 2007-10-11 at 10:24 -0700, Menelaos Stavrinides wrote: > I am running a two-way anova with Type III sums of squares and would > like to be able to understand what the different SS mean when I use > different contrasts, e.g. treatment contrasts vs helmert contrasts. I > have read John Fox's

[R] Type III sum of squares and appropriate contrasts

2007-10-11 Thread Menelaos Stavrinides
I am running a two-way anova with Type III sums of squares and would like to be able to understand what the different SS mean when I use different contrasts, e.g. treatment contrasts vs helmert contrasts. I have read John Fox's "An R and S-Plus Companion to Applied Regression" approach -p. 140- sug

Re: [R] download.file not working

2007-10-11 Thread Henrik Bengtsson
On 10/11/07, Gustaf Rydevik <[EMAIL PROTECTED]> wrote: > > So, if you download the same file using a web browser it works, ehe? > > Then look at the file size and you'll most likely find that it is > > different from when you use R code. Conclusion? Something is > > different and it works in the

[R] constraining correlations

2007-10-11 Thread Matthew Keller
Hello, I've searched for an answer to no avail. I am wondering if anyone knows how to constrain certain correlations to be equal. I have family data with 2 twins per family plus up to 2 siblings. I would like to somehow constrain all the sibling correlations (twin-sib and sib-sib) to be the same w

Re: [R] simulated data using empirical distribution

2007-10-11 Thread Greg Snow
Try the logspline package: > library(logspline) > > x1 <- rgamma(1000, 3) > > br <- c(0,1,2,4,6,8,12,15) > > h1 <- cut( x1, br, include.lowest=TRUE ) > > int1 <- embed(br,2)[ as.integer(h1), 2:1 ] > > ls1 <- oldlogspline(x1, lbound=0) > ls2 <- oldlogspline( interval=int1, lbound=0 ) > > x2 <

[R] Operating matrix positions

2007-10-11 Thread Svempa
I have two equally long lists of equally large matrices . I now want to generate a column that consists of the differences between position [i,j] in matrix k in each list. That is, the first position in this new column is 'position [1,1] in matrix 1 (of list 1)' minus 'position [1,1] in matrix 1 (

[R] Goodness-of-fit of GLM for Gamma Distribution

2007-10-11 Thread Fredrik Odegaard
Hi All, could someone please shed some light on the proper goodness-of-fit analysis for the GLM output based on Gamma distributions with the log-link? My objective is to test the goodness-of-fit for the final model (and not the comparison of nested models). In particular, should the 'Residual Dev

Re: [R] rearrange data columns

2007-10-11 Thread Gabor Grothendieck
Try this: matrix(rbind(a, b), nrow(a)) On 10/11/07, Martin Ivanov <[EMAIL PROTECTED]> wrote: > Dear R users, > I need to to the the following. Let a= 1 2 3 > 4 5 6 > and b= -1 -2 -3 be (2x3) matrices. >-4 -5 -6 > I need to combine the two ma

[R] Fiting of gamma distribution

2007-10-11 Thread Dr. Abhey Ram Bansal
Hi, Could any one help me finding specific codes for fitting gamma distribution to the the data in log scale? thanks for the help. cheers! yours sincerely Abhey Ram Bansal [[alternative HTML version deleted]] __ R-help@r-project.org mailing li

Re: [R] strange: yaxis inversion with zoo not possible?

2007-10-11 Thread Gabor Grothendieck
This looks like a bug. Currently plot.zoo takes over ylim. Here is a workaround: library(zoo) x.zoo <- zoo(1:50) plot(x.zoo, type="h", ylim = c(0, 10), yaxt = "n") axis(2, 0:10, 10:0) On 10/11/07, marcg <[EMAIL PROTECTED]> wrote: > hej there > > I want to invert the yaxis as follows: > > x<-rno

Re: [R] Axis value as percentage

2007-10-11 Thread hadley wickham
On 10/11/07, Christoph Krammer <[EMAIL PROTECTED]> wrote: > Hello, > > I am using ggplot2 to display some distributions, I my data, there are > percentages represented as 0.10, 0.13, ... > > I now want to do the axis show "5%", "10%", "15%", ... Not easily - but you can use the breaks and labels a

[R] Zoo: yaxis inversion with zoo not possible?

2007-10-11 Thread mdgi
hej there I want to invert the yaxis as follows: x<-rnorm(1:50) plot(x^2, type="h", ylim=c(0,10)) plot(x^2, type="h", ylim=c(10,0)) then doing the following it won't work - kind of strange isn't it? x.zoo<-zoo(x^2) plot(x.zoo, type="h", ylim=c(10,0)) plot(x.zoo, type="h", ylim=c(0,10)) how can

[R] How to avoid saving the row index of a data.frame into MySQL ?

2007-10-11 Thread Mikkel Grum
?dbWriteTable row.names = F Tonight's top picks. What will you watch tonight? Preview the hottest shows on Yahoo! TV. http://tv.yahoo.com/ __ R-help@r-pro

[R] DFT w/ higher definition in frequency increments.

2007-10-11 Thread Todd Remund
Am I correct in saying that when taking the DFT using the FFT, it is sometimes useful to create higher definition in frequency domain for plotting. I have noticed that there are some scientists that believe that the straight DFT is as fine of resolution as the information can give. Are there

Re: [R] Identifying and characterizing strings of NA in a vector

2007-10-11 Thread Dimitris Rizopoulos
try something like this: vec <- c(1, 2, 1, NA, NA, 1, 2, NA, NA, NA, 3, 4, NA, NA) out <- rle(is.na(vec)) table(out$lengths[out$values]) I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven Address:

Re: [R] Interpolation across merged zoo columns

2007-10-11 Thread Gabor Grothendieck
Maybe arima with the xreg= argument. On 10/11/07, Creighton, Sean <[EMAIL PROTECTED]> wrote: > Hi > > I have a collection of about 16 time series with occasional missing > data. A few of these time-series start later than the rest. There is a > relatively high correlation between them (they are ho

Re: [R] Matching and merging two rows with missing values

2007-10-11 Thread Dimitris Rizopoulos
try something like this: rw1 <- c("AA", "AG", "GG", NA, NA) rw2 <- c(NA, "AG", "GG", "AA", NA) ### rw <- rw1 rw[is.na(rw)] <- rw2[is.na(rw)] rw I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven

[R] Identifying and characterizing strings of NA in a vector

2007-10-11 Thread Marie-Pierre Sylvestre
Dear R users, I was wondering if someone could suggest a few lines of code for my problem. I want to count the number and the length of strings of NA in a vector. For example: vec <- c(1, 2, 1, NA, NA, 1, 2, NA, NA, NA, 3, 4, NA, NA) has 2 strings of NA's of length 2 and 1 string of NA' of len

[R] change missing values

2007-10-11 Thread lamack lamack
Dear all, I have a data.frame with 200 variables, where the first is a group variable and the others are numeric variables with missing values. My question is: How can I change simultanely the missing values by the mean of each group? I think in sapply, lapply, but Best regards

Re: [R] lme4 install trouble

2007-10-11 Thread David Reitter
Thank you both very much for your replies. The problem was indeed that the updated libraries were installed in the wrong place and the code below helped me solve this quickly. -- David Reitter ICCS/HCRC, Informatics, University of Edinburgh http://www.david-reitter.com On 11 Oct 2007, at 12:3

[R] Matching and merging two rows with missing values

2007-10-11 Thread Iris Kolder
Hello, I have two rows which are almost identical but miss different values at different locations. I would like to merge these two rows so that the missing values are replaced by the element in the same column on the other row making one row. If both rows contain a NA, NA remains in the outpu

Re: [R] problem installing MCMCpack

2007-10-11 Thread Ben Bolker
J. Henrikson wrote: > > I'm completely new to R and am trying to install an add-on package for one > of our faculty members. > I've had no problems with most of them, but am completely stuck trying to > figure out why MCMCpack won't install.. > any help is VERY much appreciated!!! > > here's

Re: [R] reference for logistic regression

2007-10-11 Thread Douglas Bates
On 10/11/07, Douglas Bates <[EMAIL PROTECTED]> wrote: > On 10/11/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Dear list, first accept my apologies for asking a non-R question. > > > Can anyone point me to a good reference on logistic regression? web or > > book references would be great. I

[R] Interpolation across merged zoo columns

2007-10-11 Thread Creighton, Sean
Hi I have a collection of about 16 time series with occasional missing data. A few of these time-series start later than the rest. There is a relatively high correlation between them (they are hourly temps at various locations around the UK). The longest series contains about 4 points I have

Re: [R] rearrange data columns

2007-10-11 Thread Ted Harding
On 11-Oct-07 12:09:19, Robin Hankin wrote: > > On 11 Oct 2007, at 12:55, Martin Ivanov wrote: > >> Dear R users, >> I need to to the the following. Let a= 1 2 3 >> 4 5 6 >> and b= -1 -2 -3 be (2x3) matrices. >> -4 -5 -6 >> I need to combine the

Re: [R] reference for logistic regression

2007-10-11 Thread Robin Hankin
> [snip] > > Whenever you use wikipedia you should be cautious of the quality of > the information in the articles. Generally the articles are good as a > brief introduction but they can and do contain errors so you should > check important facts and not take them at face value. A person in > one

[R] (no subject)

2007-10-11 Thread Creighton, Sean
Hi I have a collection of about 16 time series with occasional missing data. A few of these time-series start later than the rest. There is a relatively high correlation between them (they are hourly temps at various locations around the UK). The longest series contains about 4 points I have

Re: [R] test for whether dataset comes from a known MVN

2007-10-11 Thread Ben Bolker
Campbell, Desmond wrote: > > Dear all, > > > > I have a multivariate dataset containing 100,000 or more points. > > I want find the p-value for the dataset of points coming from a > particular multivariate normal distribution > > With > > mean vector u > > Covariance matrix s2 > > So >

[R] How to avoid saving the row index of a data.frame into MySQL ?

2007-10-11 Thread Ptit_Bleu
Hello everybody, I have data in a data.frame "data" whose structure is given below. I would like to save them into a MySQL database. It works quite well with dbWriteTable but with this function, it also save the number of the rows (see what I get from MySQL below the data.frame structure. Is the

Re: [R] rearrange data columns

2007-10-11 Thread Henrique Dallazuanna
Try this also: ab <- do.call("cbind", list(a, b))[,c(1,4,2,5,3,6)] On 11/10/2007, Martin Ivanov <[EMAIL PROTECTED]> wrote: > > Dear R users, > I need to to the the following. Let a= 1 2 3 > 4 5 6 > and b= -1 -2 -3 be (2x3) matrices. >-4 -5 -6 > I

Re: [R] reference for logistic regression

2007-10-11 Thread Marc Schwartz
On Thu, 2007-10-11 at 13:13 +0200, [EMAIL PROTECTED] wrote: > Dear list, first accept my apologies for asking a non-R question. > > Can anyone point me to a good reference on logistic regression? web or > book references would be great. I am interested in the use and > interpretation of dummy va

[R] test for whether dataset comes from a known MVN

2007-10-11 Thread Campbell, Desmond
Dear all, I have a multivariate dataset containing 100,000 or more points. I want find the p-value for the dataset of points coming from a particular multivariate normal distribution With mean vector u Covariance matrix s2 So H0: points ~ MVN( u, s2) H1: points not ~ MVN( u, s2) How do

Re: [R] rearrange data columns

2007-10-11 Thread Douglas Bates
On 10/11/07, Martin Ivanov <[EMAIL PROTECTED]> wrote: > Dear R users, > I need to to the the following. Let a= 1 2 3 > 4 5 6 > and b= -1 -2 -3 be (2x3) matrices. > -4 -5 -6 > I need to combine the two matrices into a new (2x6) matrix like this: >

Re: [R] rearrange data columns

2007-10-11 Thread Peter Dalgaard
Martin Ivanov wrote: > Dear R users, > I need to to the the following. Let a= 1 2 3 > 4 5 6 > and b= -1 -2 -3 be (2x3) matrices. > -4 -5 -6 > I need to combine the two matrices into a new (2x6) matrix like this: > > ab = ( 1 -1 2 -2 3 -3

Re: [R] reference for logistic regression

2007-10-11 Thread Douglas Bates
On 10/11/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Dear list, first accept my apologies for asking a non-R question. > Can anyone point me to a good reference on logistic regression? web or > book references would be great. I am interested in the use and > interpretation of dummy variable

Re: [R] rearrange data columns

2007-10-11 Thread Robin Hankin
On 11 Oct 2007, at 12:55, Martin Ivanov wrote: > Dear R users, > I need to to the the following. Let a= 1 2 3 > 4 5 6 > and b= -1 -2 -3 be (2x3) matrices. > -4 -5 -6 > I need to combine the two matrices into a new (2x6) matrix like this: > > a

[R] rearrange data columns

2007-10-11 Thread Martin Ivanov
Dear R users, I need to to the the following. Let a= 1 2 3 4 5 6 and b= -1 -2 -3 be (2x3) matrices. -4 -5 -6 I need to combine the two matrices into a new (2x6) matrix like this: ab = ( 1 -1 2 -2 3 -3 ) 4 -4 5 -5 6 -6 How can

[R] Time varying regression coefficients

2007-10-11 Thread Daphne Renault
Hi, has anyone experience or an example how to setup a state space model for time varying regression coefficient estimates in R and how to get the filtered coefficient estimates. The model looks like y(t) = a(t)'*x(t)+u(t) where y(t) and x(t) are the obse

Re: [R] lme4 install trouble

2007-10-11 Thread Douglas Bates
On 10/11/07, David Reitter <[EMAIL PROTECTED]> wrote: > After upgrading to R 2.6.0, I'm having trouble running lmer: > model <- lmer(primed ~ log(dist.time)*role + 1|target.utt, > data=data.utts) > Error in UseMethod("as.logical") : no applicable method for "as.logical" That problem originates i

Re: [R] lme4 install trouble

2007-10-11 Thread Prof Brian Ripley
The first problem is an out-of-date Matrix install, and I am pretty sure the second is too since lme4 gets headers from the installed Matrix. It's possible that you installed Matrix somewhere that is not in the default .libPaths(), in which case you need to set R_LIBS appropriately when install

Re: [R] simulated data using empirical distribution

2007-10-11 Thread tom sgouros
Hello all: Many thanks to the people who have responded to my question, on and off-list. My problem isn't completely solved, though, and perhaps you can help again. The problem, again, is that I have what is essentially a histogram, but not the underlying data, and I want to simulate data that

Re: [R] How can I obtain a boxed sweave output within Latex?

2007-10-11 Thread Frede Aakmann Tøgersen
Why not use the obvious e.g. \RecustomVerbatimEnvironment{Sinput}{Verbatim}% {formatcom=\color{red},frame=single,framerule=2pt} \RecustomVerbatimEnvironment{Soutput}{Verbatim}% {formatcom=\color{blue},frame=single,framerule=2pt} See http://www.ctan.org/tex-archive/macros/latex/contrib/fancyvr

[R] reference for logistic regression

2007-10-11 Thread darteta001
Dear list, first accept my apologies for asking a non-R question. Can anyone point me to a good reference on logistic regression? web or book references would be great. I am interested in the use and interpretation of dummy variables and prediction models. I checked the contributed section in th

Re: [R] fit.contrast and interaction terms

2007-10-11 Thread Berta
Hi Gregory, thank you so much for your answer, the use of estimable() gave me interesting hints. Following the same small example as before, I observed that "fit.contrast" and "estimable" give the same response when contrasting A vs D in the categorial variable x (differences among groups at th

[R] problem installing MCMCpack

2007-10-11 Thread J. Henrikson
I'm completely new to R and am trying to install an add-on package for one of our faculty members. I've had no problems with most of them, but am completely stuck trying to figure out why MCMCpack won't install.. any help is VERY much appreciated!!! here's what I get when I try to install the pac

[R] lme4 install trouble

2007-10-11 Thread David Reitter
After upgrading to R 2.6.0, I'm having trouble running lmer: model <- lmer(primed ~ log(dist.time)*role + 1|target.utt, data=data.utts) Error in UseMethod("as.logical") : no applicable method for "as.logical" So I thought I'd upgrade lme4 to the latest version, but unfortunately the compila

[R] Axis value as percentage

2007-10-11 Thread Christoph Krammer
Hello, I am using ggplot2 to display some distributions, I my data, there are percentages represented as 0.10, 0.13, ... I now want to do the axis show "5%", "10%", "15%", ... Is there is simple way to do this? I tried to use scale_y_prob(), but I didn't get through it. Thanks and regards, Chr

Re: [R] creating summary functions for data frame

2007-10-11 Thread Ross Darnell
I'm not sure I understand what you want but you might like to try "aggregate" Regards Ross Darnell -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Karin Lagesen Sent: Thursday, 11 October 2007 7:05 PM To: r-help@r-project.org Subject: [R] creating summa

[R] Cox with time varying effect

2007-10-11 Thread DROUET Youenn
Dear R users, I am doing Cox regression using coxph(Survival) or cph(Design). I have time varying effects (diagnosed with schoenfeld residuals Chi2 test and graph) so I first want to split time into 2 separate intervals : t<6months and t>=6months, to estimate one hazard ratio (hr) for each i

Re: [R] average waveform over many cycles

2007-10-11 Thread Jim Lemon
Bill Simpson wrote: > Thanks Jim for the help. > > I forgot to say that one of my main snags is figuring how how to chop up > the one long (44100 samples) vector into pieces (400 of them). > > This is my C-inspired way of thinking but there must be a better way in > R. > > cyclelength=44100/400

[R] Help Problems formatting date and using Regul function

2007-10-11 Thread João Carlos Santos
Hello, I problem is in the format of the date, my time series is like this: 2006070100 1244 6162 2006070101 1221 6060 2006070102 1214 6060 2006070103 1194 5959 2006070104 1182 5858 2006070105 1178

[R] creating summary functions for data frame

2007-10-11 Thread Karin Lagesen
I have a data frame that looks like this: > gctablechromonly[1:5,] refseq geometry gccontent X60_origin X60_terminus length kingdom 1 NC_009484 cir0.6799179 773000 3389227 Bacteria 2 NC_009484 cir0.6799179 773000 3389227 Bacteria 3 NC_009484

[R] strange: yaxis inversion with zoo not possible?

2007-10-11 Thread marcg
hej there I want to invert the yaxis as follows: x<-rnorm(1:50) plot(x^2, type="h", ylim=c(0,10)) plot(x^2, type="h", ylim=c(10,0)) then doing the following it won't work - kind of strange isn't it? x.zoo<-zoo(x^2) plot(x.zoo, type="h", ylim=c(10,0)) plot(x.zoo, type="h", ylim=c(0,10)) how can

  1   2   >