Re: [R] Using locator() to digitise

2005-03-21 Thread M.Kondrin
(Ted Harding) wrote: Hi Folks, I'm contemplating using locator() to digitise external graphics. To set context, I would be using X11 display on Linux. Hi, Ted! Beside searching for specialized packages, I would suggest you to try my package RImgViewer which uses Gtk2 library to import and

Re: [R] Interaction term in anova - how it should be written in a manuscript table?

2005-03-21 Thread Witold Eryk Wolski
Thanks a lot cheers Eryk Marc Schwartz wrote: For a me too post, I agree with Andy's recommendation, which in turn is supported by How to Report Statistics in Medicine by Lang and Secic, ACP, 1997. There is an example table (8.2) on page 133. HTH, Marc Schwartz On Sun, 2005-03-20 at 15:44 -0500,

Sv: [R] Using locator() to digitise

2005-03-21 Thread Sixten Borg
Hi, Splus allows pasting a graphics object into the plotting window, which makes it possible to do what you describe below. Now I use R which doesn't seem to allow pasting the picture into the graphics window, so I copy the graph onto a transparency sheet, and stick it onto my screen using

Re: [R] anomalous result for wilcox.exact in exactRankTests

2005-03-21 Thread Peter Dalgaard
Roger Levy [EMAIL PROTECTED] writes: Hi, In the exactRankTest package, I've become aware that you can get anomalous p-values (i.e., above 1) from the wilcox.exact method, as in: wilcox.exact(c(-0.6,0.8,-0.5)) Exact Wilcoxon signed rank test data: c(-0.6, 0.8, -0.5)

[R] Median in Classes

2005-03-21 Thread Hecht Michael, F+E/ST
Hello, I've got a problem to find an effective calculation. There are x,y data and I want to build classes for the x values. For each class then I want to calculate the median, N%-Quantiles, outliers, etc. for the corresponding y values and store all in a vector or matrix. Is there a direct

RE: Sv: [R] Using locator() to digitise

2005-03-21 Thread Ted Harding
On 21-Mar-05 Sixten Borg wrote: Hi, Splus allows pasting a graphics object into the plotting window, which makes it possible to do what you describe below. Now I use R which doesn't seem to allow pasting the picture into the graphics window, so I copy the graph onto a transparency sheet,

Re: [R] Using locator() to digitise

2005-03-21 Thread Ted Harding
On 21-Mar-05 M.Kondrin wrote: (Ted Harding) wrote: Hi Folks, I'm contemplating using locator() to digitise external graphics. To set context, I would be using X11 display on Linux. Hi, Ted! Beside searching for specialized packages, I would suggest you to try my package RImgViewer

[R] Convex hull line coordinates..

2005-03-21 Thread achilleas . psomas
Hello R-Helpers.. I am still new in R and I have the following question.. I am applying the function chull on a 2D dataset and have the convex hull nicely calculated and plotted. Do you know if there is a way to extract the coordinates of the line created from the connection of the chull data

[R] Violin plot for discrete variables.

2005-03-21 Thread Witold Eryk Wolski
Dear Rgurus, To my knowledge the best way to visualize the distribution of a discrete variable X is plot(table(X)) The problem which I have is the following. I have to discrete variables X and Y which distribution I would like to compare. To overlay the distribution of Y with lines(table(Y))

Re: [R] Median in Classes

2005-03-21 Thread Dimitris Rizopoulos
you could try something like this: dat - data.frame(x=rep(1:4, each=25), y=rnorm(100)) tapply(dat$y, dat$x, summary) I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven Address: Kapucijnenvoer 35,

[R] Remove columns from data-frame

2005-03-21 Thread Maciej Bliziski
Hello, I'm new to the list, hello everybody! :-) I have a question. I looked carefully through the documentation and googled, and found no answer, so I'm posting it here. Let's say I have a data frame with lots of columns (about 300), which are factors. Many columns-factors have only one

