[R] Bugs through R in Mac

2008-01-20 Thread Fredrik Lundgren
Hello, I recently changed from Win XP to Mac OS X (10.5.1). Is there a way to run Bugs (in any version) in R (R version 2.6.0 (2007-10-03)) on this platform? Fredrik __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help P

Newsletter: Vielen dank f�r ihre Anmeldung!

2008-01-20 Thread steinfeuerfred
Hallo, Ihre E-Mailadresse "[EMAIL PROTECTED]" wurde in den Newsletterverteiler hinzugefügt. URL: http://www.fueralles.de/cgi-bin/nsl_pro/newsletter.cgi?id=steinfeuerfred Mit freundlichen Grüssen Ihr Newsletter-Team __ R-help@r-project.org mailing l

Re: [R] Bugs through R in Mac

2008-01-20 Thread Uwe Ligges
hits=-2.6 tests=BAYES_00 X-USF-Spam-Flag: NO Fredrik Lundgren wrote: > Hello, > > I recently changed from Win XP to Mac OS X (10.5.1). > Is there a way to run Bugs (in any version) in R (R version 2.6.0 > (2007-10-03)) on this platform? > Which way to "run Bugs in R" did you use in Windows

Re: [R] Looping over subsets

2008-01-20 Thread jim holtman
Can you provide an example of what you would like to do. Show what a full set (on a small scale would be) and then how you would select the subsets and then what type of processing you would like to do (PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commen

[R] spacing problems

2008-01-20 Thread mohamed nur anisah
Dear all, I try to do a matrix with this data but the warning massage had occur: In matrix(x5, ncol = 6, byrow = T) : data length [116] is not a sub-multiple or multiple of the number of rows [20] I think the spacing problem cause this where double spacing and tabs are everywhere!!

[R] Newsletter: Ihre E-Mailadresse wurde ausgetragen.

2008-01-20 Thread steinfeuerfred
Hallo, Ihre E-Mailadresse "[EMAIL PROTECTED]" wurde aus dem Verteiler entfernt. URL: http://www.fueralles.de/cgi-bin/nsl_pro/newsletter.cgi?id=steinfeuerfred Mit freundlichen Grüssen Ihr Newsletter-Team __ R-help@r-project.org mailing list https://sta

Re: [R] problems with .svg

2008-01-20 Thread Gabor Csardi
Yes, try another mirror. Austria should work. Or go to http://cran.at.r-project.org/src/contrib/PACKAGES.html and download the package directly and install it via R CMD INSTALL You might need to give the '-l' options for where to install to. G. On Sun, Jan 20, 2008 at 03:49:22PM +0100, Mag. Fe

[R] model selection method - step() or bic.glm()

2008-01-20 Thread Des Callaghan
Dear R-helpers, I'm considering two methods of selecting a poisson regression model within R: 1. Using the step() function (stats package) to find the best model by a stepwise algorithm and AIC 2. Using the bic.glm() function (BMA package) to find the best model by Bayesian Model Averaging and BI

[R] sorting

2008-01-20 Thread threshold
Hi, I want to sort my matrix according to (any) selected column. For example given matrix: > x [,1] [,2] [,3] [1,]347 [2,]258 [3,]169 I want to sort the first column in ascending order and make the other columns follow the 'new order' like: > x1 [,1]

Re: [R] (sem assunto)

2008-01-20 Thread John Fox
Dear Edison, There are several approaches you could take. One would be to use a component+residual plot (see the cr.plots function in the car package, which has a method for glm objects, including logistic regression), although that doesn't provide a "test." Another approach would be to fit a nonp

Re: [R] sorting

2008-01-20 Thread Duncan Murdoch
On 20/01/2008 10:50 AM, threshold wrote: > Hi, I want to sort my matrix according to (any) selected column. For example > given matrix: >> x > [,1] [,2] [,3] > [1,]347 > [2,]258 > [3,]169 > > I want to sort the first column in ascending order and make the o

Re: [R] problems with .svg

2008-01-20 Thread Mag. Ferri Leberl
The program does not open the interface again to select am mirror. Neither works install.packages("RSvgDevice", dependencies = TRUE, repos="http://cran.r-project.org",contriburl="http://cran.r-project.org";) the feedback here is Warnung in install.packages("RSvgDevice", dependencies = TRUE, repo

Re: [R] problems with .svg

2008-01-20 Thread Prof Brian Ripley
On Sun, 20 Jan 2008, Mag. Ferri Leberl wrote: The program does not open the interface again to select am mirror. Neither works install.packages("RSvgDevice", dependencies = TRUE, repos="http://cran.r-project.org",contriburl="http://cran.r-project.org";) the feedback here is Warnung in install

Re: [R] Bugs through R in Mac

2008-01-20 Thread Vincent
You could try JAGS. According to the website it is 'an engine for the BUGS language that runs on Unix'. It runs on Mac OS X and has an interface with R (rjags). http://www-fis.iarc.fr/~martyn/software/jags/ Vincent On Jan 20, 5:58 am, Uwe Ligges <[EMAIL PROTECTED]> wrote: > hits=-2.6 tests=BAYES

Re: [R] access data inside package

2008-01-20 Thread Benilton Carvalho
have you tried data() instead? b On Jan 20, 2008, at 3:21 PM, Dan Kelley wrote: The technique d <- get("d", pos=globalenv()) doesn't work for me. It just says that it cannot get "d", even though I have a data/d.rda file. Do I have to do something special with namespaces, to find it? P

Re: [R] access data inside package

2008-01-20 Thread Dan Kelley
The technique d <- get("d", pos=globalenv()) doesn't work for me. It just says that it cannot get "d", even though I have a data/d.rda file. Do I have to do something special with namespaces, to find it? PS. a possibly-related link is as follows. http://www.nabble.com/how-to-make-read-on

Re: [R] access data inside package

2008-01-20 Thread Dan Kelley
Yes, data() works, but then I have this warning from "R CMD check" on my package, so I think I should not be doing it that way. Benilton Carvalho wrote: > > have you tried > data() > instead? > b > > > -- View this message in context: http://www.nabble.com/access-data-inside-package-tp14

[R] distance matrix

2008-01-20 Thread WCD
Hello, I want do get the point to point distance matrix. Suppose, I have a data frame where the first column is X and second column is Y coordinate of points. I define a function dst(x1,y1,x2,y2) to claculate distance between two points. But I don't know how to tell R to calculate dst for every tw

Re: [R] access data inside package

2008-01-20 Thread Benilton Carvalho
then combine system.file() with load(). b On Jan 20, 2008, at 3:40 PM, Dan Kelley wrote: Yes, data() works, but then I have this warning from "R CMD check" on my package, so I think I should not be doing it that way. Benilton Carvalho wrote: have you tried data() instead? b -- Vie

[R] Res: distance matrix

2008-01-20 Thread Milton Cezar Ribeiro
Like this? my.points<-data.frame(cbind(x=c(1,10,50,100,1,20,10,100),y=c(1,5,20,50,100,1,1,10))) rownames(my.points)<-paste("pt",1:8,sep="") plot(my.points) text((my.points+2),rownames(my.points),col="red") require(vegan) my.points.dist<-vegdist(my.points,method="euclidean") my.points.dist kind re

Re: [R] access data inside package

2008-01-20 Thread Uwe Ligges
hits=-2.6 tests=BAYES_00 X-USF-Spam-Flag: NO First call data("d") then everything is fine already - except that codetools are moaning around. Those codetools can be calmed down by the line we had already: d <- get("d", pos=globalenv()) Uwe Ligges Dan Kelley wrote: > Yes, data() work

Re: [R] distance matrix

2008-01-20 Thread Erin Hodgess
Suppose you have: > x <- runif(25) > y <- rnorm(25) > x.df <- data.frame(x,y) > dist(x.df) The default is euclidean distance. Hope this helps! Sincerely, Erin On Jan 20, 2008 2:41 PM, WCD <[EMAIL PROTECTED]> wrote: > > Hello, I want do get the point to point distance matrix. > Suppose, I hav

Re: [R] access data inside package

2008-01-20 Thread Dan Kelley
My "R CMD check" gives me fit.tide: no visible binding for global variable ‘tideconst’ when I do load(paste(system.file(package="oce"),"data/tidesetup.rda",sep="/")) ... try to use tideconst ... where tidesetup.rda holds, among other things, a variable named "tideconst". I guess I can

Re: [R] access data inside package

2008-01-20 Thread Dan Kelley
Thanks, Uwe, this works perfectly. Uwe Ligges-3 wrote: > > hits=-2.6 tests=BAYES_00 > X-USF-Spam-Flag: NO > > > First call > >data("d") > > then everything is fine already - except that codetools are moaning > around. Those codetools can be calmed down by the line we had already: > >

[R] changing color scheme in R in UNIX

2008-01-20 Thread Andrew Yee
Hi, I've been using R in Windows but am now starting to use it more often in the UNIX environment. In Windows, I'm used to the text provided by the user appearing in red, and the output from R appearing in blue. Is there a way to achieve this in UNIX? Thanks, Andrew [[alternative HTML v

Re: [R] access data inside package

2008-01-20 Thread Duncan Murdoch
On 20/01/2008 3:21 PM, Dan Kelley wrote: > The technique > d <- get("d", pos=globalenv()) > doesn't work for me. It just says that it cannot get "d", even though I > have a data/d.rda file. > > Do I have to do something special with namespaces, to find it? > > PS. a possibly-related link i

Re: [R] distance matrix

2008-01-20 Thread WCD
Wow, thank you all for advice, I'll have to get more familiar with R. The dist() fuction is probably the right way. Filip Kral. Erin Hodgess-2 wrote: > > Suppose you have: > >> x <- runif(25) >> y <- rnorm(25) >> x.df <- data.frame(x,y) >> dist(x.df) > > > The default is euclidean distance.

Re: [R] image/area plot

2008-01-20 Thread Henrique Dallazuanna
Perhaps: kk=data.frame(fact=letters[1:10], freq=c(5,1,10,2,10,7,5,10,30,20)) res <- rep(kk[[1]], kk[[2]]) resmat <- matrix(c(res), 10) image(1:10, 1:10, resmat, col=rainbow(20)) grid(ncol(resmat), nrow(resmat)) ##1 text(expand.grid(seq_len(ncol(resmat)), seq_len(nrow(resmat))), as.character(res))

[R] R and samr under Linux

2008-01-20 Thread markaoki
hi, This is my first day with R, pls pardon my newbie gaffs. Im running under Linux, samr V1.25 and R (V2.4.1 and 2.6.1), 32 and 64 bit. Either way, when I run using samr library I get the error: "samr is not a valid package - installed < 2.0.0?" I see in R source code a conditional lead

[R] Efficient way for multiplying vectors with a only certain number of rows in a matrix

2008-01-20 Thread Ralph79
Dear R-users, I am working on a problem that I am currently not able to solve efficiently. It is about multiplying one column of a matrix with only a certain number of rows of another matrix. Let me illustrate my problem with an example: n.obs = 800 n.rowsperobs = 300 n.param = 23 Designmat =

Re: [R] Newbie question on subsets

2008-01-20 Thread Bill.Venables
This is very standard problem for neophytes. Subsetting a factor does not automatically subset the levels, so the all appear in the boxplot. I think the simplest way round this is to replace ~ country in the formula by ~ factor(country). The call to factor() will re-set the levels to only those

Re: [R] how to extract data by specific months from a monthly ts object

2008-01-20 Thread Marc Schwartz
tom soyer wrote: > Hi, > > I am trying to extract data from a ts object by month, e.g., extract Jan, > Feb, and Aug data from a monthly ts object. I tried the following but it > didn't work: > >> xa=1:50 >> ta=ts(xa,start=c(1990,1),frequency=12) >> ta[cycle(ta)==c(1,2)] # this method works but it

[R] how to extract data by specific months from a monthly ts object

2008-01-20 Thread tom soyer
Hi, I am trying to extract data from a ts object by month, e.g., extract Jan, Feb, and Aug data from a monthly ts object. I tried the following but it didn't work: > xa=1:50 > ta=ts(xa,start=c(1990,1),frequency=12) > ta[cycle(ta)==c(1,2)] # this method works but it's not what I want [1] 1 2 13

Re: [R] how to extract data by specific months from a monthly ts object

2008-01-20 Thread Gabor Grothendieck
Try %in% ta[ cycle(ta) %in% c(1, 2, 8) ] cycle(ta) == c(1, 2) works only in this case since c(1, 2) is recycled to cycle(ta) == rep(c(1, 2), length = length(ta)) It would not have worked had your data had started on an even numbered month. This also works: cyc <- cycle(ta) ta[ cyc == 1 | cy

Re: [R] how to extract data by specific months from a monthly ts object

2008-01-20 Thread tom soyer
Thanks Marc and Gabor, I got it! On 1/20/08, Marc Schwartz <[EMAIL PROTECTED]> wrote: > > tom soyer wrote: > > Hi, > > > > I am trying to extract data from a ts object by month, e.g., extract > Jan, > > Feb, and Aug data from a monthly ts object. I tried the following but it > > didn't work: > > >

[R] Vendez Votre voiture en 1 clic

2008-01-20 Thread C'est pour vous!
-- Pour vous d�sabonner � cette liste, visitez http://jbala.ws/lists/lt.php?id=MkxRBwUHBVJIB08AVV1XAQ%3D%3D Pour mettre vos pr�f�rences � jour, visitez http://jbala.ws/lists/lt.php?id=MkxRBwUHBVVIB08AVV1XAQ%3D%3D Faire suivre un message a quelqun http://jbala.ws/lists/lt.php?id=MkxRBwUHBVRIB

Re: [R] Efficient way for multiplying vectors with a only certain number of rows in a matrix

2008-01-20 Thread Henrique Dallazuanna
Perhaps: n.obs = 800 n.rowsperobs = 300 n.param = 23 Designmat = matrix(rnorm(n.obs*n.rowsperobs*n.param),ncol=n.param) Betamat = matrix(rnorm(n.obs*n.param),nrow=n.param) Design.spl <- split(as.data.frame(Designmat), rep(1:n.obs, each=n.rowsperobs)) res <- sapply(1:ncol(Betamat), function(x)as.

Re: [R] R and samr under Linux

2008-01-20 Thread markaoki
hi, I have determined some of my own answers, so will share here. There are binary associations within the R libraries specific to the environment that created them, be it Windows or Linux, 32 or 64 bit. I found these associations in the Meta directory of the libraries. So, R libraries cannot be

[R] OT: single measure of (group) correlation with more than two vectors?

2008-01-20 Thread context grey
Hello, I have a survey in which a number of people rated a set of items on a 1..5 scale. I believe it would be desirable to argue that the people's responses are correlated, and thus that the rating task makes sense to people. Is there a standard approach to this? With only 2 people, the cor

Re: [R] 'matrix' returns integer instead of decimal

2008-01-20 Thread Marc Schwartz
Brant Inman wrote: > R-helpers: > > I am experiencing some odd behavior with the 'matrix' function that I have > not experienced before and was wondering if there is something that I was > missing in my code. > > - > > sessionInfo() > R version 2.6.1 (2007-11-26

Re: [R] 'matrix' returns integer instead of decimal

2008-01-20 Thread Thomas Lumley
On Sun, 20 Jan 2008, Brant Inman wrote: > > Note the problems in rows 15, 21, 37 and 43. They should read [0.5, 45.5], > [14.5, 21.5], etc... The matrix function seems to be rounding the second > column up to the next integer. Why would this occur? Can I do something to > prevent this? > > I

[R] 'matrix' returns integer instead of decimal

2008-01-20 Thread Brant Inman
R-helpers: I am experiencing some odd behavior with the 'matrix' function that I have not experienced before and was wondering if there is something that I was missing in my code. - > sessionInfo() R version 2.6.1 (2007-11-26) i386-pc-mingw32 locale: LC_COLLATE

Re: [R] 'matrix' returns integer instead of decimal

2008-01-20 Thread Henrik Bengtsson
Check your getOption("digits"). Default is typically 7. Either you or a package/function sets it to a small value. You get that **output** with options(digits=n) where n=1,2,3. /Henrik On Jan 20, 2008 7:13 PM, Thomas Lumley <[EMAIL PROTECTED]> wrote: > On Sun, 20 Jan 2008, Brant Inman wrote: >

Re: [R] 'matrix' returns integer instead of decimal

2008-01-20 Thread Brant Inman
*As usual, the R-helpers were bang on. Some package must have modified my digits option without me noticing.* ** *--* ** *> test <- matrix(c(7,47,4,38,20,96,1,14,10,48,2,101,12,161, + 1,28,1,19,22,49,25,162,31,200,9,39,22,193, + 0.5,45.5,31,131,4,75,31,220,7,55,3,91,14.5, + 25.5,3,

Re: [R] 'matrix' returns integer instead of decimal

2008-01-20 Thread Ben Bolker
Brant Inman gmail.com> writes: > > *As usual, the R-helpers were bang on. Some package must have modified my > digits option without me noticing.* I'm pretty certain that the arm package is the problem. > options("digits") $digits [1] 7 > library(arm) Loading required package: MASS Loadin

Re: [R] changing color scheme in R in UNIX

2008-01-20 Thread Charles C. Berry
On Sun, 20 Jan 2008, Andrew Yee wrote: > Hi, I've been using R in Windows but am now starting to use it more often in > the UNIX environment. In Windows, I'm used to the text provided by the user > appearing in red, and the output from R appearing in blue. Is there a way > to achieve this in UNI