Re: [R] tcltk error compiling R 2.13.0 under Windows 7 x64

2010-12-14 Thread Uwe Ligges
On 14.12.2010 02:26, Peter Langfelder wrote: On Mon, Dec 13, 2010 at 4:33 PM, Joshua Wileyjwiley.ps...@gmail.com wrote: Hi All, I am trying to compile R 2.13.0 r53834 on 64-bit Windows 7 (home premium) using Rtools212.exe from Duncan Murdoch's site. I (think) I followed the installation

Re: [R] rpart.object help

2010-12-14 Thread Gavin Simpson
On Mon, 2010-12-13 at 01:55 -0800, jagdeesh_mn wrote: Prof Brian Ripley wrote: snip / Thanks Mr. Brian. That kind of answers my query. On the same note I would like to ask few other questions. Sorry if you find them naive, I am a novice in this subject and am trying to get a grip on

Re: [R] Re : Re: descriptive statistics

2010-12-14 Thread Jim Lemon
On 12/14/2010 01:14 AM, effeesse wrote: I am sorry, but I cannot understand how to use the summary function. Maybe, if I describe my needs, you could sketch a line that could work. In the data set variable V can take values 1 to 14. For the subgroup of individuals where V takes value =1 I want

Re: [R] Saving iterative components

2010-12-14 Thread Annalaura
Thanks a lot Uwe Ligges, I've abandoned R for a few time but now I'm working with it, so I've a question about the last problem that you solved: instead to write cv_1994- idw.cv(X01_1994) cv_1995- idw.cv(X01_1995) cv_1996- idw.cv(X01_1996) cv_1997- idw.cv(X01_1997) .

[R] Drawing Maps of detailed Australian regions

2010-12-14 Thread Wang, Kevin (SYD)
Hi all, I'm trying to draw a bubble plot over a map -- where the map shows local government areas (LGA) in Australia (or other structures under the Australian Standard Geographical Classification), but am not sure where I can find the data to plot such maps (e.g. draw the state of Northern

Re: [R] Saving iterative components

2010-12-14 Thread Liviu Andronic
On Tue, Dec 14, 2010 at 10:34 AM, Annalaura annalaura.ru...@imaa.cnr.it wrote: Thanks a lot Uwe Ligges, I've abandoned R for a few time but now I'm working with it, so I've a question about the last problem that you solved: instead to write cv_1994- idw.cv(X01_1994) cv_1995- idw.cv(X01_1995)

Re: [R] Saving iterative components

2010-12-14 Thread Ivan Calandra
Hi, I'm trying to understand when and how to use do.call(). In this case, would it work with do.call() instead of lapply(), like this? vars - list(names(Tmese[, -(1:2)])) res - do.call(idw.cv, vars) Thanks, Ivan Le 12/14/2010 11:48, Liviu Andronic a écrit : On Tue, Dec 14, 2010 at 10:34 AM,

Re: [R] spatial clusters

2010-12-14 Thread Roger Bivand
SKATER is included in the spdep package, and was contributed by its original authors. Roger Georg Ruß wrote: On 10/12/10 23:26:28, dorina.lazar wrote: I am looking for a clustering method usefull to classify the countries in some clusters taking account of: a) the geographical distance

Re: [R] Drawing Maps of detailed Australian regions

2010-12-14 Thread Barry Rowlingson
On Tue, Dec 14, 2010 at 10:45 AM, Wang, Kevin (SYD) kevinw...@kpmg.com.au wrote: Hi all, I'm trying to draw a bubble plot over a map -- where the map shows local government areas (LGA) in Australia (or other structures under the Australian Standard Geographical Classification), but am not

Re: [R] Drawing Maps of detailed Australian regions

2010-12-14 Thread Roger Bivand
Please consider posting to R-sig-geo at https://stat.ethz.ch/mailman/listinfo/r-sig-geo https://stat.ethz.ch/mailman/listinfo/r-sig-geo , where maybe someone will be able to point you to a data source. Roger Wang, Kevin (SYD) wrote: Hi all, I'm trying to draw a bubble plot over a map

Re: [R] multivariate multi regression

2010-12-14 Thread peter dalgaard
On Dec 14, 2010, at 03:21 , Bastiaan Bergman wrote: That doesn't work, one would get two different answers depending on the order of execution. The physics is: Overlay error on a Silicon wafer. One wafer has many flash fields, each flash field has multiple locations where the overlay error

