[R] Calculating Percentile in R

2007-06-18 Thread Megh Dal
Hi all, I have a problem on how R calculates Percentiles : Suppose I have following data set: data1 [1] -16648185 -14463457 -14449400 -13905309 -13443436 -13234755 -12956282 -11660896 [9] -10061040 -9805005 -9789583 -9754642 -9562164 -9391709 -9212182 -9151073 [17] -9092732

Re: [R] Loading problem with R2HTML package

2007-06-18 Thread Prof Brian Ripley
On Sun, 17 Jun 2007, spime wrote: I have downloaded latest version of R2HTML (v1.54) for 64-bit windows PC. The latest version is 1.58 from September 2006. See http://cran.r-project.org/src/contrib/Descriptions/R2HTML.html My R version 2.5.0. My problem arises when i want to install

Re: [R] Calculating Percentile in R

2007-06-18 Thread ecatchpole
Quantiles aren't uniquely defined. Type ?quantile to learn more about the various possibilities built in to R. Ted. Megh Dal wrote on 06/18/2007 04:37 PM: Hi all, I have a problem on how R calculates Percentiles : Suppose I have following data set: data1 [1] -16648185

Re: [R] Calculating Percentile in R

2007-06-18 Thread Prof Brian Ripley
On Sun, 17 Jun 2007, Megh Dal wrote: Hi all, I have a problem on how R calculates Percentiles : Suppose I have following data set: data1 [1] -16648185 -14463457 -14449400 -13905309 -13443436 -13234755 -12956282 -11660896 [9] -10061040 -9805005 -9789583 -9754642 -9562164 -9391709

[R] to read table

2007-06-18 Thread elyakhlifi mustapha
Hello, I have a problem to read a csv table. To read it I used this syntax donParCara - read.table(C:/Documents and Settings/melyakhlifi/Mes documents/feuilles excel/calcul2.csv,header=TRUE,sep=;,quote=,dec=,) I don't understand my errors Erreur dans scan(file, what, nmax, sep, dec, quote,

Re: [R] Lines connecting the boxes in a boxplot

2007-06-18 Thread Christoph Buser
Dear Arne I' recommend to save the information of your boxplots a - boxplot(...) str(a) Then you have the information that you need about your boxplot (e.g. the value of the median) and can use segments() to draw the lines you want. Hope this helps Best regards, Christoph

[R] what about options in BATCH

2007-06-18 Thread elyakhlifi mustapha
hello, when I run a calcul in BATCH the screen displays all the code of my programs and even the introduction of R how can I do to don't display it? thanks. _ [[alternative HTML version deleted]]

Re: [R] to read table

2007-06-18 Thread Stefan Grosse
Why are you not using read.csv or read.csv2 when you are reading a csv file? Original Message Subject: [R] to read table From: elyakhlifi mustapha [EMAIL PROTECTED] To: R-help@stat.math.ethz.ch Date: 18.06.2007 09:23 Hello, I have a problem to read a csv table. To read it I

Re: [R] to read table

2007-06-18 Thread Katharina Surovcik
That means that R doesn't see 21 elements in line 16 of your file. This can happen if one of your entries consists of two words, which are then read as two elements. Katharina elyakhlifi mustapha schrieb: Hello, I have a problem to read a csv table. To read it I used this syntax

[R] Problem with binding data-frames

2007-06-18 Thread Junnila, Jouni
Hello, I'm having a problem concerning r-binding datasets. I have six datasets, from six different plates, and two different days. I want to combine these datasets together for analysis. Datasets from day 2, have all the same columns than datasets from day 1. However in addition, there are few

Re: [R] Lines connecting the boxes in a boxplot

2007-06-18 Thread Arne Brutschy
Hi, C I' recommend to save the information of your boxplots C Then you have the information that you need about your boxplot C (e.g. the value of the median) and can use segments() to draw C the lines you want. Thanks, works like a charm! Regards, Arne C Arne Brutschy writes: Hello, I'm

[R] merging dataframes with diffent rownumbers

2007-06-18 Thread Thomas Hoffmann
Dear R-Helpers, I have following problem: I do have two data frames dat1 and dat2 with a commen column BNUM (long integer). dat1 has a larger number of BNUM than dat2 and different rows of dat2 have equal BNUM. The numbers of rows in dat1 and dat2 is not equal. I applied the tapply-function