[R] menu() and commands assigned to choices -break out a repeat loop so that the next code lines to be read

2005-03-21 Thread Guillaume STORCHI
first:I'd like to have the choice between breaking out a repeat loop or continue it then: i'd would like my code after the end of my repeat loop not to be read unless I type 2 (to continue executing the content of my repeat loop) THAT'S THE PROBLEM Is there any way to go straight out of the

Re: [R] Remove columns from data-frame

2005-03-21 Thread Dimitris Rizopoulos
try this: dat - data.frame(y=rnorm(100), f1=sample(c(Yes, No), 100, TRUE), f2=rep(Yes, 100), f3=rep(No, 100)) # dat[!sapply(dat, function(x) all(x==x[1]))] I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic

Re: [R] menu() and commands assigned to choices -break out a repeat loop so that the next code lines to be read

2005-03-21 Thread Uwe Ligges
Guillaume STORCHI wrote: first:I'd like to have the choice between breaking out a repeat loop or continue it then: i'd would like my code after the end of my repeat loop not to be read unless I type 2 (to continue executing the content of my repeat loop) THAT'S THE PROBLEM Is there any way to

[R] classes of data (with a variable size)

2005-03-21 Thread Guillaume STORCHI
How is it possible to split a data.frame in order to get classes with variable size. actually I'd like to get classes of data with classe size (cs) so that cs becomes bigger with an other increasing value. Guillaume Storchi __ R-help@stat.math.ethz.ch

[R] menu() and continue a repeat loop without executing the code that follows the loop!!?

2005-03-21 Thread Guillaume STORCHI
first:I'd like to have the choice between breaking out a repeat loop or continue it then: i'd would like my code after the end of my repeat loop not to be read unless I type 2 (to continue executing the content of my repeat loop) THAT'S THE PROBLEM Is there any way to go straight out of

[R] Count missing variables in dataset

2005-03-21 Thread Jan Sabee
I have a problem about how to count missing variables in dataset. I have a question for my customer. They are must choice one of answer for example: A, B, C, D and E. Now, I have dataset which is the result from my question, for instance: x1 x2 x3 x4 x5 A A A B A C A A A A B B A B

[R] X11 Fonts sizes

2005-03-21 Thread Wolfgang Waser
In postscript graphs (pointsize = 10, different sizes in graph adjusted via cex) I would like to use different font sizes but get the following warning message: Warning messages: 1: X11 used font size 8 when 9 was requested 2: X11 used font size 8 when 7 was requested 3: X11 used font size 8

[R] Remove save workspace image? window when exit R

2005-03-21 Thread Luis Ridao Cruz
R-help, I wish to remove the message at the end of a session save workspace image? . By googling I found no answer . Thanks in advance I run on Windows XP version _ platform i386-pc-mingw32 arch i386 os mingw32 system i386, mingw32

RE: [R] Count missing variables in dataset

2005-03-21 Thread Liaw, Andy
Something like: sum(sapply(dat, function(x) ! x %in% c(A, B, C))) probably would work. HTH, Andy From: Jan Sabee I have a problem about how to count missing variables in dataset. I have a question for my customer. They are must choice one of answer for example: A, B, C, D and E. Now, I

Re: [R] Count missing variables in dataset

2005-03-21 Thread Achim Zeileis
On Mon, 21 Mar 2005 12:07:16 +0100 Jan Sabee wrote: I have a problem about how to count missing variables in dataset. I have a question for my customer. They are must choice one of answer for example: A, B, C, D and E. Now, I have dataset which is the result from my question, for instance:

[R] Training data

2005-03-21 Thread Leonn Turner
Hello! I would like to prepare training data to predict stock flow. Prediction should be based on 2 inputs (date, stock currency) input data : date, stock_currency 1.1.2004, 1000.00 2.1.2004, 1120.00 5.1.2004, 1230.00 7.1.2004, 1150.00 10.1.2004,1040.00 11.1.2004, 999.00 1.2.2004, 945.00