Re: [R] multivariate multi regression / aligning objects anything in bio or mapping?

2010-12-14 Thread Mike Marchywka
From: pda...@gmail.com Date: Tue, 14 Dec 2010 13:50:27 +0100 To: bastiaan.berg...@wdc.com CC: r-help@r-project.org Subject: Re: [R] multivariate multi regression On Dec 14, 2010, at 03:21 , Bastiaan Bergman wrote: That doesn't work, one

[R] problems with lattice barchart

2010-12-14 Thread Juan Santos
Hello everybody! I´m trying to create figures summarizing the abundance of a given species (y), by its length classes (x), year (conditional factor) and a grouping named as fraction. I am using the lattice´s barchart but some problems arises: When I run the function, the

Re: [R] How to plot Ellipsoid like function

2010-12-14 Thread Uwe Wolfram
Dear R-Users, I am trying to plot an ellipsoid like function that represents some physical threshold in its eigenvalue space. I am facing a few problems generating a figure I need for my thesis. A small example looks as follwos where the two contour3d plots do NOT overlay as desired so you may

Re: [R] How to plot Ellipsoid like function

2010-12-14 Thread Duncan Murdoch
On 14/12/2010 8:45 AM, Uwe Wolfram wrote: Dear R-Users, I am trying to plot an ellipsoid like function that represents some physical threshold in its eigenvalue space. I am facing a few problems generating a figure I need for my thesis. A small example looks as follwos where the two contour3d

Re: [R] rpart.object help

2010-12-14 Thread Terry Therneau
On Sun, 12 Dec 2010, jagdeesh_mn wrote: Hi, Suppose i have generated an object using the following : fit - rpart(Kyphosis ~ Age + Number + Start, data=kyphosis) And when i print fit, i get the following : n= 81 node), split, n, loss, yval, (yprob) * denotes terminal node 1)

[R] rpart - how to estimate the “meaningful” predictors for an outcome (in classification t rees)