[R] help with panel.lda

2007-06-18 Thread Silvia Lomascolo
I work with Windows, R version 2.4.1 I am trying to plot the results of a discriminant analysis done using the lda function in the MASS library. The discriminant. analysis goes like this: data.tb-read.table('C:\\Documents and Settings\\silvia\\Desktop\\dicrim_test.txt', header=T) ## the actual

Re: [R] Readline - wait for user input

2007-06-18 Thread Antje
Hello, I also have problems to get to run the following lines. If I run the block instead of every single line, it simply does not wait for the input. Can anybody help me? pos_name - readline(Please type: ) r - substr(pos_name, 1,1) c - substr(pos_name,

[R] change fold from packageDEDS

2007-06-18 Thread XinMeng
Hi all: packageDEDS can find out differentially expressed genes via computing changefold. But if there're 3(or more)groups(1\2\3 for instance),I wanna know the which group vs group the changefold is referd to(1 vs 2/1 vs 3/2 vs 3 for instance)? Thanks a lot! My best!

[R] Prediction accuracy of poisson regression model

2007-06-18 Thread Des Callaghan
Dear all, I'd like to measure the prediction accuracy of a model I have derived from poisson regression. Can somebody help me with suggesting a good approach please? Thanks very much in advance. Best wishes, Des [[alternative HTML version deleted]]

[R] Inverse BoxCox transformation

2007-06-18 Thread Des Callaghan
Hi, I can't seem to find a function in R that will reverse a BoxCox transformation. Can somebody help me locate one please? Thanks in advance. Best wishes, Des [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list

Re: [R] Responding to a posting in the digest

2007-06-18 Thread Martin Maechler
Thanks a lot, Ted, for your comprehensive answer! [See one short note way below: ] TH == Ted Harding [EMAIL PROTECTED] on Thu, 14 Jun 2007 09:54:04 +0100 (BST) writes: TH On 14-Jun-07 07:26:26, Moshe Olshansky wrote: Is there a convenient way to respond to a particular

[R] Question about lmer

2007-06-18 Thread Julia Proudnikova
Hello, We have a problem with function lmer. This is our code: Get_values-function(ff_count, fixed_factors, rf_count, random_factors, y_values) { SA-matrix(as.array(c(fixed_factors, random_factors)), ncol=3) data-as.data.frame(SA) y-as.array(y_values) dd-data.frame(SA) for(i

[R] Unix-like permissions to allow a user to update recommended packages

2007-06-18 Thread Patrick Connolly
I installed R from the tar.gz file (as root) in a directory under /usr/local. The recommended packages are installed in a library in that directory whereas additional packages I install in a directory under the /home directory as a user. Updating the additional packages is very easy with

Re: [R] Inverse BoxCox transformation

2007-06-18 Thread joris . dewolf
to backtransform 'estimate': if (lambda == 0 ) { log(estimate) } else { estimate^(1/lambda) } Des Callaghan [EMAIL

Re: [R] Inverse BoxCox transformation

2007-06-18 Thread Charles Annis, P.E.
Look at the definition for the transform. For example in the car package, ?box.cox Then do the simple algebraic manipulations yourself. Charles Annis, P.E. [EMAIL PROTECTED] phone: 561-352-9699 eFax: 614-455-3265 http://www.StatisticalEngineering.com -Original Message- From: [EMAIL

Re: [R] merging dataframes with diffent rownumbers

2007-06-18 Thread Michael Dewey
At 09:09 18/06/2007, Thomas Hoffmann wrote: Dear R-Helpers, I have following problem: I do have two data frames dat1 and dat2 with a commen column BNUM (long integer). dat1 has a larger number of BNUM than dat2 and different rows of dat2 have equal BNUM. The numbers of rows in dat1 and dat2

Re: [R] merging dataframes with diffent rownumbers

2007-06-18 Thread Petr Klasterecky
No easy to understand what exactly you mean, but try ?merge ?cbind ?rbind Petr Thomas Hoffmann napsal(a): Dear R-Helpers, I have following problem: I do have two data frames dat1 and dat2 with a commen column BNUM (long integer). dat1 has a larger number of BNUM than dat2 and different

Re: [R] Unix-like permissions to allow a user to update recommen

2007-06-18 Thread Ted Harding
On 18-Jun-07 10:11:43, Patrick Connolly wrote: I installed R from the tar.gz file (as root) in a directory under /usr/local. The recommended packages are installed in a library in that directory whereas additional packages I install in a directory under the /home directory as a user.

Re: [R] Problem with binding data-frames

2007-06-18 Thread Petr Klasterecky
Junnila, Jouni napsal(a): Hello, I'm having a problem concerning r-binding datasets. I have six datasets, from six different plates, and two different days. I want to combine these datasets together for analysis. Datasets from day 2, have all the same columns than datasets from day 1.

Re: [R] what about options in BATCH

2007-06-18 Thread Christophe Pallier
?BATCH Read second paragraph of Details section. On 6/18/07, elyakhlifi mustapha [EMAIL PROTECTED] wrote: hello, when I run a calcul in BATCH the screen displays all the code of my programs and even the introduction of R how can I do to don't display it? thanks.

[R] Readline

2007-06-18 Thread Antje
Hello, I also have problems to get to run the following lines. If I run the block instead of every single line, it simply does not wait for the input. Can anybody help me? pos_name - readline(Please type: ) r - substr(pos_name, 1,1) c - substr(pos_name,

Re: [R] Problem with binding data-frames

2007-06-18 Thread Prof Brian Ripley
On Mon, 18 Jun 2007, Petr Klasterecky wrote: Junnila, Jouni napsal(a): Hello, I'm having a problem concerning r-binding datasets. I have six datasets, from six different plates, and two different days. I want to combine these datasets together for analysis. Datasets from day 2, have all

Re: [R] Question about lmer

2007-06-18 Thread Douglas Bates
On 6/18/07, Julia Proudnikova [EMAIL PROTECTED] wrote: Hello, We have a problem with function lmer. This is our code: Get_values-function(ff_count, fixed_factors, rf_count, random_factors, y_values) { SA-matrix(as.array(c(fixed_factors, random_factors)), ncol=3)

Re: [R] Automatic paren/bracket closing in 2.5.0?

2007-06-18 Thread Duncan Murdoch
On 18/06/2007 12:30 AM, Adam D. I. Kramer wrote: Hello, Just upgraded to 2.5.0, and found that R now includes an rparen (right parentheses) or rbracket whenever I enter in an lparen. While I can see the use of this function, it doesn't mesh well with my personal style of using R

Re: [R] Readline

2007-06-18 Thread Jim Lemon
Antje wrote: Hello, I also have problems to get to run the following lines. If I run the block instead of every single line, it simply does not wait for the input. Can anybody help me? pos_name - readline(Please type: ) r - substr(pos_name, 1,1) c -

[R] triangle contour plots

2007-06-18 Thread Robin Hankin
Suppose I have three numbers p1, p2, p3 with 0 = p1,p2,p3 = 1 and p1+p2+p3=1, and a function f=f(p1,p2,p3) = f(p1,p2,1-p1-p2). How to draw a contour plot of f() on the p1+p2+p3=1 plane, that is, an equilateral triangle? Functions triplot(), triangle.plot(), and ternaryplot() give only

[R] BATCH

2007-06-18 Thread elyakhlifi mustapha
Hello, I run some programs R from BATCH using this syntax R CMD BATCH options(echo = FALSE) C:\R\copie.r C:\PHP\sortie.r but the options doesn't work do you know why? thanks. _ [[alternative HTML

Re: [R] Inverse BoxCox transformation

2007-06-18 Thread John Fox
Dear Des, The following should do the trick: invBoxCox - function(x, lambda) if (lambda == 0) exp(x) else (lambda*x + 1)^(1/lambda) I hope this helps, John John Fox, Professor Department of Sociology McMaster University Hamilton,

Re: [R] BATCH

2007-06-18 Thread Christophe Pallier
?BATCH By default, the input commands are printed along with the output. To suppress this behavior, add 'options(echo = FALSE)' at the beginning of 'infile'. at the begining of 'infile' means that 'options(echo = FALSE)' must be included inside 'infile'( in your case copie.r), as

[R] data.frame

2007-06-18 Thread elyakhlifi mustapha
hello, are there functions giving the columns number and the rows number of a matrix? thanks. _ [[alternative HTML version deleted]] __

Re: [R] data.frame

2007-06-18 Thread Adaikalavan Ramasamy
See help(dim) and please read the manuals before asking basic questions like this. Thank you. elyakhlifi mustapha wrote: hello, are there functions giving the columns number and the rows number of a matrix? thanks.

Re: [R] data.frame

2007-06-18 Thread Christophe Pallier
On 6/18/07, elyakhlifi mustapha [EMAIL PROTECTED] wrote: hello, are there functions giving the columns number and the rows number of a matrix? Yes, there are. Are you trying to use R without reading *any* documentation??? The mailing list is not a substitute for the manuals. See the Posting

Re: [R] data.frame

2007-06-18 Thread Robin Hankin
On 18 Jun 2007, at 14:16, Adaikalavan Ramasamy wrote: See help(dim) and please read the manuals before asking basic questions like this. Thank you. I think the questioner was looking for row() and col(), which (IMO) are difficult to find if you don't know of their existence. [as indeed

[R] data.frame

2007-06-18 Thread elyakhlifi mustapha
hello, I'm trying to write a function which take a matrix and give a dataframe with column names and row names but the problem I meet it's that the column number is changing and the vector containing the column names is also changing how can I do to write a good progam for the moment I tryied

[R] how to obtain the OR and 95%CI with 1 SD change of a continue variable

2007-06-18 Thread felix
Dear all, How to obtain the odds ratio (OR) and 95% confidence interval (CI) with 1 standard deviation (SD) change of a continuous variable in logistic regression? for example, to investigate the risk of obesity for stroke. I choose the happening of stroke (positive) as the dependent

Re: [R] triangle contour plots

2007-06-18 Thread Duncan Murdoch
On 6/18/2007 8:12 AM, Robin Hankin wrote: Suppose I have three numbers p1, p2, p3 with 0 = p1,p2,p3 = 1 and p1+p2+p3=1, and a function f=f(p1,p2,p3) = f(p1,p2,1-p1-p2). How to draw a contour plot of f() on the p1+p2+p3=1 plane, that is, an equilateral triangle? The usual contour

Re: [R] data.frame

2007-06-18 Thread Christophe Pallier
On 6/18/07, Robin Hankin [EMAIL PROTECTED] wrote: I think the questioner was looking for row() and col(), which (IMO) are difficult to find if you don't know of their existence. Searching for R matrix number of rows columns in google returns, in fourth position, the manual page for 'nrow'.

Re: [R] data.frame

2007-06-18 Thread Christophe Pallier
If M is the original matrix, k - as.data.frame(M) names(k) - paste(Rép,1:ncol(k),sep=) rownames(k) - paste(Col,1:nrow(k),sep=) # replace by what you want k On 6/18/07, elyakhlifi mustapha [EMAIL PROTECTED] wrote: hello, I'm trying to write a function which take a matrix and give a dataframe

[R] source a specific function

2007-06-18 Thread Weiwei Shi
Dear Listers: For example, if I have a .R source file which has more than one function, and I want to just load only one of the functions, how could I do that? (removing the rest after sourcing is not what I intend b/c in my workspace, I might have some of the rest and I don't want to change my

[R] Odp: data.frame

2007-06-18 Thread Petr PIKAL
Hi Why scratching your left ear with your right hand? If M is numeric matrix d.m - data.frame(M) names(d.m) - paste(Rep, 1:dim(M)[2], sep=) not sure what you want as row names as var is not defined anywhere in your code, but you can use the same principle for changing row names. Jus use

Re: [R] data.frame

2007-06-18 Thread jim holtman
Is this close to what you want? 'var' was not defined for row.names. M - matrix(scan(textConnection(x)), ncol=3, byrow=TRUE) Read 63 items dm - ncol(M) v - vector() t - 1 while (dm 0) { + v - c(v,paste(Rép,t,sep=)) + t - t + 1 + dm - dm - 1 + } df - as.data.frame(M) colnames(df) - v

Re: [R] source a specific function

2007-06-18 Thread Don MacQueen
One way to do it would be to surround the function(s) you don't want sourced, like this: if (FALSE) { ## function definition here } But you might find it easier to just put each function in its own file. At 9:54 AM -0400 6/18/07, Weiwei Shi wrote: Dear Listers: For example, if I have a .R

Re: [R] source a specific function

2007-06-18 Thread Gabor Grothendieck
This loads all the functions into an anonymous environment defined by local and then exports f to the global environment. f - local({ source(/a.R, local = TRUE) environment(f) - .GlobalEnv f }) On 6/18/07, Weiwei Shi [EMAIL PROTECTED] wrote: Dear Listers: For example,

Re: [R] source a specific function

2007-06-18 Thread Duncan Murdoch
On 6/18/2007 9:54 AM, Weiwei Shi wrote: Dear Listers: For example, if I have a .R source file which has more than one function, and I want to just load only one of the functions, how could I do that? (removing the rest after sourcing is not what I intend b/c in my workspace, I might have

Re: [R] triangle contour plots

2007-06-18 Thread Greg Snow
The triplot function in the TeachingDemos package (I don't know about the one in klaR, or the others mentioned) honors the type='l' argument and passes it on to points. So if you know where you want the contours drawn, you can use triplot to draw the lines (it also has an add argument that could

Re: [R] how to obtain the OR and 95%CI with 1 SD change of a continue variable

2007-06-18 Thread Peter Dalgaard
felix wrote: Dear all, How to obtain the odds ratio (OR) and 95% confidence interval (CI) with 1 standard deviation (SD) change of a continuous variable in logistic regression? for example, to investigate the risk of obesity for stroke. I choose the happening of stroke (positive) as the

[R] discriminant analysis with lda(MASS)

2007-06-18 Thread Silvia Lomascolo
I use Widows, R version 2.4.1 I have 4 questions on lda (MASS) (code is pasted below): 1st. How can I obtain the statistics and p-value associated with discriminant analysis? Am I supposed to calculate that manually by squaring the svd value and looking the p value up in a table? I am writing

[R] Optimization

2007-06-18 Thread livia
Hi, I would like to minimize the value of x1-x2, x2 is a fixed value of 0.01, x1 is the quantile of normal distribution (0.0032,x) with probability of 0.7, and the changing value should be x. Initial value for x is 0.0207. I am using the following codes, but it does not work. fr - function(x) {

Re: [R] source a specific function

2007-06-18 Thread Ted Harding
On 18-Jun-07 14:28:35, Gabor Grothendieck wrote: This loads all the functions into an anonymous environment defined by local and then exports f to the global environment. f - local({ source(/a.R, local = TRUE) environment(f) - .GlobalEnv f }) That looks neat! Two

[R] Large Binary file reader for Simple minds

2007-06-18 Thread Todd Remund
I'm more like a caveman when it comes to programming tools. So, with that in mind, is there a way to use readBin in a batch format to read in pieces of a large binary file? Thank you for the consideration of my question. Todd Remund __

Re: [R] source a specific function

2007-06-18 Thread Gabor Grothendieck
1. You can do this: library(plotrix) environment(draw.arc) - .GlobalEnv # implicitly copies it detach() plot(1,1) draw.arc(1, 1, .1) # its there 2. Since the local environment we created in the prior post was anonymous and since there are no other references to it either I assume it gets

Re: [R] Optimization

2007-06-18 Thread Robert A LaBudde
You don't need optimization for the solution to your problem. You just need an understanding of the meaning of qnorm() and some simple algebra. Try: x- (0.01-0.0032)/qnorm(0.7,0,1) At 12:01 PM 6/18/2007, you wrote: Hi, I would like to minimize the value of x1-x2, x2 is a fixed value of 0.01,

Re: [R] Optimization

2007-06-18 Thread Uwe Ligges
livia wrote: Hi, I would like to minimize the value of x1-x2, x2 is a fixed value of 0.01, x1 is the quantile of normal distribution (0.0032,x) with probability of 0.7, and the changing value should be x. Initial value for x is 0.0207. I am using the following codes, but it does not work.

Re: [R] Optimization

2007-06-18 Thread Ted Harding
On 18-Jun-07 16:01:03, livia wrote: Hi, I would like to minimize the value of x1-x2, x2 is a fixed value of 0.01, x1 is the quantile of normal distribution (0.0032,x) with probability of 0.7, and the changing value should be x. Initial value for x is 0.0207. I'm a bit puzzled by the

Re: [R] Problem with RSVGTipsDevice

2007-06-18 Thread Tony Plate
The new version of RSVGTipsDevice (0.7.1) that is now available on CRAN should fix this problem. Please let me know if it doesn't, or if there are other problems. -- Tony Plate mister_bluesman wrote: Hi there. I am still trying to get the RSVGTipsDevice to work, yet I can not. I have

Re: [R] Automatic paren/bracket closing in 2.5.0?

2007-06-18 Thread Adam D. I. Kramer
Many thanks, Duncan. I did not expect this to be an OS-specific issue, and figured it must be the new default and thus configurable from within the program, though indeed I am using MacOS. --Adam On Mon, 18 Jun 2007, Duncan Murdoch wrote: On 18/06/2007 12:30 AM, Adam D. I. Kramer wrote:

Re: [R] Optimization

2007-06-18 Thread Prof Brian Ripley
From the help page: Note: 'optim' will work with one-dimensional 'par's, but the default method does not work well (and will warn). Use 'optimize' instead. Next, there is a constraint of x=0 that you are not imposing. Finally, it is easy to see that qnorm(0.7, 0.0032, x) is

Re: [R] Optimization

2007-06-18 Thread Petr Klasterecky
Hi, my first guess is that the algorithm returns a negative value in some step - recall that you start from 0.0207!! This negative value is then passed as standard error to qnorm and that cannot work... My guess is based on a small experiment where I tried a different starting point (.02 is so

Re: [R] Large Binary file reader for Simple minds

2007-06-18 Thread Duncan Murdoch
On 6/18/2007 12:17 PM, Todd Remund wrote: I'm more like a caveman when it comes to programming tools. So, with that in mind, is there a way to use readBin in a batch format to read in pieces of a large binary file? Thank you for the consideration of my question. I'm not sure what you mean

[R] chron() question

2007-06-18 Thread javier garcia-pintado
Hi all, I'm using chron and it seems to me that there is a strange behaviour when constructing chronological objects. An extract of my source data is: tdr.hhmm[4860:4870] [1] 22:22:00 22:42:00 23:02:00 23:22:00 23:42:00 00:02:00 [7] 00:22:00 00:42:00 01:02:00 01:22:00 01:42:00

Re: [R] source a specific function

2007-06-18 Thread Duncan Murdoch
On 6/18/2007 12:11 PM, (Ted Harding) wrote: On 18-Jun-07 14:28:35, Gabor Grothendieck wrote: This loads all the functions into an anonymous environment defined by local and then exports f to the global environment. f - local({ source(/a.R, local = TRUE) environment(f) -

Re: [R] Large Binary file reader for Simple minds

2007-06-18 Thread Paul Murrell
Hi Todd Remund wrote: I'm more like a caveman when it comes to programming tools. So, with that in mind, is there a way to use readBin in a batch format to read in pieces of a large binary file? Thank you for the consideration of my question. The 'hexView' package might be useful to

Re: [R] Stacked barchart color

2007-06-18 Thread owenman
Hi Hadley, Great, I am starting to get it. It's working for me, but there is one more thing I am having trouble with. The ordering of the stacked bars seems to be dictated by the name of the color, I guess because of the fill=color argument in aes(). In other words, if I set up my colors like

[R] psm/survreg coefficient values ?

2007-06-18 Thread sj
I am using psm to model some parametric survival data, the data is for length of stay in an emergency department. There are several ways a patient's stay in the emergency department can end (discharge, admit, etc..) so I am looking at modeling the effects of several covariates on the various

Re: [R] Unix-like permissions to allow a user to update recommen

2007-06-18 Thread Patrick Connolly
On Mon, 18-Jun-2007 at 11:53AM +0100, Ted Harding wrote: | On 18-Jun-07 10:11:43, Patrick Connolly wrote: | I installed R from the tar.gz file (as root) in a directory under | /usr/local. The recommended packages are installed in a library in | that directory whereas additional packages I

[R] Second y-axis in xyplot (lattice) where y1 and y2 have different ranges

2007-06-18 Thread Andy Bunn
Hi all, I realize this is asking a lot of lattice, but I want to add a second y axis inside a xyplot and have y1 and y2 have different ranges. Given dat below, I can add a second y axis by overlaying a new plot with par(new=T) and label axis 4 with standard graphics. I've seen an example for

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

2007-06-18 Thread M. Jankowski
Thank you in advance for reading this help request. I am pretty new to R. I am experiencing some issues getting 2.5 installed on my Ubuntu Fiesty system and seek your advice. To the best of my ability I followed the instructions here: http://cran.r-project.org/bin/linux/ubuntu/README Setting

Re: [R] source a specific function

2007-06-18 Thread Ted Harding
On 18-Jun-07 18:53:50, Duncan Murdoch wrote: The exact syntax you list there won't work, but in any case, changing the environment of a function in a package is a bad idea -- it may need to reference things from the namespace of the package. Well, as I said before, (assuming that you know

Re: [R] Unix-like permissions to allow a user to update recommen

2007-06-18 Thread Ted Harding
On 18-Jun-07 20:27:56, Patrick Connolly wrote: On Mon, 18-Jun-2007 at 11:53AM +0100, Ted Harding wrote: | On 18-Jun-07 10:11:43, Patrick Connolly wrote: | I installed R from the tar.gz file (as root) in a directory under | /usr/local. The recommended packages are installed in a library in |

Re: [R] psm/survreg coefficient values ?

2007-06-18 Thread Frank E Harrell Jr
sj wrote: I am using psm to model some parametric survival data, the data is for length of stay in an emergency department. There are several ways a patient's stay in the emergency department can end (discharge, admit, etc..) so I am looking at modeling the effects of several covariates on the

[R] data type for block data?

2007-06-18 Thread H. Paul Benton
Dear All, I have a matrix with data that is not organised. I would like to go through this and extract it. Each feature has 2 vectors which express the data. I also have an index of the places where the data should be cut. eg. class(cc) matrix cc [,1] [,2] [1,]1 26 [2,]2

Re: [R] Second y-axis in xyplot (lattice) where y1 and y2 have different ranges

2007-06-18 Thread Deepayan Sarkar
On 6/18/07, Andy Bunn [EMAIL PROTECTED] wrote: Hi all, I realize this is asking a lot of lattice, but I want to add a second y axis inside a xyplot and have y1 and y2 have different ranges. Given dat below, I can add a second y axis by overlaying a new plot with par(new=T) and label axis 4

[R] viewing source code

2007-06-18 Thread Werner Wernersen
Hi, could somebody give me a quick hint how to view the source code of a function if sole entering of the function name does not work? In particular, I am trying to look at cd_plot from the vcd package. Many thanks in advance, Werner __

Re: [R] viewing source code

2007-06-18 Thread Achim Zeileis
Werner: could somebody give me a quick hint how to view the source code of a function if sole entering of the function name does not work? In particular, I am trying to look at cd_plot from the vcd package. Strategy 1: Typing cd_plot tells you that it is a generic function and

[R] How to compare GLM and GAM models

2007-06-18 Thread Yuanchang xie
Dear Listers, I want to compare two negative binomial models fitted using glm.nb and gam(mgcv) based on the same data. What would be the most appropriate criteria to compare these two models? Can someone point me to some references? Thank you very much. Yuanchang Xie

[R] Histogram using frequency data

2007-06-18 Thread suman Duvvuru
Hello, I wanted to know how to plot a histogram using a vector of frequencies rather than the data vector as a whole. So I have two vectors: a vector of labels V1= c(A,B,C,D) and vector B which is a vector of frequencies of A, B, C and D respectively V2=c(20,50,60,30). I wanted to plot a

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,

Re: [R] Retain names in conversion of matrix to vector

2007-06-18 Thread philozine
Fantastic. All of those methods worked, though I did have to first convert my matrices using the data.matrix command. Thank you for the assistance. Is there any equally simple way to re-convert the resulting table/matrix to its original NxN form? I do not see any obvious opposites to the cbind

[R] String manipulation, insert delim

2007-06-18 Thread Christopher Marcum
Hello All, I've been using R for two years now and I am happy to say this is the first time I could not find the answer to my problem in the R-help archives. Here is the pending problem: I want to be able to insert delimiters, say commas, into a string of characters at uneven intervals such

Re: [R] Histogram using frequency data

2007-06-18 Thread Marc Schwartz
On Mon, 2007-06-18 at 19:40 -0400, suman Duvvuru wrote: Hello, I wanted to know how to plot a histogram using a vector of frequencies rather than the data vector as a whole. So I have two vectors: a vector of labels V1= c(A,B,C,D) and vector B which is a vector of frequencies of A, B, C

[R] classical plant hybrid analysis

2007-06-18 Thread Cam Beeck
Hi, I am looking to perform some classical hybrid analysis on hybrid plants including GCA and SCA components through R. I was wondering if anybody knew of existing packages that can perform these analyses (I cannot find any) or any examples of these analyses being worked through. Cameron Beeck

[R] genetics package not working

2007-06-18 Thread Farrel Buchinsky
Has something changed in R that requires an update in the genetics package by Gregory Warnes? I am using R version 2.5.0 This used to work summary(founders[,59]) to prove that it is a genotype class class(founders[,59]) [1] genotype factor Now when I issue the command: summary(founders[,59])

Re: [R] String manipulation, insert delim

2007-06-18 Thread jim holtman
This should work for you. foo-c(haveaniceday)#my string of character bar-c(4,1,4,3) # my vector of uneven intervals my.function - function(foo, bar){ + # construct a matrix with start/end character positions + start - head(cumsum(c(1, bar)), -1) # delete last one + sel -

Re: [R] String manipulation, insert delim

2007-06-18 Thread Gabor Grothendieck
Try this: paste(read.fwf(textConnection(foo), bar, as.is = TRUE), collapse = ,) [1] have,a,nice,day On 6/18/07, Christopher Marcum [EMAIL PROTECTED] wrote: Hello All, I've been using R for two years now and I am happy to say this is the first time I could not find the answer to my problem

Re: [R] String manipulation, insert delim

2007-06-18 Thread Marc Schwartz
On Mon, 2007-06-18 at 16:54 -0700, Christopher Marcum wrote: Hello All, I've been using R for two years now and I am happy to say this is the first time I could not find the answer to my problem in the R-help archives. Here is the pending problem: I want to be able to insert delimiters,

[R] Histograms with strings, grouped by repeat count (w/ data)

2007-06-18 Thread Matthew Trunnell
Hello R gurus, I just spent my first weekend wrestling with R, but so far have come up empty handed. I have a dataset that represents file downloads; it has 4 dimensions: date, filename, email, and country. (sample data below) My first goal is to get an idea of the frequency of repeated

[R] categorical time series

2007-06-18 Thread Jaydip Mukhopadhyay
Hello, Can anyone tell me how to simulate multinomial time series in R? Thanks, Jaydip Jaydip Mukhopadhyay Graduate Student Dept of Statistics University Of Connecticut - [[alternative HTML version deleted]]

Re: [R] Histograms with strings, grouped by repeat count (w/ data)

2007-06-18 Thread jim holtman
You should be using barplot and not hist. I think this produces what you want: x - filename,last_modified,email_addr,country_residence file1,3/4/2006 13:54,email1,Korea (South) file2,3/4/2006 14:33,email2,United States file2,3/4/2006 16:03,email2,United States file2,3/4/2006 16:17,email3,United

Re: [R] data type for block data?

2007-06-18 Thread jim holtman
This will create a list of the matrix subsets: # create a matrix x - cbind(1:40, runif(40)) index - c(10,15,33,40) # cut points # create a matrix with start and end points slices - cbind(start=head(c(1,index + 1), -1), end=index) # create a list with the matrices matrix.subset -

Re: [R] Histograms with strings, grouped by repeat count (w/ data)

2007-06-18 Thread Matthew Trunnell
Jim, Thanks for the quick reply! When I run your code, I end up with a single barplot of one datapoint, file9 vs email20 == 2.0. I see the call to barplot is inside a for loop... maybe it's zooming through the display of many barplots, but all I see is the last one? In any case, I need to

Re: [R] Histograms with strings, grouped by repeat count (w/ data)

2007-06-18 Thread jim holtman
If you are running on windows, make sure you have 'recording' checked in the history window of the graphics. You can also put the output to a pdf file and view it later. If you use table on the counts matrix: table(counts) counts 0 1 2 3 253 20 8 9 this shows that there were 20

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

2007-06-18 Thread M. Jankowski
This fixed my problem: Thanks! Did you run 'sudo apt-get update' as well so that it actually reads the listing at CRAN / FHCRC ? What does 'apt-cache policy r-base' show? [ It should display the different vertsions it knows about; if you only see 2.4.1 then you have a problem which may just be

Re: [R] Histograms with strings, grouped by repeat count (w/ data)

2007-06-18 Thread Matthew Trunnell
Aha! So to expand that from the original expression, table(table(d$filename, d$email_addr)) 0 1 2 3 253 20 8 9 I think that is exactly what I'm looking for. I knew it must be simple!!! What does the 0 column represent? Also, does this tell me the same thing, filtered by Japan?

  1   2   >