Re: [R] Remove save workspace image? window when exit R

2005-03-21 Thread Uwe Ligges
Luis Ridao Cruz wrote: R-help, I wish to remove the message at the end of a session save workspace image? . By googling I found no answer . Well, I found at once, e.g. look for a thread that started with Quit asking me ... and ended up in a nice quiz. Uwe Ligges Thanks in advance I run on

Re: [R] X11 Fonts sizes

2005-03-21 Thread Peter Dalgaard
Wolfgang Waser [EMAIL PROTECTED] writes: In postscript graphs (pointsize = 10, different sizes in graph adjusted via cex) I would like to use different font sizes but get the following warning message: Warning messages: 1: X11 used font size 8 when 9 was requested 2: X11 used font

[R] Remove save workspace image? window when exit R

2005-03-21 Thread Jabez Wilson
from the command line q(no) is one way to do it R-help, I wish to remove the message at the end of a session save workspace image? . By googling I found no answer . Thanks in advance I run on Windows XP version _ platform i386-pc-mingw32 arch i386 os

Re: [R] Sweave/margin

2005-03-21 Thread Jan T. Kim
On Fri, Mar 18, 2005 at 10:49:32PM +0100, Katharina Hoff wrote: I am currently using Sweave for writing my bachelor thesis - and I have a problem: I am using a LaTeX style (report) with quite big margin spaces. The Sweave generated LaTeX code floats into the margin - and it looks ugly. The

RE: [R] Violin plot for discrete variables.

2005-03-21 Thread Liaw, Andy
I'd suggest dotcharts, such as: x1 - sample(letters[1:4], 100, replace=TRUE, prob=c(.2, .3, .4, .1)) x2 - sample(letters[1:4], 100, replace=TRUE, prob=c(.1, .4, .3, .2)) f1 - table(x1) / length(x1) f2 - table(x2) / length(x2) lev - factor(c(names(f1), names(f2))) require(lattice) dotplot(lev ~

RE: [R] Remove save workspace image? window when exit R

2005-03-21 Thread Liaw, Andy
If you are using Rgui, right-click on the icon you use to start R and click on Properties, and add --no-save to the command that starts R. Andy From: Luis Ridao Cruz R-help, I wish to remove the message at the end of a session save workspace image? . By googling I found no answer .

[R] type=raw vs type=class