2010-12-14 Thread Tal Galili
Hi dear R-help memebers, When building a CART model (specifically classification tree) using rpart, it is sometimes obvious that there are variables (X's) that are meaningful for predicting some of the outcome (y) variables - while other predictors are relevant for other outcome variables (y's

Re: [R] curve

2010-12-14 Thread Sarah Goslee
Val, Here's the complete console output. The graph produced is at: http://www.functionaldiversity.org/temp/curve.png R version 2.12.0 (2010-10-15) Copyright (C) 2010 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: x86_64-redhat-linux-gnu (64-bit) R is free software and

Re: [R] Browsing through a dataframe page by page (like with shell command more)

2010-12-14 Thread Alexandre CESARI
Thank you all for your input. View is quite nice, despite the fact that you need to be in a X session and it seems(?) difficult to copy paste data out of the view. page(my_var) works great and is most similar to what I had in mind. TkListView seems interesting but quite slow for large list or

[R] Question about cut()

2010-12-14 Thread Tianchan Niu
Dear all, I would like to use cut() to make numerics to factors, the sample codes are as follows. However, the result is not what I want, since r[3] = 9 should be in the interval of 8-10% rather than 2-4%. Maybe cut() is not the right function to use for my situation. Please help. r -

[R] lines and points without margin

2010-12-14 Thread Andrew Collier
hi, i am sure that this is a trivial question but i have not been able to find an answer by searching the mailing lists. i want to plot points on a graph, joined by lines. the command that i am using is points(x, y, type = b, pch = 21) this plots nice open circles at the data points and draws

[R] labelling of axis in plot.ca

2010-12-14 Thread Manderscheid Katharina
hi all, how can i get correspondence analysis plots (package ca, plot.ca()) with the inertia on the two dimensions of the map? thanks, kat [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] lines and points without margin

2010-12-14 Thread baptiste auguie
Hi, Try the following, plot(1:10,rnorm(10),t=o) ## fill the points in white plot(1:10,rnorm(10),t=o,pch=21,bg=white) You could also try this with Grid graphics, library(gridExtra) # like type=o grid.barbed(space=0) # like type=b grid.barbed(space=1) # like the example above, but without

Re: [R] Re : Re: descriptive statistics

2010-12-14 Thread effeesse
Thanks! I got the results! Now I would like to put them in a nice and readable plot to see if there are outlier means or variances. Using plot(by_many$mean) I got Error in by_many$mean : object of type 'closure' is not subsettable. Another question: I have done the principal components analysis

[R] Question

2010-12-14 Thread Matthew Rosett
How do I determine if my data deviate from the normal distribution? The sample size is 1000 (weights of people). __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

[R] Selecting non-empty elements after strsplit of string

2010-12-14 Thread Scott Chamberlain
Hello, I am attempting to manipulate strings in which there are differing amounts of whitespace before and after each element taht I want to keep (any word, letter, or number). However, after strsplit and unlist, I know how to select specific elements with [ ], but I want to select instead

[R] Selecting non-empty elements after strsplit of string

2010-12-14 Thread Scott Chamberlain
Hello, I am attempting to manipulate strings in which there are differing amounts of whitespace before and after each element taht I want to keep (any word, letter, or number). However, after strsplit and unlist, I know how to select specific elements with [ ], but I want to select instead all

Re: [R] lines and points without margin

2010-12-14 Thread Ben Bolker
Andrew Collier collierab at gmail.com writes: i am sure that this is a trivial question but i have not been able to find an answer by searching the mailing lists. i want to plot points on a graph, joined by lines. the command that i am using is points(x, y, type = b, pch = 21) this plots

Re: [R] writing sample values in to a file

2010-12-14 Thread Dieter Menne
chandu wrote: I am relatively new to R. I would like to know how can we write the realizations (for example generated through rnorm or runif) in to a data file. It would be very inefficient to first generate values and then write them in to file using write function. Instead, is there a

Re: [R] Question about cut()

2010-12-14 Thread Gavin Simpson
On Tue, 2010-12-14 at 15:40 +, Tianchan Niu wrote: Dear all, I would like to use cut() to make numerics to factors, the sample codes are as follows. However, the result is not what I want, since r[3] = 9 should be in the interval of 8-10% rather than 2-4%. Maybe cut() is not the right

Re: [R] writing sample values in to a file

2010-12-14 Thread Dennis Murphy
Hi: On Mon, Dec 13, 2010 at 4:28 PM, chandu chandrasekhar.kar...@gmail.comwrote: Dear all, I am relatively new to R. I would like to know how can we write the realizations (for example generated through rnorm or runif) in to a data file. It would be very inefficient to first generate

Re: [R] Question about cut()

2010-12-14 Thread Ben Bolker
Tianchan Niu niu at isis.georgetown.edu writes: Dear all, I would like to use cut() to make numerics to factors, the sample codes are as follows. However, the result is not what I want, since r[3] = 9 should be in the interval of 8-10% rather than 2-4%. Maybe cut() is not the right function

Re: [R] Selecting non-empty elements after strsplit of string

2010-12-14 Thread Ivan Calandra
Hi, I have just recently started to use regular expression, so I'm not sure that my solution would be valid in every case. But it works in yours: unlist(strsplit(output, split= +)) [1] ab 6 It would split them whatever the number of spaces between them is (because of the + in

Re: [R] Selecting non-empty elements after strsplit of string

2010-12-14 Thread Jinyan Huang
unlist(strsplit(output, +)) On Tue, Dec 14, 2010 at 2:09 PM, Scott Chamberlain myrmecocys...@gmail.com wrote: Hello, I am attempting to manipulate strings in which there are differing amounts of whitespace before and after each element taht I want to keep (any word, letter, or number).

Re: [R] Question about cut()

2010-12-14 Thread Gerrit Eichner
Tianchan, why aren't you just using col_no - cut(r,c(0,2,4,6,8,10,100)) levels(col_no) - c(2%,2-4%,4-6%,6-8%,8-10%,10%) ? Your use of as.numeric() is nonsensical; check step by step what is happening with that. Hth, Gerrit On Tue, 14 Dec 2010, Tianchan Niu wrote: Dear all, I would like

Re: [R] Question

2010-12-14 Thread Gerrit Eichner
On Tue, 14 Dec 2010, Matthew Rosett wrote: How do I determine if my data deviate from the normal distribution? The sample size is 1000 (weights of people). See ?qqnorm and/or ?shapiro.test and/or a text book on applied statistics and/or google for testing normality. Hth, Gerrit PS:

[R] factor predictor using random forest

2010-12-14 Thread Jing Shi
Hello everyone, I have been doing a binary classification using random forest from the library randomForest. One of the predictors is a factor variable, which is known to be highly related to the binary response I am trying to predict. Other 80 predictors are numeric. Totally I have 44 subjects.

Re: [R] Date variable error

2010-12-14 Thread Ben Bolker
Kurt_Helf at nps.gov writes: Greetings In attempting to create a date variable based on month (e.g., February, April, etc.) and year (e.g., 2006) data, wherein I converted Month to a factor with Jan=1...Dec=12, I used the following command:

Re: [R] curve

2010-12-14 Thread Sarah Goslee
You are most likely to get reasonable help if you provide at a minimum your OS, the version of R you're using, and the error message you get. And also if you send your replies to the R-help list, not just me. Sarah On Tue, Dec 14, 2010 at 10:58 AM, Val valkr...@gmail.com wrote: Thank you

Re: [R] stepAIC: plot predicted versus observed

2010-12-14 Thread sergeetienneparent
I figured out how to call coefficients and R² from the summary. - fit-lm(...) #multiple regression function stepComp - stepAIC(fit, direction=both) summary(stepComp)$coef[1,1] #call first coefficient summary(stepComp)$coef[1,2] #call Std. Error of first coefficient

[R] Installing R-packages in Windows

2010-12-14 Thread Erik Lukac
Hi there, I have the following problem and I hope somebody might help me. First of all: I am using WinXP SP3 (english and/or german) with R in Version 2.10.0. Now I am trying to install some packages but unfortunately I am getting a weird error. No matter which package I am trying to install

Re: [R] peak detection

2010-12-14 Thread Joe Stuart
Thank you. I will look at that also. On Mon, Dec 13, 2010 at 9:49 PM, Michael Bedward michael.bedw...@gmail.com wrote: Hi Joe, Just for info, I've done this in the past by applying lowess followed by diff to a vector, then identifying points with change of sign in the diffs. Michael On

Re: [R] survreg vs. aftreg (eha) - the relationship between fitted coefficients?

2010-12-14 Thread Göran Broström
On Fri, Dec 10, 2010 at 5:21 PM, Eleni Rapsomaniki er...@medschl.cam.ac.uk wrote: Dear R-users, I need to use the aftreg function in package 'eha' to estimate failure times for left truncated survival data. Be careful! This is only possible under strong assumptions about the (unobserved)

Re: [R] Question

2010-12-14 Thread Bert Gunter
... (in addition to the very useful suggestion to plot your data): (Sounds like a homework question... ?). Sigh. [mount soapbox] 1. Data never deviate from normality. They only provide provide evidence to challenge (test is the formal term) the assumption that the population from which the

Re: [R] Installing R-packages in Windows

2010-12-14 Thread Mike Marchywka
( hotmail just randomly decides not to prefix original text, my comments below) Date: Tue, 14 Dec 2010 17:36:11 +0100 From: er...@phonetik.uni-muenchen.de To: r-help@r-project.org Hi there, I have the following problem and I hope somebody

Re: [R] Installing R-packages in Windows

2010-12-14 Thread Uwe Ligges
Or in short, type install.packages(car) within R. Note that you won't get new versions of car for the outdated version of R. Note also that your zip file might not fit to the R version you are using. Hence recommendation is to upgrade to R-2.12.0 patched (or 2.12.1 which will be released

Re: [R] Question

2010-12-14 Thread Greg Snow
What about thoughtless un-nasty comments? I would suggest the original poster (and others thinking that they want to do normality testing) read the help page for SnowsPenultimateNormalityTest in the TeachingDemos package, which I think agrees mostly with what Bert wrote below (though it goes

[R] colour-plot of point intensities?

2010-12-14 Thread Matthew Vernon
Hi, I've spent a while scrabbling around at this problem, to no avail. I'm sure there /should/ be a simple answer... I have a large (14 million rows) data set, with two columns. Each row contains the number of times an individual moved, and the distance that individual moved in total. I would

Re: [R] curve

2010-12-14 Thread Peter Ehlers
On 2010-12-14 08:43, Sarah Goslee wrote: You are most likely to get reasonable help if you provide at a minimum your OS, the version of R you're using, and the error message you get. And also if you send your replies to the R-help list, not just me. Sarah Sarah's code works perfectly well on

Re: [R] colour-plot of point intensities?

2010-12-14 Thread Greg Snow
Look at the hexbin package (bioconductor). -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- project.org] On Behalf Of Matthew Vernon

[R] 300 dpi and eps:

2010-12-14 Thread Aldi Kraja
Hi, I have a run of 5 graphs that I want to place them under the same page. Everything works fine to place them in a pdf file , or eps file, but when it comes to have a high quality of 300 dpi these graphs are not good. For example I open the eps file with Adobe Illustrator (AI) and it shows

[R] How to left or right truncate a character string?

2010-12-14 Thread Mark Na
Hi R-helpers, I have a character string, for example: lm(y ~ X2 + X3 + X4) from which I would like to strip off the leading and trailing quotation marks resulting in this: lm(y ~ X2 + X3 + X4) I have tried using gsub() but I can't figure out how to specify the quotation mark using a regular

Re: [R] How to left or right truncate a character string?

2010-12-14 Thread Henrique Dallazuanna
Try this: noquote(lm(y ~ X2 + X3 + X4)) To remove X characters: gsub(^.|.$, , lm(y ~ X2 + X3 + X4)) On Tue, Dec 14, 2010 at 6:27 PM, Mark Na mtb...@gmail.com wrote: Hi R-helpers, I have a character string, for example: lm(y ~ X2 + X3 + X4) from which I would like to strip off the

[R] Discriminant Correspondence Analysis

2010-12-14 Thread Wayne Sawtell
Hello everyone, I am totally new to the R program. I have had a look at some pdf documents that I downloaded and that explain how to do many things in R; however, I still cannot figure out how to do what I want to do, which is to perform Discriminant Correspondence Analysis on a rectangular

Re: [R] Discriminant Correspondence Analysis

2010-12-14 Thread Bastiaan Bergman
Read files, if you're on windows remember to include the path like this: C:\\Documents and Settings\\USER\\My Documents\\MyFile.csv -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Wayne Sawtell Sent: Tuesday, December 14, 2010 12:36

Re: [R] How to left or right truncate a character string?

2010-12-14 Thread Phil Spector
Mark - Since regular expressions in R are just character strings, it's pretty easy to assemble a regular expression to delete leading or trailing characters. For example: delchars = function(str,n,lead=TRUE){ +dots = paste(rep('.',n),collapse='') +pat =

[R] How to bind models into a list of models?

2010-12-14 Thread Mark Na
Hi R-helpers, I have a character object called dd that has 32 elements each of which is a model formula contained within quotation marks. Here's what it looks like: dd [1] lm(y ~ 1,data=Cement) lm(y ~ X,data=Cement) lm(y ~ X1,data=Cement) [4] lm(y ~

Re: [R] How to bind models into a list of models?

2010-12-14 Thread Jinyan Huang
Try step() ? On Tue, Dec 14, 2010 at 10:05 PM, Mark Na mtb...@gmail.com wrote: Hi R-helpers, I have a character object called dd that has 32 elements each of which is a model formula contained within quotation marks. Here's what it looks like: dd  [1] lm(y ~ 1,data=Cement)                

[R] 300 dpi and eps:

2010-12-14 Thread Aldi Kraja
Hi, I have a run of 5 graphs that I want to place them under the same page. Everything works fine to place them in a pdf file , or eps file, but when it comes to have a high quality of 300 dpi these graphs are not good. For example I open the eps file with Adobe Illustrator (AI) and it shows

[R] from table to matrix

2010-12-14 Thread JESSICA
I have a table like this: Date TIME Q A a1 A b2 A c3 B a4 B b5 B c6 C a7 C b8 C c9 I want use R language to turn it to a matrix like : a b c A 1 2 3 B 4 5 6 C 7 8 9 I am new to R , anyone can help?

Re: [R] How to bind models into a list of models?

2010-12-14 Thread Phil Spector
Mark - I believe lapply(dd,function(m)eval(parse(text=m))) will do what you want. - Phil Spector Statistical Computing Facility Department of Statistics

Re: [R] from table to matrix

2010-12-14 Thread Phil Spector
Here's one way: df = data.frame(Date=rep(LETTERS[1:3],each=3),TIME=rep(letters[1:3],3),Q=1:9) df Date TIME Q 1Aa 1 2Ab 2 3Ac 3 4Ba 4 5Bb 5 6Bc 6 7Ca 7 8Cb 8 9Cc 9 mat =

Re: [R] How to bind models into a list of models?

2010-12-14 Thread Mark Na
Many thanks Phil. This is perfect. I usually forget about lapply and try something more complicated. Your solution works really well. Best, Mark On Tue, Dec 14, 2010 at 3:45 PM, Phil Spector spec...@stat.berkeley.edu wrote: Mark -   I believe  lapply(dd,function(m)eval(parse(text=m)))

[R] defining contrasts in lm() - is there a simpler way?

2010-12-14 Thread Mark Heckmann
Dear R users, I am looking for a simple way to define a contrast in a linear model. I have a data frame with two factors (f1, f2) and a dependent y. x - data.frame(y =rnorm(30), f1=gl(2, 15), f2=gl(3, 5, 30)) Now I want to specify the following contrast: f1= 1 or 2 and f2=1 vs. f1= 1 or 2

Re: [R] Discriminant Correspondence Analysis

2010-12-14 Thread Mark Difford
Wayne, I don't know how to assign a name for the df, or what to put for fac, and what is worse, I get an error message saying that the program cannot find the discrimin.coa command. Before you can use a package you have downloaded you need to activate it. There are different ways of doing

Re: [R] from table to matrix

2010-12-14 Thread jonathan
That's so weird, I just signed up on here to ask exactly the same question! However, I think my issue is like Jessica's who says that her data is like that, not actually that... So the issue is not in generating that data on-the-fly but in transforming it from a data frame to a matrix. As a

Re: [R] survival: ridge log-likelihood workaround

2010-12-14 Thread Damjan Krstajic
I would like to clarify statistics that ridge coxph returns. Here is my understanding and please correct me where I am wrong. 1) In his paper Gray [JASA 1992] suggests a Wald-type statistics with the formula for degree of freedom. The summary function for ridge coxph returns the degree of

