Re: [R] Help in installing and loading the BradleyTerry add on package in R

2007-09-10 Thread Jim Lemon
Kalyan Roy (DEL/MSG) wrote: > How do I install and load the BradleyTerry add on package in R 2.5.1 in > MSWindowsXP environment? > Hi Kalyan, If R CMD INSTALL doesn't work, you can use WinZip or Zip Reader to unzip the package to: C:\Program Files\R-2.5.1\library or whatever your path to the "

Re: [R] Help in installing and loading the BradleyTerry add on package in R

2007-09-10 Thread Turner, Heather
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jim Lemon Sent: 10 September 2007 12:07 To: [EMAIL PROTECTED] Cc: r-help@stat.math.ethz.ch Subject: Re: [R] Help in installing and loading the BradleyTerry add on package in R Kalyan Roy (DEL/MSG) wrote: > How do I install and

Re: [R] Help with color coded bar graph

2007-09-08 Thread Jim Lemon
Luis Naver wrote: > I have a list of observations that are -1, 1 or 0. I would like to > represent them in a horizontal bar color coded based on value like a > stacked bar graph. I can achieve this in the form of a png with the > following code: > > A = floor(runif(10)*3) - 1 > > png(width

Re: [R] Help with color coded bar graph

2007-09-07 Thread Luis Naver
Thanks to all who replied (and very quickly). Unfortunatly I was not clear enough as to my intentions. My goal is to replicate a graph I saw in the work by Perry, Miller and Enright in "A comparison of methods for the statistical analysis of spatial point patterns in plant ecology" (http

Re: [R] Help with color coded bar graph

2007-09-07 Thread Marc Schwartz
On Fri, 2007-09-07 at 15:07 -0500, Marc Schwartz wrote: > On Fri, 2007-09-07 at 12:45 -0700, Luis Naver wrote: > > I have a list of observations that are -1, 1 or 0. I would like to > > represent them in a horizontal bar color coded based on value like a > > stacked bar graph. I can achieve th

Re: [R] Help with color coded bar graph

2007-09-07 Thread Achim Zeileis
On Fri, 7 Sep 2007, Luis Naver wrote: > I have a list of observations that are -1, 1 or 0. I would like to > represent them in a horizontal bar color coded based on value like a > stacked bar graph. I can achieve this in the form of a png with the > following code: > > A = floor(runif(10)*3) - 1

Re: [R] Help with color coded bar graph

2007-09-07 Thread Marc Schwartz
On Fri, 2007-09-07 at 12:45 -0700, Luis Naver wrote: > I have a list of observations that are -1, 1 or 0. I would like to > represent them in a horizontal bar color coded based on value like a > stacked bar graph. I can achieve this in the form of a png with the > following code: > > A = fl

Re: [R] help on replacing values

2007-09-07 Thread darteta001
Thanks a lot Gabor, that was very helpful. All sorted now! Best David > Your columns are factors, not character strings. Use as.is = TRUE as > an argument to read.table. Also its a bit dangerous to use T although > not wrong. Its safer to use TRUE. > > On 9/7/07, [EMAIL PROTECTED] <[EMAIL

Re: [R] help on replacing values

2007-09-07 Thread Gabor Grothendieck
Your columns are factors, not character strings. Use as.is = TRUE as an argument to read.table. Also its a bit dangerous to use T although not wrong. Its safer to use TRUE. On 9/7/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Dear List, > > I have a newbie question. I have read in a data.

Re: [R] Help: how can i build a constrained non-linear model?

2007-09-05 Thread 维娜 缪
Dear all I try to run the code as follows, test.model<-nls(y~exp(A)*(x-PMA)^4+exp(B)*(x-PMA)^2+Const, data=test, start=list(A=8,B=5,Const=10,PMA=0), control=nls.control(maxiter = 50,minFactor=1/1048), trace=TRUE) But how can i build a selfSart, since i have much data ? Thanks for your help fi

Re: [R] Help on inverse distribution

2007-09-04 Thread Rolf Turner
On 5/09/2007, at 11:16 AM, Lisa Hu wrote: > To make it specific, I need to simulation Y with inverse beta > distribution, > that is, Y~inverseF(X), where F is the CDF of beta distribution. > THANKS > > On 9/4/07, Lisa Hu <[EMAIL PROTECTED]> wrote: >> >> Dear All, >> >> I need to use the inver

Re: [R] Help on inverse distribution

2007-09-04 Thread Lisa Hu
To make it specific, I need to simulation Y with inverse beta distribution, that is, Y~inverseF(X), where F is the CDF of beta distribution. THANKS On 9/4/07, Lisa Hu <[EMAIL PROTECTED]> wrote: > > Dear All, > > I need to use the inverse of some distributions in R for simulation, but I > could not

Re: [R] Help on coxph

2007-08-26 Thread Daniel Malter
In the R-surface menu, go to "packages" - "install packages". Select a server and install the package "survival". Then, on the prompt, type: library(survival) Then it works. Look up the numerous manual on using R if you need further help. If that's not the issue, give us more detailed information

Re: [R] Help with vector gymnastics

2007-08-23 Thread Eik Vettorazzi
try 5*which(tf)[cumsum(tf)] Gladwin, Philip schrieb: > Hello, > > What is the best way of solving this problem? > > answer <- ifelse(tf=TRUE, i * 5, previous answer) > where as an initial condition > tf[1] <- TRUE > > > For example if, > tf <- c(T,F,F,F,T,T,F) > over i = 1 to 7 > then the output

Re: [R] Help with vector gymnastics

2007-08-22 Thread Erik Iverson
Philip - I don't know if this is the "best" way, but it gives you the output you want. Using your tf, vals <- rle(ifelse(tf, 5*which(tf), 0)) vals$values[vals$values == 0] <- vals$values[which(vals$values==0) - 1] inverse.rle(vals) [1] 5 5 5 5 25 30 30 Gladwin, Philip wrote: > Hello, > >

Re: [R] Help with vector gymnastics

2007-08-22 Thread Felix Andrews
library(zoo) tf <- c(T,F,F,F,T,T,F) i <- seq(7) answer <- ifelse(tf, i*5, NA) answer <- na.locf(answer) On 8/23/07, Gladwin, Philip <[EMAIL PROTECTED]> wrote: > Hello, > > What is the best way of solving this problem? > > answer <- ifelse(tf=TRUE, i * 5, previous answer) > where as an initial con

Re: [R] help and Firefox

2007-08-15 Thread Erich Neuwirth
I found a solution to my problem. It is describe here. http://kb.mozillazine.org/Windows_error_opening_Internet_shortcut_or_local_HTML_file_-_Firefox Essentially, it involves switching off DDE for some file associations in Windows Explorer. It really is a Firefox bug. Erich Neuwirth wrote: > My

Re: [R] Help with npmc

2007-08-14 Thread Paul Fenner
I cant't seem to get npmc to make a comparison to a control level >summary(npmc(brain), type="BF", control=1) $`Data-structure` group.index class.level nobs c 1 c 30 l 2 l 30 r 3 r 30 $`Results of the multiple Behrens-Fisher-Test

Re: [R] help with scatterplot3d

2007-08-13 Thread Ben Bolker
Ryan Briscoe Runquist ucdavis.edu> writes: > > > Hello, > > I am having a bit of trouble with scatterplot3d(). > > I was able to plot a 3d cloud of points using the following code: > > >my.3dplot<-scatterplot3d(my.coords, pch=19, zlim=c(0,1), scale.y=0.5, > angle=30, box=FALSE) > > where my

Re: [R] help with scatterplot3d

2007-08-13 Thread Duncan Murdoch
On 8/13/2007 3:03 PM, Ryan Briscoe Runquist wrote: > Hello, > > I am having a bit of trouble with scatterplot3d(). > > I was able to plot a 3d cloud of points using the following code: > >>my.3dplot<-scatterplot3d(my.coords, pch=19, zlim=c(0,1), scale.y=0.5, > angle=30, box=FALSE) > > where my.

Re: [R] Help using gPath

2007-08-12 Thread hadley wickham
> Here's a partial extract from a sample session after running your code > (NOTE this is using the development version of R; grid.ls() does not > exist in R 2.5.1 or earlier): > > Inspect the grob tree with grid.ls() (similar to Hadley's > current.grobTree(), but with different formatting) ... (I

Re: [R] Help with cumsum function

2007-08-11 Thread Uwe Ligges
Hectorman Hectorman wrote: > Hello! > > I have a question regarding the cumsum function that I do not know how to > solve. Would appreciate help from someone. I have imported data from a > txtfile with 2 columns. I am interested in the seconds column, which > contains numbers from i=0 to 40.

Re: [R] Help using gPath

2007-08-11 Thread Paul Murrell
Hi Emilio Gagliardi wrote: > haha Paul, > > > It's important not only to post code, but also to make sure that other > people can run it (i.e., include real data or have the code generate > data or use one of R's predefined data sets). > > > Oh, I hadn't thought of using the prede

Re: [R] Help wit matrices

2007-08-10 Thread Roland Rau
I hope you don't mind that I offer also two solutions. No.1 is really bad. No.2 should be on par with the other ones. Best, Roland mydata <- matrix(rnorm(10*10), ncol=10) threshold.value <- 1.5 mydata2 <- matrix(0, nrow=nrow(mydata), ncol=ncol(mydata)) mydata3 <- matrix(0, nrow=nrow(mydata),

Re: [R] Help wit matrices

2007-08-10 Thread Ted Harding
On 10-Aug-07 18:05:50, Lanre Okusanya wrote: > Hello all, > > I am working with a 1000x1000 matrix, and I would like to return a > 1000x1000 matrix that tells me which value in the matrix is greater > than a theshold value (1 or 0 indicator). > i have tried > mat2<-as.matrix(as.numeric(mat1>0.2

Re: [R] Help wit matrices

2007-08-10 Thread John Kane
Will something like this help? mm <- matrix(rnorm(100),nrow=10) mm nn <- mm >.5 nn --- Lanre Okusanya <[EMAIL PROTECTED]> wrote: > Hello all, > > I am working with a 1000x1000 matrix, and I would > like to return a > 1000x1000 matrix that tells me which value in the > matrix is greater > tha

Re: [R] Help wit matrices

2007-08-10 Thread Ravi Varadhan
mailto:[EMAIL PROTECTED] On Behalf Of Lanre Okusanya Sent: Friday, August 10, 2007 2:20 PM To: jim holtman Cc: r-help@stat.math.ethz.ch Subject: Re: [R] Help wit matrices that was ridiculously simple. duh. THanks Lanre On 8/10/07, jim holtman <[EMAIL PROTECTED]> wrote: > Is this what yo

Re: [R] Help wit matrices

2007-08-10 Thread Henrique Dallazuanna
mat2<-matrix(as.numeric(mat1>0.25), ncol=1000) -- Henrique Dallazuanna Curitiba-Paraná-Brasil 25° 25' 40" S 49° 16' 22" O On 10/08/07, Lanre Okusanya <[EMAIL PROTECTED]> wrote: > > Hello all, > > I am working with a 1000x1000 matrix, and I would like to return a > 1000x1000 matrix that tells me w

Re: [R] Help wit matrices

2007-08-10 Thread jim holtman
Is this what you want: > x <- matrix(runif(100), 10) > round(x, 3) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 0.268 0.961 0.262 0.347 0.306 0.762 0.524 0.062 0.028 0.226 [2,] 0.219 0.100 0.165 0.131 0.578 0.933 0.317 0.109 0.527 0.131 [3,] 0.517 0.763 0.322 0.374 0.9

Re: [R] Help wit matrices

2007-08-10 Thread Lanre Okusanya
that was ridiculously simple. duh. THanks Lanre On 8/10/07, jim holtman <[EMAIL PROTECTED]> wrote: > Is this what you want: > > > x <- matrix(runif(100), 10) > > round(x, 3) >[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] > [1,] 0.268 0.961 0.262 0.347 0.306 0.762 0.524 0.06

Re: [R] Help using gPath

2007-08-10 Thread Emilio Gagliardi
haha Paul, It's important not only to post code, but also to make sure that other > people can run it (i.e., include real data or have the code generate > data or use one of R's predefined data sets). Oh, I hadn't thought of using the predefined datasets, thats a good idea! Also, isn't this "n

Re: [R] help with counting how many times each value occur in each column

2007-08-10 Thread François Pinard
[Gabor Grothendieck] > table(col(mat), mat) Clever, simple, and elegant! :-) -- François Pinard http://pinard.progiciels-bpi.ca __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] help with counting how many times each value occur in eachcolumn

2007-08-10 Thread Gasper Cankar
Tom, If all values (-100,0,-50) would be in every column then simple apply(data,2,table) would work. Even if there aren0t all values in every column you could correct that and insert additional lines with all values for all columns like data <- cbind(data,matrix(ncol=10,nrow=3,rep(c(-100,0,-5

Re: [R] help with counting how many times each value occur in each column

2007-08-10 Thread François Pinard
[Tom Cohen] > I have the following dataset and want to know how many times each value > occur in each column. > >data >[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] > [1,] -100 -100 -100000000 -100 > [2,] -100 -100 -100 -100 -100 -100 -100 -100 -100 -100

Re: [R] help with counting how many times each value occur in each column

2007-08-10 Thread Gabor Grothendieck
Try this where we have constructed the example to illustrate that it does handle the case where not all values are in each column: mat <- matrix(rep(1:6, each = 4), 6) table(col(mat), mat) On 8/10/07, Tom Cohen <[EMAIL PROTECTED]> wrote: > Dear list, > I have the following dataset and wan

Re: [R] Help using gPath

2007-08-09 Thread Paul Murrell
Hi Emilio Gagliardi wrote: > Hi Paul, > > I'm sorry for not posting code, I wasn't sure if it would be helpful without > the data...should I post the code and a sample of the data? I will remember > to do that next time! It's important not only to post code, but also to make sure that other

Re: [R] Help using gPath

2007-08-09 Thread Emilio Gagliardi
Hi Paul, I'm sorry for not posting code, I wasn't sure if it would be helpful without the data...should I post the code and a sample of the data? I will remember to do that next time! > grid.gedit(gPath("ylabel.text.382"), gp=gpar(fontsize=16)) OK, I think my confusion comes from the notation

Re: [R] Help using gPath

2007-08-09 Thread Paul Murrell
Hi Emilio Gagliardi wrote: > Hi everyone,I'm trying to figure out how to use gPath and the documentation > is not very helpful :( > > I have the following plot object: > plot-surrounds:: > background > plot.gTree.378:: > background > guide.gTree.355:: (background.rect.345, minor-horizontal

Re: [R] Help on R performance using aov function

2007-08-09 Thread Prof Brian Ripley
aov() will handle multiple responses and that would be considerably more efficient than running separate fits as you seem to be doing. Your code is nigh unreadable: please use your spacebar and remove the redundant semicolons: `Writing R Extensions' shows you how to tidy up your code to make i

Re: [R] help on getting weekday

2007-08-06 Thread Uwe Ligges
Baoqiang Cao wrote: > Dear All, > > I'd like to know which weekday it is for any given date, such as, what is > the weekday for 2006-06-01? Any help will be highly appreciated. See ?weekdays Uwe Ligges > Best, > Baoqiang > > [[alternative HTML version deleted]] > >

Re: [R] help with ROC curve

2007-07-30 Thread gyadav
Hi Ritesh, may be i can help, but yeah i will try ? you can reach help to ROCR package by help.search("ROCR") What is the structure of your data ? can you give some sample i.e. few lines of your dataset ? "To build ROC curve using only PSA(variable) alone of the original cohort against the

Re: [R] Help with Dates

2007-07-26 Thread Jeffrey J. Hallman
Are you using the latest version of fame? 1.05 and earlier had a bug in tisFromCsv that was fixed in 1.08. Below I show what I get with fame version 1.08. There is still a problem in that the "frequency-figuring" logic appears to think the frequency is bwsunday (biweekly with weeks ending on Sun

Re: [R] Help with Dates

2007-07-26 Thread Gabor Grothendieck
Yes, I was using 1.05. I get the same result as you with 1.08. On 26 Jul 2007 11:39:41 -0400, Jeffrey J. Hallman <[EMAIL PROTECTED]> wrote: > Are you using the latest version of fame? 1.05 and earlier had a bug in > tisFromCsv that was fixed in 1.08. > > Below I show what I get with fame version

Re: [R] Help with Dates

2007-07-26 Thread Gabor Grothendieck
On 26 Jul 2007 09:59:31 -0400, Jeffrey J. Hallman <[EMAIL PROTECTED]> wrote: > zoo is nice. 'tisFromCsv()' in the fame package is nicer. > > Jeff 1. What am I doing wrong here? I only get one data column. 2. I assume the regularized dates which do not exactly match the input ones are intend

Re: [R] Help with Dates

2007-07-26 Thread Jeffrey J. Hallman
zoo is nice. 'tisFromCsv()' in the fame package is nicer. Jeff __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, min

Re: [R] Help with Dates

2007-07-23 Thread Hans-Peter
> I am taking an excel dataset and reading it into R using read.table. > (actually I am dumping the data into a .txt file first and then reading data > in to R). If you are on *windows* you could also try my xlsReadWrite package which contains some datetime functions. Exceldates (e.g. formatted as

Re: [R] Help on "looping problem" needed!

2007-07-23 Thread Dimitris Rizopoulos
try this: tol <- 0.01 mat <- matrix(as.numeric(NA), 1000, 5) k <- 1 while(any(is.na(mat))){ x <- rnorm(1000, sd = 0.02) if (abs(mean(x)) < tol) { mat[, k] <- x k <- k + 1 } } abs(colMeans(mat)) par(mfrow = c(2, 3)) apply(mat, 2, hist) I hope it helps. Best, Dimi

Re: [R] Help with Dates

2007-07-20 Thread Achim Zeileis
Alex: > I am taking an excel dataset and reading it into R using read.table. This sets up a "data.frame" object. The data you have are probably more conveniently represented as a time series, storing the date in an appropriate format, e.g., in class "Date". > (actually I am dumping the data into

Re: [R] Help with Dates

2007-07-19 Thread jim holtman
Try some of the following: head(subset(df, Yr %in% c("00","01","02","03"))) subset(df, (Yr >= '00') & (Yr <= '03')) # same as above subset(df, (Yr == '00') | (Yr == '01') | (Yr == '02') |(Yr == '03')) # same On 7/19/07, Alex Park <[EMAIL PROTECTED]> wrote: > R > > I am taking an excel datase

Re: [R] help with heatmap - how to remove annoying "X" before numeric values?

2007-07-19 Thread Gabor Grothendieck
Try this. It makes a copy of heatmap.2 whose scope is changed to first look within heatmap.3 for functions like mtext. We redefine mtext to intercept the text argument and change it appropriately. Then we call our copy of heatmap.2. With this there is no need to change the source of heatmap.2.

Re: [R] help with heatmap - how to remove annoying "X" before numeric values?

2007-07-19 Thread Suzanne Matthews
Sorry, I just realized I didn't send this to the list! (See below) Thanks for all the help! All is working fine now. If anyone knows of a more straightforward way to change the "Value" string for the Key, please let me know (just to satisfy my curiosity). I got it to work by modifying the source

Re: [R] help with heatmap - how to remove annoying "X" before numeric values?

2007-07-18 Thread Moshe Olshansky
I was right saying that my solution was not the best possible! --- Prof Brian Ripley <[EMAIL PROTECTED]> wrote: > read.table('temp.txt', check.names = FALSE) > > would be easier (and more general, since make.names > can do more than > prepend an 'X'). > > On Wed, 18 Jul 2007, Moshe Olshansky w

Re: [R] help with heatmap - how to remove annoying "X" before numeric values?

2007-07-18 Thread Prof Brian Ripley
read.table('temp.txt', check.names = FALSE) would be easier (and more general, since make.names can do more than prepend an 'X'). On Wed, 18 Jul 2007, Moshe Olshansky wrote: > Hi Suzanne, > > My solution (which I am sure is not the best) would > be: > >> heat <- read.table('temp.txt') >> heat >

Re: [R] help with heatmap - how to remove annoying "X" before numeric values?

2007-07-18 Thread Moshe Olshansky
Hi Suzanne, My solution (which I am sure is not the best) would be: > heat <- read.table('temp.txt') > heat X1905 X1910 X1950 X1992 X2011 X2020 Gnat 0.08 0.29 0.29 0.37 0.39 0.43 Snake 0.16 0.34 0.32 0.40 0.41 0.53 Bat0.40 0.54 0.52 0.60 0.60 0.63 Cat0.16 0.27 0.

Re: [R] help with heatmap - how to remove annoying "X" before numeric values?

2007-07-18 Thread Gabor Grothendieck
read.table is doing that, not heatmap.2. Use read.table("temp.txt", header = TRUE, check.names = FALSE) On 7/18/07, Suzanne Matthews <[EMAIL PROTECTED]> wrote: > Hello All, > > I have a simple question based on how things are labeled on my heat map; > particularly, there is this annoying "X" t

Re: [R] HELP FOR BUGS

2007-07-15 Thread Mike Meredith
You might find the 'arm' package useful. For a good introduction to heirarchical modeling, using 'arm' and also WinBUGS and R2WinBUGS, read Gelman, A; J Hill 2007. Data analysis using regression and multilevel/hierarchical models. Cambridge University Press. Cheers, Mike. Ali raza-4 wrote: >

Re: [R] HELP FOR BUGS

2007-07-14 Thread Uwe Ligges
Ali raza wrote: > Hi Sir > > I am very new user of R for the research project on multilevel > logistic regression. There is confusion about bugs() function in R Do you mean bugs() from package "R2WinBUGS"? Yes, it is related to the software WinBUGS 1.4.x (and OpenBUGS 2.x with package "BRugs")

Re: [R] help with handling replicates before reshaping data

2007-07-13 Thread hadley wickham
Hi Tom, > I have a dataset consists of duplicated sequences within day for each > patient (see below data) and I want to reshape the data with patient as time > variable. However the reshape function only takes the first sequence of the > replicates and ignores the second. How can I 1) averag

Re: [R] Help with write.foreign (exporting data to Stata)

2007-07-10 Thread Thomas Lumley
On Tue, 10 Jul 2007, Stefan Grosse wrote: > I am not sure what you are doing there but what you need is > library(foreign) > and > write.dta() write.foreign should also work, though. My guess is that Kate used tempfile() to specify the filenames, and that the data file would then have been del

Re: [R] Help with write.foreign (exporting data to Stata)

2007-07-10 Thread Stefan Grosse
I am not sure what you are doing there but what you need is library(foreign) and write.dta() see ?write.dta once you have loaded the foreign package Stefan Original Message Subject: [R] Help with write.foreign (exporting data to Stata) From: kdestler <[EMAIL PROTECTED]> To: r-

Re: [R] Help Needed!!

2007-07-10 Thread Henrique Dallazuanna
See ?summary.manova -- Henrique Dallazuanna Curitiba-Paraná-Brasil 25° 25' 40" S 49° 16' 22" O On 10/07/07, deepa gupta <[EMAIL PROTECTED]> wrote: > > Hi, > > Can anyone help me with repeated meausres MANOVA in R ? For repeated > measures ANOVA I used function "aov". Is there something like t

Re: [R] Help in installing rggobi in ubuntu linux

2007-07-09 Thread Dirk Eddelbuettel
On 9 July 2007 at 22:38, Michael Lawrence wrote: | Looks like rggobi can't find GGobi. Make sure that PKG_CONFIG_PATH contains | the path to your ggobi.pc file. For example: | | export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig | | I would have assumed, however, that the ggobi package would have i

Re: [R] Help in installing rggobi in ubuntu linux

2007-07-09 Thread Michael Lawrence
Looks like rggobi can't find GGobi. Make sure that PKG_CONFIG_PATH contains the path to your ggobi.pc file. For example: export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig I would have assumed, however, that the ggobi package would have installed to the /usr prefix, in which case pkg-config should h

Re: [R] help on fisher.test(stats)?

2007-07-09 Thread Stefan Grosse
Original Message Subject: [R] help on fisher.test(stats)? From: zhijie zhang <[EMAIL PROTECTED]> To: R-help@stat.math.ethz.ch Date: 09.07.2007 09:03 > Dear friends, > My dataset have many zeros, so i must use fisher exact test . > Unfortunately, the fisher.test(stats) function

Re: [R] help with vector construction

2007-07-05 Thread Greg Snow
One approach is to use the fact that vectors are automatically replicated to the correct length when subscripting, so you can do something like: > my.matrix[ c(FALSE,TRUE,FALSE), 3 ] To get every 3rd element starting at the 2nd element, and the 3rd column. Hope this helps, -- Gregory (Greg)

Re: [R] help with vector construction

2007-07-05 Thread John Kane
Or an alternative to Henrique's if you want to select all the rows from row 2 up to the 3*n row this may work. n <- 2 myvector <- data1[2:(2*n), 3] --- Juan Pablo Fededa <[EMAIL PROTECTED]> wrote: > Hi all, > > I want to make a vector with the third column of a > matrix, but only for the >

Re: [R] help with vector construction

2007-07-05 Thread Henrique Dallazuanna
Hi, Example: n <- 1:10 mat[2+3*n,3] #Where mat is the matrix Is what you want? -- Henrique Dallazuanna Curitiba-Paraná-Brasil 25° 25' 40" S 49° 16' 22" O On 05/07/07, Juan Pablo Fededa <[EMAIL PROTECTED]> wrote: > > Hi all, > > I want to make a vector with the third column of a matrix, but onl

Re: [R] help again

2007-07-02 Thread Ingmar Visser
On Jul 2, 2007, at 6:22 PM, umarporn charusombat wrote: > hi > i try to use arima and holtwinter to predict drought from 1895-2006 unless you have access to time-travel isn't this better called retrodiction? ingmar > but i cannot read whole period of time and i try to do the exponent > fit

Re: [R] help again

2007-07-02 Thread Alberto Monteiro
Stefan Grosse wrote: > > This makes it much easier to help! (how do your numbers look like > e.g.) You don't need to send the whole dataset but a few lines would > be nice plus what commands you've done to receive those errors... > In fact, I noticed that, most of the time, when I reduce the pr

Re: [R] help again

2007-07-02 Thread Stefan Grosse
> hi > i try to use arima and holtwinter to predict drought from 1895-2006 > but i cannot read whole period of time and i try to do the exponent > fitting, > but it comes out as the coordinate x-y error > i send the source code and data to take a look > if anyone can help me, i am really new in R

Re: [R] help on the use of ldBand

2007-06-22 Thread Frank E Harrell Jr
Tomas Goicoa wrote: > Hi R Users, > > I am trying to use the ldBand package. Together > with the package, I have downloaded the ld98 > program (version for windows) as indicated in the > help page on ldBand. I did it, but obtained an > error message "Error in (head + 1):length(w) : > Argu

Re: [R] Help in ARIMA

2007-06-19 Thread gyadav
Hi Roshan see inline for answer waiting time. Can I do this using any of the models used in R? /* i feel this sounds more or less like a queueing model. Try searching "M/M/1 queueing model" on internet. Further, i feel look at poission distribution may also be helpful. It was Lon

Re: [R] Help With Sweave:

2007-06-19 Thread M. Jankowski
Dirk, Your solution worked wonders! This is outstanding! Thank you! Matt On 6/19/07, Dirk Eddelbuettel <[EMAIL PROTECTED]> wrote: > > Matt, > > On 19 June 2007 at 21:23, M. Jankowski wrote: > | Hi All, > | > | I am running Ubuntu Feisty (7.04) on a Thinkpad T41. I've installed > | the nowebm pac

Re: [R] Help With Sweave:

2007-06-19 Thread Dirk Eddelbuettel
Matt, On 19 June 2007 at 21:23, M. Jankowski wrote: | Hi All, | | I am running Ubuntu Feisty (7.04) on a Thinkpad T41. I've installed | the nowebm package for Ubuntu. Working from this HowTo: | http://www.ci.tuwien.ac.at/~leisch/Sweave/example-1.Snw | I try to compile the example *.Snw as in the

Re: [R] help with using grid to modify ggplot/lattice plots

2007-06-19 Thread Paul Murrell
Hi Vikas Rawal wrote: > I want to use grid to modify some boxplots made using ggplot. I would > really appreciate if somebody could guide me to a resource on how to > use grid to modify such graphics. I guess the basic approach will be > similar to using grid to modify lattice graphics. To that e

Re: [R] help w/ nonlinear regression

2007-06-19 Thread S Ellison
Your B coefficient differs by a suspicious-looking factor of 2.30... (ln(10). Does SPSS log() mean log10 or ln? R log(x) uses ln(x). S >>> "Eduardo Esteves" <[EMAIL PROTECTED]> 19/06/2007 17:19:35 >>> Dear All, I'd like to fit a "kind" of logistic model to small data-set using nonlinear least-s

Re: [R] Help in ARIMA

2007-06-19 Thread sj
Sounds more like you would want to explore the use of some sort of Queueing model. A quick search of R help did not yield any packages that could be used to develop such models, but I think that modeling simple queuing systems and estimating wait times is pretty straight forward and could be progra

Re: [R] Help: Upgrading to R2.5 on Ubuntu (Feisty)

2007-06-18 Thread Paulo Tanimoto
Dear Matt, Did you issue: $ sudo apt-get update before running: $ sudo apt-get install r-base Now, let me tell you one thing about Linux and particularly Debian/Ubuntu. We are spoiled to the point that we love the official repositories. Because the official packages go through some testing, we

Re: [R] help with simple R-question

2007-06-05 Thread John Kane
--- Rina Miehs <[EMAIL PROTECTED]> wrote: > hello > > what do i write for R to recognize both columns? > > In the R-script downunder you can see that i use > tapply to get my > information out of my data, and then i need to use > it as a dataframe > with both columns! It is like R is using th

Re: [R] Help with conditional lagging of data

2007-06-04 Thread Gabor Grothendieck
Seems you want to diff X, not lag it. We can either maintain the long form of the data and do it as in #1 or convert the data to "wide" form and do it as in #2 which is most convenient using zoo where we make the individual time series into zoo series, merge them and then apply diff: Lines <- "I

Re: [R] Help with optim

2007-05-29 Thread Bojanowski, M.J. \(Michal\)
Hi, Unfortunately I don't think it is possible to do exactly what you want, but: If the numbers reported by 'optim' to the console are enough for you, then consider using 'capture.output'. Below I used the example from 'optim' help page, because I could not use yours directly. hth, Michal # -

Re: [R] help about 2 way anova and tukey test

2007-05-24 Thread Gabor Grothendieck
The form of your data is termed "wide" and you want to reshape it to "long" form and use aov with that. This uses the reshape command to produce the long form. Alternately you could use cast and melt in the reshape package to do that: # read data Lines <- "subjtherapy t0 t1 t2 1

Re: [R] help with this indexing

2007-05-21 Thread Adaikalavan Ramasamy
merge() javier garcia-pintado wrote: > Hi all, > Let's say I have a long data frame and a short one, both with three > colums: $east, $north, $value > And I need to fill in the short$value, extracting the corresponding > value from long$value, for coinciding $east and $north in both tables. > I k

Re: [R] help with executing instruction every i-th run of loop

2007-05-17 Thread Barry Rowlingson
Mark W Kimpel wrote: > I am running a very long loop and would like to save intermediate > results in case of a system or program crash. Here is the skeleton of > what my code would be: > > for (i in 1:zillion) I'm a bit worried about this line: > 1:zillion > Error: cannot allocate vector

Re: [R] help with executing instruction every i-th run of loop

2007-05-17 Thread Duncan Murdoch
On 5/17/2007 10:56 AM, Mark W Kimpel wrote: > I am running a very long loop and would like to save intermediate > results in case of a system or program crash. Here is the skeleton of > what my code would be: > > for (i in 1:zillion) >{ > results[[i]]<-do.something.function() > if (l

Re: [R] help with executing instruction every i-th run of loop

2007-05-17 Thread Uwe Ligges
Mark W Kimpel wrote: > I am running a very long loop and would like to save intermediate > results in case of a system or program crash. Here is the skeleton of > what my code would be: > > for (i in 1:zillion) >{ > results[[i]]<-do.something.function() > if (logical.test(i)) {save

Re: [R] help with executing instruction every i-th run of loop

2007-05-17 Thread Benilton Carvalho
if (i %% 1000 == 0) b On May 17, 2007, at 10:56 AM, Mark W Kimpel wrote: > I am running a very long loop and would like to save intermediate > results in case of a system or program crash. Here is the skeleton of > what my code would be: > > for (i in 1:zillion) >{ > results[[i]]<-do.som

Re: [R] Help with map

2007-05-05 Thread Roger Bivand
On Sat, 5 May 2007, Alberto Vieira Ferreira Monteiro wrote: > [for those that worry about these things, this _is_ a homework > assignment. However, it's not an R homework, it's a Geography > and History homework... and I want to use R to create a pretty > map] > > Roger Bivand wrote: > > > >> Is

Re: [R] Help with map

2007-05-04 Thread Duncan Murdoch
On 04/05/2007 9:00 PM, Alberto Vieira Ferreira Monteiro wrote: > [for those that worry about these things, this _is_ a homework > assignment. However, it's not an R homework, it's a Geography > and History homework... and I want to use R to create a pretty > map] > > Roger Bivand wrote: >>> Is the

Re: [R] Help with map

2007-05-04 Thread Alberto Vieira Ferreira Monteiro
[for those that worry about these things, this _is_ a homework assignment. However, it's not an R homework, it's a Geography and History homework... and I want to use R to create a pretty map] Roger Bivand wrote: > >> Is there any way to associate one color to each country? > > Try: > > map_poly_o

Re: [R] Help Installing R

2007-05-04 Thread Marc Schwartz
On Fri, 2007-05-04 at 10:06 -0500, Pramod Anugu wrote: > I have unzipped the R-2.5.0.tar.gz > gzip -dc R-x.y.z.tar.gz | tar xvf - > 2. then #./configure > 3. ./configure > checking build system type... x86_64-unknown-linux-gnu > checking host system type... x86_64-unknown-linux-gnu > loading site

Re: [R] Help Installing R

2007-05-04 Thread Pramod Anugu
I have unzipped the R-2.5.0.tar.gz gzip -dc R-x.y.z.tar.gz | tar xvf - 2. then #./configure 3. ./configure checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu loading site script './config.site' loading build specific script './config.site'

Re: [R] Help with map

2007-05-04 Thread Roger Bivand
On Fri, 4 May 2007, Alberto Monteiro wrote: > I have just learned how to play with map, but something weird > (or not) is happening. > > Suppose I want to draw a map of two countries (that have disconnected > components), like Argentina and Brazil. > > If I command: > > library(maps) > library(

Re: [R] Help with saptial analysis (cluster)

2007-04-27 Thread Roger Bivand
ONKELINX, Thierry inbo.be> writes: > > Dear Fransico, > > The distance matrix would be 102000 x 102000. So it would contain 1040400 values. If you need one bit for > each value, this would requier 9,7 GB. So the distance matrix won't fit in the RAM of your computer. Perhaps you could mak

Re: [R] help

2007-04-26 Thread Jim Lemon
Natalie O'Toole wrote: > Hi, > > Would anyone know how to calculate the modal value of LeafArea? > > Thank-you very much!! > > Nat > > __ > > Hi all, > > I have 2 questions: > > 1)How do I calculate the mean on an imported txt file? I've imported the > file below and that's

Re: [R] Help on 'find.BIB' function

2007-04-25 Thread Chuck Cleland
Jason Parcon wrote: > Hello everyone, > > I am trying to use the 'find.BIB' function to construct a balanced > incomplete block design. When I ran the example given in the help file > (find.BIB(10,30,4)), I obtained the following error message: > > Error in optBlock(~., withinData =

Re: [R] Help with saptial analysis (cluster)

2007-04-25 Thread ONKELINX, Thierry
Dear Fransico, The distance matrix would be 102000 x 102000. So it would contain 1040400 values. If you need one bit for each value, this would requier 9,7 GB. So the distance matrix won't fit in the RAM of your computer. Cheers, Thierry ---

Re: [R] help interpreting the output of functions - any sources of information

2007-04-24 Thread Y G
On 24/04/07, Sarah Goslee <[EMAIL PROTECTED]> wrote: > > Hi, > > If you look at the documentation for the function you are interested > in, in this case ?cor.test, it will generally give you an explanation > of the return values (often brief, and not too helpful if you aren't > already familiar wit

Re: [R] help interpreting the output of functions - any sources of information

2007-04-24 Thread Sarah Goslee
Hi, If you look at the documentation for the function you are interested in, in this case ?cor.test, it will generally give you an explanation of the return values (often brief, and not too helpful if you aren't already familiar with the test), but also one or more references that you can turn to

Re: [R] help on xyplot and curves

2007-04-23 Thread Ronaldo Reis Junior
Em Segunda 23 Abril 2007 10:38, Gabor Grothendieck escreveu: > See: > > http://finzi.psych.upenn.edu/R/Rhelp02a/archive/90294.html > Thanks, it work. Inte Ronaldo -- As pequenas dívidas são aborrecidas como as moscas. As grandes, logicamente, deveriam ser terríveis como os leões, e são ma

  1   2   3   4   5   6   7   8   9   10   >