2005-03-21 Thread Leonn Turner
Hello! Could someone explain me the meaning of predict function parameter named type: 1. type=raw 2.type=class Thank you. [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list

RE: [R] type=raw vs type=class

2005-03-21 Thread Liaw, Andy
For what class? Those don't sound like they apply to _all_ predict methods. Andy From: Leonn Turner Hello! Could someone explain me the meaning of predict function parameter named type: 1. type=raw 2.type=class Thank you. [[alternative HTML version deleted]]

Re: [R] Force labelling of x-axis

2005-03-21 Thread Marc Schwartz
On Sun, 2005-03-20 at 23:15 -0500, Bill Kranec wrote: Hi, I'm trying to do a box-whisker plot of two columns of a data frame, a list of category names in one column vs. some numerical values in the other. The plot itself works fine, but only a few points of the x-axis ( the category names

[R] Convert numeric to class

2005-03-21 Thread Xiyan Lon
Dear all, I have a script about iteration classification, like this below data(iris) N - 5 ir.tr.iter - vector('list',N) ir.tr - vector('list',N) for (j in 1:N) { ir.tr[[j]] - rpart(Species ~., data=iris) ir.tr.iter[j] - ir.tr[[j]]$frame result - list(ir.tr=ir.tr,

[R] Bug on the stem function or in my brain ?

2005-03-21 Thread Jose A. Hernandez
Good day R-ers! I was running the basic statistics for the exam that my students took last week and something does not make sense with the stem() fucntion. Here are two of my variables: time, is time to complete the exam in minutes exam.1, is the grade for the exam In stem(), to the left of the

RE: [R] Convert numeric to class

2005-03-21 Thread Liaw, Andy
-Original Message- From: Xiyan Lon Dear all, I have a script about iteration classification, like this below data(iris) N - 5 ir.tr.iter - vector('list',N) ir.tr - vector('list',N) for (j in 1:N) { ir.tr[[j]] - rpart(Species ~., data=iris) ir.tr.iter[j] -

[R] Maximum amount of memory

2005-03-21 Thread marvena
Hi, I have a problem:I need to use the maximum amount of memory in order to perform a very tough analysis. By purchasing the suitable computer, what's the maximum amount of memory obtainable in R? Thanks, Marco __

[R] rpart memory problem

2005-03-21 Thread jenniferbecq
Hi everyone, I have a problem using rpart (R 2.0.1 under Unix) Indeed, I have a large matrix (9271x7), my response variable is numeric and all my predictor variables are categorical (from 3 to 8 levels). Here is an example : mydata[1:5,] distance group3 group4 group5 group6

[R] How to do knn regression

2005-03-21 Thread Menghui Chen
How can I do a simple k nearest neighbor regression in R? My training data have 1 predictor and 1 outcome, both are numeric. I also need to use FPE and SC to find the optimal model. I know there is knn() in class package, but it's for knn classification. I also find a kknn package. What function

RE: [R] How to do knn regression

2005-03-21 Thread Liaw, Andy
ksmooth() will work for you, since you only have one predictor. There are better choices, though, such as loess(). Andy From: Menghui Chen How can I do a simple k nearest neighbor regression in R? My training data have 1 predictor and 1 outcome, both are numeric. I also need to use FPE

Re: [R] Convert numeric to class

2005-03-21 Thread Xiyan Lon
On Mon, 21 Mar 2005 10:15:37 -0500, Liaw, Andy [EMAIL PROTECTED] wrote: The `frame' component of an rpart object should already be a data frame. You just need to make sure to assign them to components of ir.tr.iter, as, e.g., ir.tr.iter[[j]] - ir.tr[[j]]$frame BTW, why would you want

Re: [R] Violin plot for discrete variables.

2005-03-21 Thread Gabor Grothendieck
Witold Eryk Wolski W.E.Wolski at ncl.ac.uk writes: : : Dear Rgurus, : : To my knowledge the best way to visualize the distribution of a discrete : variable X is : plot(table(X)) : : The problem which I have is the following. I have to discrete variables : X and Y which distribution I would

RE: [R] Bug on the stem function or in my brain ?

2005-03-21 Thread Ignacio Colonna
José, Notice that the values to the left of the | in your stem plot are all even. Odd numbers are included in the same line. Try stem(time,scale=2) The decimal point is 1 digit(s) to the right of the | 3 | 2 4 | 17 5 | 09 6 | 4667789 7 | 38 8 | 3 9 | 0335 10 |

[R] Maximum amount of memory

2005-03-21 Thread marvena
Hi, I have a problem:I need to use the maximum amount of memory in order to perform a very tough analysis. By purchasing the suitable computer, what's the maximum amount of memory obtainable in R? Thanks, Marco __

Re: [R] NaN

2005-03-21 Thread Thomas Lumley
On Mon, 21 Mar 2005, Brett Stansfield wrote: Dear R What does NaN mean? Not a Number. It is the result of improper mathematical expressions such as 0/0, Inf/Inf, logarithms of negative numbers, and so on. Might you have some zeros in `para' giving -Inf logpara? -thomas I recently did

Re: [R] Convex hull line coordinates..

2005-03-21 Thread Romain Francois
Hello, I'm not sure i got your question right, but i think the whole point is to find the equation of a line which passes by two points See ?lm Romain. Le 21.03.2005 11:09, [EMAIL PROTECTED] a écrit : Hello R-Helpers.. I am still new in R and I have the following question.. I am applying the

RE: [R] Graphics (for goodness of fit) Question

2005-03-21 Thread bogdan romocea
In regards to your plot question, you could use points() or lines(): a - sample(1:50,10) b - sample(20:40,10) plot(1:10,a,pch=20,col=red) points(1:10,b,pch=20,col=blue) #or #lines(1:10,b,pch=20,col=blue,type=o) -Original Message- From: Mohammad Ehsanul Karim [mailto:[EMAIL PROTECTED]

RE: [R] Violin plot for discrete variables.

2005-03-21 Thread Martin Maechler
AndyL == Liaw, Andy [EMAIL PROTECTED] on Mon, 21 Mar 2005 08:14:20 -0500 writes: AndyL I'd suggest dotcharts, such as: AndyL x1 - sample(letters[1:4], 100, replace=TRUE, prob=c(.2, .3, .4, .1)) AndyL x2 - sample(letters[1:4], 100, replace=TRUE, prob=c(.1, .4, .3, .2)) AndyL

Re: [R] Convex hull line coordinates..

2005-03-21 Thread Clint Bowman
?chull states: Value: An integer vector giving the indices of the points lying on the convex hull, in clockwise order. therefore (see Example in ?chull) you have the end points of each line segment from which you can compute the equation of each line segment. Since the precision

[R] NEXT WEEK: New York City Data Mining Conference: Two full-days of Case Study Presentations

2005-03-21 Thread Lisa Solomon
Apologies for cross posting - Salford Systems Data Mining 2005 New York, March 28-30, 2005 Focusing on the Contributions of Data Mining to Solving Real World Challenges

[R] Read a dataset with different lengths

2005-03-21 Thread Xiyan Lon
Dear useR again, How can I read a dataset if lines in dataset did not have same elements (have different lengths), For example: 12, 4, 16, 1, 1, 3, 1, 1, 15, 5, 1, 1, 14, 1, 1 22, 13, 5, 1, 1, 3, 1, 1, 15, 5, 1, 1, 14, 1, 1 34, 5, 11, 1, 1, 6, 1, 1, 5, 14,

Re: [R] classes of data (with a variable size)

2005-03-21 Thread Spencer Graves
Have you looked at sample and the various ways of subscripting in, e.g., An Introduction to R [the upper left option after help.start() in R 2.0.1]? Beyond that, I'm very sorry, but I can't understand what you are asking. If this does NOT answer your question, please read the

Re: [R] Maximum amount of memory

2005-03-21 Thread Tim Cutts
On 21 Mar 2005, at 4:42 pm, [EMAIL PROTECTED] wrote: Hi, I have a problem:I need to use the maximum amount of memory in order to perform a very tough analysis. By purchasing the suitable computer, what's the maximum amount of memory obtainable in R? Assuming that R is happy to use 64-bit memory

RE: [R] Read a dataset with different lengths

2005-03-21 Thread Liaw, Andy
If the file is formatted as you've shown, you should be able to read it with read.fwf(). Andy From: Xiyan Lon Dear useR again, How can I read a dataset if lines in dataset did not have same elements (have different lengths), For example: 12, 4, 16, 1, 1, 3, 1, 1, 15, 5, 1,

Re: [R] Convex hull line coordinates..

2005-03-21 Thread Barry Rowlingson
Romain Francois wrote: Hello, I'm not sure i got your question right, but i think the whole point is to find the equation of a line which passes by two points See ?lm Or see a basic geometry book, where you will find a formula such as: (x-x1)/(y-y1) = (x2-x1)/(y2-y1) for the equation of a line

Re: [R] Read a dataset with different lengths

2005-03-21 Thread Uwe Ligges
Xiyan Lon wrote: Dear useR again, How can I read a dataset if lines in dataset did not have same elements (have different lengths), For example: 12, 4, 16, 1, 1, 3, 1, 1, 15, 5, 1, 1, 14, 1, 1 22, 13, 5, 1, 1, 3, 1, 1, 15, 5, 1, 1, 14, 1, 1 34, 5, 11, 1, 1, 6,

RE: [R] Read a dataset with different lengths

2005-03-21 Thread Berton Gunter
Without some sort of formatting or prior knowledge to indicate which fields are present and which are missing, I don't see how such a file can be properly read. With such formatting present, there are several ways. e.g. See ?read.table, ?readLines, ?scan, ?connections, ... -- Bert Gunter

Re: [R] Maximum amount of memory

2005-03-21 Thread Roger D. Peng
The amount of memory you can access depends on many things, most of which are not related to R. With a 64-bit processor and suitable OS we've used R on a machines with 16GB of RAM (and accessed most of it). Of course, the memory does get very expensive after a certain point -roger [EMAIL

Re: [R] Generating Interaction Factors (combinations of Data Frame columns)

2005-03-21 Thread Kjetil Brinchmann Halvorsen
Thomas Hopper wrote: I'm starting to do a fair amount of DOE in my day job and need to generate full- and fractional-factorial designs. One of the things I'd like to do is generate all possible interaction effects, given the main effects. I've been searching through the documentation, packages

Re: [R] Maximum amount of memory

2005-03-21 Thread Peter Dalgaard
Tim Cutts [EMAIL PROTECTED] writes: On 21 Mar 2005, at 4:42 pm, [EMAIL PROTECTED] wrote: Hi, I have a problem:I need to use the maximum amount of memory in order to perform a very tough analysis. By purchasing the suitable computer, what's the maximum amount of memory obtainable in

Re: [R] Read a dataset with different lengths

2005-03-21 Thread Gabor Grothendieck
Xiyan Lon xiyanlon at gmail.com writes: : : Dear useR again, : How can I read a dataset if lines in dataset did not have same : elements (have different lengths), For example: : : 12, 4, 16, 1, 1, 3, 1, 1, 15, 5, 1, 1, 14, 1, 1 : 22, 13, 5, 1, 1, 3, 1, 1, 15, 5, 1,

[R] RSPython

2005-03-21 Thread Juan Pablo Romero
Hello I'd like to try RSPython, but can't make it work. I think I followed all the instructions, and made this shell script to load python: - #!/bin/sh export R_HOME=/usr/local/lib/R export PYTHONPATH=$R_HOME/library/RSPython/Python:$R_HOME/library/RSPython/libs

Re: [R] Maximum amount of memory

2005-03-21 Thread Thomas Lumley
On Mon, 21 Mar 2005, Tim Cutts wrote: On 21 Mar 2005, at 4:42 pm, [EMAIL PROTECTED] wrote: Hi, I have a problem:I need to use the maximum amount of memory in order to perform a very tough analysis. By purchasing the suitable computer, what's the maximum amount of memory obtainable in R? Assuming

Re: [R] rpart memory problem

2005-03-21 Thread Uwe Ligges
[EMAIL PROTECTED] wrote: Hi everyone, I have a problem using rpart (R 2.0.1 under Unix) Indeed, I have a large matrix (9271x7), my response variable is numeric and all my predictor variables are categorical (from 3 to 8 levels). Your problem is the number of levels. You get a similar number of

[R] Hazard function or cumulative Hazard function in R

2005-03-21 Thread yassir rabhi
Hi, I'm student from canada, and i'work in survival analysis.I want to know if there is a hazard function or cumulative hazard function in R or not, i know how to program it, but it is easy to use it if they exists in R. Thanks. Yassir

Re: [R] Convex hull line coordinates..

2005-03-21 Thread Gabor Grothendieck
achilleas.psomas at wsl.ch writes: : : Hello R-Helpers.. : : I am still new in R and I have the following question.. : I am applying the function chull on a 2D dataset and have the convex hull : nicely : calculated and plotted. : Do you know if there is a way to extract the coordinates of the

Re: [R] Read a dataset with different lengths

2005-03-21 Thread Xiyan Lon
Thank you for your quick respons, helps, advise, links, etc. I have solved my problems now. Best wishes, Xiyan Lon __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide!

[R] flatten a matrix and unflatten it

2005-03-21 Thread Bill Simpson
I want to flatten a matrix and unflatten it again. Please tell me how to do it. 1. given a matrix: x1 y1 z1 x2 y2 z2 ... xk yk zk convert it to a vector: x1, y1, z1, x2, y2, z2, ..., xk, yk, zk 2. given a vector: x1, y1, z1, x2, y2, z2, ..., xk, yk, zk convert it to a matrix x1 y1 z1 x2 y2 z2

[R] working with tables

2005-03-21 Thread Carsten Steinhoff
Hi, two questions - I think simple to solve for you ... (1) I've written a function containing some loops. Each loop will generate a few outputs. Finally I have to combine them to get something like a spreadsheet that my colleagues can import in EXCEL. Up to now I'm doing it as follows: With

RE: [R] flatten a matrix and unflatten it

2005-03-21 Thread Huntsinger, Reid
If you can rearrange things to work column-wise rather than row-wise, then dim(x) - NULL makes a matrix into a vector by concatenating columns, and dim(x) - c(m,n) makes the vector x into a matrix with column 1 equal to the first m elements of x, column 2 equal to the next m elements, etc. If

[R] Highlighting points in a scatter plot matrix

2005-03-21 Thread Brett Stansfield
Dear R I recently did a scatterplot matrix using the following command pairs(sleep[c(SlowSleep, ParaSleep, logbw, logbrw, loglife, loggest)],col=1+as.integer(ParaSleep 5.5 | SlowSleep 15.7)) this highlighted outlying points for some of the x,y plots that I needed to identify. Unfortunately this

Re: [R] flatten a matrix and unflatten it

2005-03-21 Thread Gabor Grothendieck
Bill Simpson William.Simpson at drdc-rddc.gc.ca writes: : : I want to flatten a matrix and unflatten it again. Please tell me how to : do it. : : 1. given a matrix: : x1 y1 z1 : x2 y2 z2 : ... : xk yk zk : convert it to a vector: : x1, y1, z1, x2, y2, z2, ..., xk, yk, zk : : 2. given a

Re: [R] Hazard function or cumulative Hazard function in R

2005-03-21 Thread Kjetil Brinchmann Halvorsen
yassir rabhi wrote: Hi, I'm student from canada, and i'work in survival analysis.I want to know if there is a hazard function or cumulative hazard function in R or not, i know how to program it, but it is easy to use it if they exists in R. Thanks.

Re: [R] Hazard function or cumulative Hazard function in R

2005-03-21 Thread Spencer Graves
1. Have you looked at the survival package? Venables and Ripley (2002) Modern Applied Statistics with S (Springer) has a chapter on survival analysis that I found quite helpful. The survival package includes hazard plots, which are discussed in Venables and Ripley. 2. If that is

RE: [R] Using locator() to digitise

2005-03-21 Thread Mulholland, Tom
I've used rimage to read in graphics files (jpeg.) If I recall correctly, I think I had to install some libraries. What I can't recall is if it was any faster than pixmap, as I was mainly concerned with the file format and the forensic image processing possibilities. Tom -Original

[R] error with polr()

2005-03-21 Thread Chaehyung Ahn
Dear Sir, I get an error message when I use polr() in MASS package. My data is ord.dat. I made y a factor. y y1 y2 x lx 1 0 0 0 3.2e-02 -1.49485 2 0 0 0 3.2e-02 -1.49485 3 0 0 0 1.0e-01 -1.0 4 0 0 0 1.0e-01 -1.0 5 0 0 0 3.2e-01 -0.49485 6 0 0 0 3.2e-01

[R] problem in textConnection function

2005-03-21 Thread Michael S
Dear all-helpers: I create one package ,code like this: output - function(x,y) { zz -textConnection(foo,w) sink(zz) a -5 b -6 z -a*b z e -spss h -c(1,2,3) ls() r-c(s,p,s,s) p-list(1:10) p sink()

RE: [R] problem in textConnection function

2005-03-21 Thread Mulholland, Tom
It seems to me that you are trying to do too much at a time. Firstly I think it would be a good idea to get you code working before you try and make a package. Some possibilities are that you write somethin meaningful rather than the first thing that pops into your head. What sort of output are

[R] I modify my question in textconnection output

2005-03-21 Thread Michael S
dear ALL-R-helper: I modify my question in textconnection output: I wrote one function in Rgui: output - function(y){ x - textConnection(foo,w) sink(x) a -5 b -6 z -a*b z e -spss h -c(1,2,3) ls() r-c(s,p,s,s)

Re: [R] problem in textConnection function

2005-03-21 Thread Gabor Grothendieck
Michael S michael_shen at hotmail.com writes: : : Dear all-helpers: : : I create one package ,code like this: : output - : function(x,y) : { : zz -textConnection(foo,w) : sink(zz) : a -5 : b -6 : z -a*b : z : e -spss : h -c(1,2,3) : ls() :

Re: [R] I modify my question in textconnection output

2005-03-21 Thread Gabor Grothendieck
Michael S michael_shen at hotmail.com writes: : : dear ALL-R-helper: : I modify my question in textconnection output: : I wrote one function in Rgui: : output - function(y){ : x - textConnection(foo,w) : sink(x) : a -5 : b -6 : z -a*b : z : e -spss :

[R] List of tables rather than an extra dimension in the table or (l)apply(xtabs)

2005-03-21 Thread Mulholland, Tom
I'm not sure how to best explain what I am after but here goes. I have a data frame with 2 geographical factors. One is the major region the other is the component regions. I am trying to process all the regions at the same time without using for. So I need (think, I do) a list of matrices

RE: [R] List of tables rather than an extra dimension in the table or (l)apply(xtabs)

2005-03-21 Thread Mulholland, Tom
I wrote a function that created the crosstab and removed the extraneous lines and then used lapply aestabs - function(x){ temp - xtabs(psn ~ lga + year,x) temp - temp[rowSums(temp) != 0,] return(temp) } eas2 - lapply(split(ipi$eas,ipi$eas$RegionNum),aestabs) It's not really

RE: [R] error with polr()

2005-03-21 Thread Bill.Venables
This is always tricky. Here is a work-around. Try asking for the Hessian with the original fit: fm - polr(factor(y) ~ lx, data = ord.dat, Hess=T) summary(fm) Call: polr(formula = factor(y) ~ lx, data = ord.dat, Hess = T) Coefficients: Value Std. Error t value lx 2.420614 0.8146359

Re: [R] Highlighting points in a scatter plot matrix

2005-03-21 Thread Uwe Ligges
Brett Stansfield wrote: Dear R I recently did a scatterplot matrix using the following command pairs(sleep[c(SlowSleep, ParaSleep, logbw, logbrw, loglife, loggest)],col=1+as.integer(ParaSleep 5.5 | SlowSleep 15.7)) this highlighted outlying points for some of the x,y plots that I needed to

Re: [R] Numeric prediction

2005-03-21 Thread Uwe Ligges
Noel Anel wrote: Hello! Which class(model) is most appropriate for numeric predition? This is a joke, isn't it? It highly depends on your problem (what numeric predition means), the data, your criterion what most appropriate means, etc. Please read some basic textbook(s) on statistics or look

Re: [R] lattice xyplot() postscript (?) problem in R 2.0.0

2005-03-21 Thread Uwe Ligges
Gerrit Eichner wrote: Dear all, I work with R Version 2.0.0 on Machine hardware: sun4u OS version: 5.9 Processor type: sparc Hardware: SUNW,Sun-Blade-1000 and I have a very simple data frame (called OR) with the following variables: sapply( OR, class) Xci