[R] GLM with different factors

2010-12-14 Thread Rafael Xavier de Camargo
Hi R-Helpers, I am stuck with my analysis. I wonder if anybody could have with this. My data set looks like: Squares Hours SppRichness Feeding_guild natprop 1 10 1 aq inverts 0.118697 2 25 2 aq inverts 0.605874 3 35 2 fish 0.61255 4 20 4 fish 0.764418 5 40 3

Re: [R] from table to matrix

2010-12-14 Thread Greg Snow
If the goal is to produce a filled contour plot, then look at the levelplot function in the trellis package, it takes the data in the form that you already have it, no need to transform. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org

Re: [R] from table to matrix

2010-12-14 Thread Sarah Goslee
There are many ways to do this in R. For very simple problems, this one is convenient: library(ecodist) newdata - crosstab(mydata$x, mydata$y, mydata$z) For more complicated problems, reshape is very powerful. Sarah On Tue, Dec 14, 2010 at 5:13 PM, jonathan j...@than.biz wrote: That's so

Re: [R] from table to matrix

2010-12-14 Thread Phil Spector
Jonathan - Same problem, same solution: Suppose your data frame is called df: thematrix = matrix(NA,max(df$x),max(df$y)) thematrix[as.matrix(df[,1:2])] = df[,3] - Phil Spector Statistical Computing Facility

Re: [R] peak detection

2010-12-14 Thread Carl Witthoft
THere's the peaks package which will do some peak detection, or 'peaks' in the simecol package. Or msc.peaks.find in caMassClass, I'm madly trying to remember what spectral package I found which has a tool similar to msextrema but returns a couple more useful lists describing the data and

[R] Use generalised additive model to plot curve

2010-12-14 Thread e-letter
Readers, I have been reading 'the r book' by Crawley and think that the generalised additive model is appropriate for this problem. The package 'gam' was installed using the command (as root) install.package(gam) ... library(gam) library(gam) Loading required package: splines Loading required

Re: [R] from table to matrix

2010-12-14 Thread Carl Witthoft
For contour plots, some of the contour functions in graphics packages (lattice for one IIRC) are pretty good at understanding that columns in a matrix correspond to x,y, and z values already. There are many ways to do this in R. For very simple problems, this one is convenient:

Re: [R] Use generalised additive model to plot curve

2010-12-14 Thread Bill.Venables
Dear Lurker, If all you art trying to do is to plot something, isn't all you need something like the following? x - c( 30, 50, 80, 90, 100) y - c(160, 180, 250, 450, 300) sp - spline(x, y, n = 500) plot(sp, type = l, xlab = x, ylab = y, las = 1, main = A Spline Interpolation) points(x,

Re: [R] Use generalised additive model to plot curve

2010-12-14 Thread Gavin Simpson
On Tue, 2010-12-14 at 22:36 +, e-letter wrote: Readers, I have been reading 'the r book' by Crawley and think that the generalised additive model is appropriate for this problem. The package 'gam' was installed using the command (as root) install.package(gam) ... library(gam)

Re: [R] from table to matrix

2010-12-14 Thread jonathan
OK well I don't mean to hijack Jessica's thread with a tangent on graphics and plots, but I'm still having some trouble. I'm a total newbie here so if the correct etiquette would be for me to start a new thread at this point then please do advise me!! The code I'm now trying to run is:

Re: [R] rpart - how to estimate the “meaningful” predictors for an outcome (in classification t rees)

2010-12-14 Thread Xiaogang Su
Hi, Tal, Here is a quick way of getting around. First create two responses via dummy variables y1 - ifelse(y==a, 1, 0) y2 - ifelse(y==b, 1, 0) and then built two separate tree models for y1 and y2 separately. Hope it helps. Xiaogang On Tue, Dec 14, 2010 at 8:33 AM, Tal Galili

Re: [R] from table to matrix

2010-12-14 Thread jonathan
Maybe I can help here: In OS X at least you can open the R Package Installer from the Packages Data menu, select a mirror, etc, then type ecodist into the search bar and then Install Selected... this will install the ecodist package on your machine. Not exactly sure how it would be done under

[R] Modifying values outside a function using apply.

2010-12-14 Thread Worik R
I am sure this si a simple problem but the solution is evading me. I have a list of matrices all with the same number of columns but different number of rows. The first two columns label the row. The labels are allways the same for the same row numbers, just some matricies have more rows. For

Re: [R] Installing R-packages in Windows

2010-12-14 Thread Mike Marchywka
Date: Tue, 14 Dec 2010 23:48:20 +0100 From: er...@phonetik.uni-muenchen.de To: marchy...@hotmail.com CC: r-help@r-project.org; lig...@statistik.tu-dortmund.de Hi Mike, Hi Uwe, thanks for your reply. The main thing is that we have mixed OSs. On

Re: [R] Discriminant Correspondence Analysis

2010-12-14 Thread Peter Ehlers
Wayne, So far, no one has said the obvious: Please do work your way through (or at least skim) An Introduction to R which you'll find right there on your computer under Help/Manuals. Your questions indicate that you have not yet done so. Do it, it really will pay off. Peter Ehlers On

[R] lattice fun: multiple themes in panels with spplot()

2010-12-14 Thread nbest937
I have some geospatial data where two layers are thematic and the third is a percentage, so the maps need to have different themes. thumbDf - as( stack( thumb), SpatialGridDataFrame) names(thum...@data) - c(pri, sec, pct) thum...@data$pri - factor(thum...@data$pri, levels=c(0:8), labels=

[R] survfit

2010-12-14 Thread Angel Russo
Hello R helpers: *My first message didn't pass trough filter so here it's again* I would like to obtain probability of an event for one single patient as a function of time (from survfit.coxph) object, as I want to find what is the probability of an event say at 1 month and what is the

Re: [R] from table to matrix

2010-12-14 Thread jonathan
I actually got it to work now using levelplot, and I also worked out how to get the graph I wanted to display, I had to assign the graph to a reference and then print it -- yes, that simple! Now I just need to work out why my levelplot doesn't look quite right, even though the data is in

Re: [R] survival: ridge log-likelihood workaround

2010-12-14 Thread Therneau, Terry M., Ph.D.
You ask some good questions. I would like to clarify statistics that ridge coxph returns. Here is my understanding and please correct me where I am wrong. 1) In his paper Gray [JASA 1992] suggests a Wald-type statistics with the formula for degree of freedom. The summary function for

Re: [R] lattice fun: multiple themes in panels with spplot()

2010-12-14 Thread nbest937
I figured out how to toggle the legend for the second scenario, but now I have three different map sizes! trellis.par.set( peelTheme) plot( spplot( thumbDf, pri, colorkey= list( space= left)), split= c( 1, 1, 3, 1), more= TRUE) plot( spplot( thumbDf, sec,

[R] Urgent help requested using survfit(individual=T):

2010-12-14 Thread Angel Russo
Hello: I would like to obtain probability of an event for one single patient as a function of time (from survfit.coxph) object, as I want to find what is the probability of an event say at 1 month and what is the probability of an event at 80 months and compare. So I tried the following but it

Re: [R] Multivariate binary response analysis

2010-12-14 Thread Emmanuel Charpentier
Dear Derek, dear list, A couple suggestions (and more) : 0) check that your problem can't be expressed in terms of what glmer() (lme4(a|b)? package(s)) can solve. I use this often, and am quite impressed with its abilities. 1) Why not modeling that directly in BUGS ? That might not be easy,

[R] Significance Help

2010-12-14 Thread Samaire Holden
I have a set of results where I have the eyesight power of both left and right eyes for each participant (e.g. 0.75, 0.5). Each participant then had to throw basketballs into a hoop and the number of successful throws was recorded. I would like to do two things: 1. Test whether the eyesight

Re: [R] Installing R-packages in Windows

2010-12-14 Thread Erik Lukac
Hi Mike, Hi Uwe, thanks for your reply. The main thing is that we have mixed OSs. On the one hand we have Linux, on the other WinXP. I need the same version of packages and R on both systems. Otherwise I cant explain my colleagues why error messages are reproduceable on only one system.

Re: [R] from table to matrix

2010-12-14 Thread JESSICA [via R]
Thank you guys I learnt a lot . But when I tried to run the library(ecodist) function, R says there is no package called ecodist. why? __ View message @ http://r.789695.n4.nabble.com/from-table-to-matrix-tp3087972p3088184.html

Re: [R] from table to matrix

2010-12-14 Thread JESSICA [via R]
Hi Jonathan,thanks a lot! Mine is windows operating system so I will try other ways . About your question, do you want to get a matrix like this: 0 1 2 3 ...1817393 5524385 0687 0 64 0 71 0 55 ...

Re: [R] Modifying values outside a function using apply.

2010-12-14 Thread Henrique Dallazuanna
Try this: l - sapply(c(4, 3, 2), q.1) aggregate(V3 ~ V1 + V2, as.data.frame(do.call(rbind, l)), mean) On Tue, Dec 14, 2010 at 9:19 PM, Worik R wor...@gmail.com wrote: I am sure this si a simple problem but the solution is evading me. I have a list of matrices all with the same number of

[R] [R-pkgs] googleVis 0.2.2 - Using the Google Visualisation API with R

2010-12-14 Thread Markus Gesmann
Hi all, Version 0.2.2 of the googVis package has been released on CRAN and will be available from your local CRAN mirror in due course. googleVis provides an interface between R and the Google Visualisation API. The functions of the package allow users to visualise data stored in R with the

[R] frestimate functionality

2010-12-14 Thread Jason Rupert
By any chance is there an R package that may contain functionality similar to the frestimate in Matlab/Simulink. Here is the URL for a description of the frestimate functionality: http://www.mathworks.com/help/toolbox/slcontrol/ug/frestimate.html Thank you again for any feedback.

[R] How to apitalize leading letters else of personal names?

2010-12-14 Thread RockO
Dear R world, Do you know about a function that would capitalize in the correct manner first and family names? I found in the cwhmisc only the CapLeading function, but it just does not do the job, taking care only to capitalize the first letter of a word. I am looking for a function that would

Re: [R] frestimate functionality

2010-12-14 Thread stephen sefick
Have you done a google search, looked on CRAN, searched the archives, or looked at the task views? I can't be of any help, but maybe one of those places could be. HTH, Stephen On Tue, Dec 14, 2010 at 7:57 PM, Jason Rupert jasonkrup...@yahoo.com wrote: By any chance is there an R package that

Re: [R] Significance Help

2010-12-14 Thread Michael Bedward
Hello Samaire, I don't know much about eyesight measurements (other than that my own would probably be 0.1, 0.2) but I'll attempt some suggestions... For objective (1) you will have to define what you mean by significantly different. If you had data on left/right values from a larger population

[R] selecting certain rows from data frame

2010-12-14 Thread Hrithik R
Hi, if I have a dataframe such that ID Time  Earn 1        1        10 1        2        50 1        3        68 2    1    40 2    2    78 24   88 3    1    50 3    2    60 3    3    98 4    1    33 4    2    48 44  

  1   2   >