[R] Underline only colnames in grid.table

2010-10-28 Thread robbert blonk
Dear all, I would like to underline only the colnames in a table as e.g. grid.draw(tableGrob(head(iris, 10), name="test")) I can imagine you should use grid.edit or so, bu I can't figure out how... Does anyone have a suggestion? Thanks Robbert windows xp R 2.10.1 -- View this message in co

Re: [R] Dickey Fuller Test

2010-10-28 Thread Dennis Murphy
Hi: Since the series is obviously nonstationary and periodic, it would seem that one should embrace a wider window over which to evaluate the DF test. I did the following: y <- ts(Y, frequency = 12) # looked like an annual series to me plot(stl(y, 'periodic')) # very informative!! adf.test(

Re: [R] Help: Maximum likelihood estimation

2010-10-28 Thread roach
http://r.789695.n4.nabble.com/file/n3018477/JEC.dta JEC.dta This is the data. http://r.789695.n4.nabble.com/file/n3018477/A_Study_of_Cartel_Stability_The_Joint_Executive_Committee.pdf A_Study_of_Cartel_Stability_The_Joint_Executive_Committee.pdf This is the original paper. The variable S is brea

Re: [R] wilcox.test; data type conversion?

2010-10-28 Thread Par Leijonhufvud
Steven McKinney [2010.10.29] wrote: > You can set up the data as > > > grade <- ordered(c("MVG", "VG", "VG", "G", "MVG", "G", "VG", "G", "VG"), > > levels = c("G", "VG", "MVG")) > wilcox.test(as.integer(grade) ~ sex, data = gradesbysex) Thanks, this solved my problems. I'll just explain the pr

Re: [R] wilcox.test; data type conversion?

2010-10-28 Thread Steven McKinney
You can set up the data as > grade <- ordered(c("MVG", "VG", "VG", "G", "MVG", "G", "VG", "G", "VG"), > levels = c("G", "VG", "MVG")) > grade [1] MVG VG VG G MVG G VG G VG Levels: G < VG < MVG > sex <- factor(c( "male", "male", "female", "male", "female", "male", > "female", "male", "m

Re: [R] R and Matlab

2010-10-28 Thread Henrik Bengtsson
Hi, thanks for reporting on a potential issue with writeMat() in R.matlab. However, I think you are blaming the wrong source here. There is basically nothing wrong with writeMat() and the MAT files written by it can indeed be read by Matlab. I think you are experiencing two different problems.

Re: [R] xyplot and panel.curve

2010-10-28 Thread Duncan Mackay
Hi Dennis Thank you very much - the result was what I was looking for I looked at the help guide and wrongly interpreted things - I thinking of the case of density plots where there is only an x value (its been a long week). I had hoped to avoid going down the way you had gone but ended up with

Re: [R] Returning highs and lows in R

2010-10-28 Thread Gabor Grothendieck
On Thu, Oct 28, 2010 at 7:59 PM, Gabor Grothendieck wrote: > On Thu, Oct 28, 2010 at 2:02 PM, Jason Kwok wrote: >> I was able to get what I wanted using the lag function to offset an addition >> period. >> >> lag(rollapply(xx,3,max),-2) or lag(rollapply(xx,3,max,align="right"),-1) >> > > Another

[R] Dickey Fuller Test

2010-10-28 Thread Cuckovic Paik
Dear Users, please help with the following DF test: = library(tseries) library(timeSeries) Y=c(3519,3803,4332,4251,4661,4811,4448,4451,4343,4067,4001,3934,3652,3768 ,4082,4101,4628,4898,4476,4728,4458,4004,4095,4056,3641,3966,4417,4367 ,4821,5190,4638,4904,4528,4383,4339,4327,3856,4072,4563,4

Re: [R] wilcox.test; data type conversion?

2010-10-28 Thread Dennis Murphy
Hi: Make grade an ordered factor: grade <- factor(grade, levels = c('G', 'VG', 'MVG')) as.numeric(as.character(grade)) will convert to numeric scores 1, 2 and 3, respectively, corresponding to the numerical codes of the ordered levels. HTH, Dennis On Thu, Oct 28, 2010 at 8:37 PM, Par Leijonhufvu

Re: [R] Please help me about Monte Carlo Permutation

2010-10-28 Thread Chitra
Łukasz Ręcławowicz, Thanks. I got this p-value. > test() [1] P-value: 0.00139 I still could not figure out how to plot 5000 permuted Qtot vs Itot. -- View this message in context: http://r.789695.n4.nabble.com/Please-help-me-about-Monte-Carlo-Permutation-tp3017131p3018399.html Sent from the R

[R] wilcox.test; data type conversion?

2010-10-28 Thread Par Leijonhufvud
I'm working on a quick tutorial for my students, and was planning on using Mann-Whitney U as one of the tests. I have the following (fake) data grade <- c("MVG", "VG", "VG", "G", "MVG", "G", "VG", "G", "VG") sex <- c( "male", "male", "female", "male", "female", "male", "female", "male", "ma

Re: [R] Alter character attribute

2010-10-28 Thread LCOG1
Changing the filed into date format then pulling out the month/year worked best. Thanks, i knew it was gonna be easy. Cheers -- View this message in context: http://r.789695.n4.nabble.com/Alter-character-attribute-tp3018202p3018255.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] xyplot and panel.curve

2010-10-28 Thread Dennis Murphy
Hi: There are a few things wrong, I believe; hopefully my suggested fix is what you're after... On Thu, Oct 28, 2010 at 3:35 PM, Duncan Mackay wrote: > Hi All > I have regression coefficients from an experiment and I want to plot them > in lattice using panel curve but I have run into error mes

Re: [R] transposing a column table

2010-10-28 Thread Joshua Wiley
Hi Penny, If I understand you correctly, you have a vector, and you want it to be a column in an Excel file with 8768 rows (one for each entry). Easy ways to transport data from R to Excel are with the write.csv function. For example: write.csv(x = data.frame(myclustfactor = 1:10), file = "yourf

Re: [R] transposing a column table

2010-10-28 Thread Penny Adversario
Dear R-user, I need help on how to transpose this column of clustering vector in R with 8768 entries derived from a PAM clustering output in a vertical  view to an excel file   Clustering vector:    [1] 1 1 2 2 1 2 1 2 1 1 2 2 1 2 2 2 2 1 1 1 1 2 2 1 2 2 1 2 2 2 2 2 2 2 2 1 2   [38] 2 1 1 2 2 2 2

[R] SARIMA simulation using time series history

2010-10-28 Thread Knut Erik Vedahl
Hi, I'm currently working with a SARIMA model from which I want to make simulations. As I understand, neither sarima.Sim nor the functions in the gsarima package use historic realizations of the time series to simulate future values. However, I want to use historic values as input and sim

Re: [R] Returning highs and lows in R

2010-10-28 Thread Gabor Grothendieck
On Thu, Oct 28, 2010 at 2:02 PM, Jason Kwok wrote: > I was able to get what I wanted using the lag function to offset an addition > period. > > lag(rollapply(xx,3,max),-2) or lag(rollapply(xx,3,max,align="right"),-1) > Another possibility is to apply the function over the last 4 points including

Re: [R] Determining a basal correct count

2010-10-28 Thread Phil Spector
David - I think changing apply(x,1,function(x)rle(x[which(x==1)[1]:length(x)])$lengths[1]) to apply(x,1,function(x)if(!any(x==1)) 0 else rle(x[which(x==1)[1]:length(x)])$lengths[1]) solves the problem. - Phil On Thu, 28 Oct 2010, David

Re: [R] Determining a basal correct count

2010-10-28 Thread David Herzberg
Thank you Phil - I'll give this a try. I do have some empty rows, so I'll have to deal with that eventually. Dave Sent via DROID X -Original message- From: Phil Spector To: David Herzberg Cc: "r-help@r-project.org" Sent: Thu, Oct 28, 2010 23:39:34 GMT+00:00 Subject: Re: [R] Determin

Re: [R] Determining a basal correct count

2010-10-28 Thread Phil Spector
David - I *think* apply(x,1,function(x)rle(x[which(x==1)[1]:length(x)])$lengths[1]) gives you what you want, but without a reproducible example it's hard to say. It will fail if there are no 1s in a given row. - Phil Spector

[R] Determining a basal correct count

2010-10-28 Thread David Herzberg
Here's another interesting problem: if you recall I have a data frame (LCvars1) that consists of about 1500 cases (rows) of data from kids who took a test of listening comprehension. The columns are their scores (1 = correct, 0 = incorrect, . = missing) on 140 test items. The items are numbered

Re: [R] Alter character attribute

2010-10-28 Thread Phil Spector
If you convert the dates to R date objects, I think things will be easier: rawdata2$period_end_date = as.Date(rawdata2$period_end_date,format='%m/%d/%Y') rawdata2$mon = as.numeric(format(rawdata2$period_end_date,'%m')) rawdata2$year = as.numeric(format(rawdata2$period_end_date,'%Y')) (I'm assu

Re: [R] Alter character attribute

2010-10-28 Thread jim holtman
I didn't see you test so, so here is the solution with your data: > RawData2..<-data.frame(ID=c(22,44),period_end_date=c("9/10/2007 0:00:00", + "2/2/2006 0:00:00")) > RawData2..$month <- sub("^([[:digit:]]+).*", "\\1", > RawData2..$period_end_date) > RawData2..$year <- sub(".*/([[:digit:]]+) .*",

Re: [R] Alter character attribute

2010-10-28 Thread jim holtman
try this: > x <- read.table(textConnection(" ID date time + 1 22 9/10/2007 0:00:00 + 2 44 2/2/2006 0:00:00"), header = TRUE) > closeAllConnections() > x ID datetime 1 22 9/10/2007 0:00:00 2 44 2/2/2006 0:00:00 > x$month <- sub("^([[:digit:]]+).*", "\\1", x$date) > x$year <- sub(".*?

[R] Alter character attribute

2010-10-28 Thread LCOG1
Hi everyone I have some records that include a date attribute for the date and time but i need to separate the data and analyze it separately in GIS by Month and Year, so i need to pull these attributes out and create their own attribute field. So the input: RawData2.. returns ID period_e

Re: [R] coxph linear.predictors

2010-10-28 Thread Terry Therneau
Gentlemen, I read R-news in batch mode so I'm often a day behind. Let me try to answer some of the questions. 1. X*beta != linear.predictor. I'm sorry if the documentation isn't all it could be. Between the book, tech report, and help I've written about 400 pages, but this particular topic

[R] xyplot and panel.curve

2010-10-28 Thread Duncan Mackay
Hi All I have regression coefficients from an experiment and I want to plot them in lattice using panel curve but I have run into error messages. I want an 3 panel conditioned plot of 2 curves of Treatment 2 in each panel conditioned by Treatment1, the example curve expression is x+value*x^2 A

Re: [R] clustering on scaled dataset or not?

2010-10-28 Thread Claudia Beleites
John, Hi, just a general question: when we do hierarchical clustering, should we compute the dissimilarity matrix based on scaled dataset or non-scaled dataset? daisy() in cluster package allow standardizing the variables before calculating dissimilarity matrix; I'd say that should depend

[R] clustering on scaled dataset or not?

2010-10-28 Thread array chip
Hi, just a general question: when we do hierarchical clustering, should we compute the dissimilarity matrix based on scaled dataset or non-scaled dataset? daisy() in cluster package allow standardizing the variables before calculating dissimilarity matrix; but dist() doesn't have that option at

Re: [R] get the rows so that there is no redundant element in a certain column

2010-10-28 Thread Joshua Wiley
On Thu, Oct 28, 2010 at 11:29 AM, boshao zhang wrote: > Dear everyone in the Mailing list: > > It is easy to get the unique elements in a column. But I would like to get > rid of those rows that the elements of this column are redundant. Or > sometimes, to have a look at the rows that the elemen

Re: [R] get the rows so that there is no redundant element in a certain column

2010-10-28 Thread Jorge Ivan Velez
Hi Boshao, Check ?duplicated. HTH, Jorge On Thu, Oct 28, 2010 at 2:29 PM, boshao zhang <> wrote: > Dear everyone in the Mailing list: > > It is easy to get the unique elements in a column. But I would like to get > rid of those rows that the elements of this column are redundant. Or > sometime

Re: [R] A competition to create a recommendation engine for R packages

2010-10-28 Thread Kjetil Halvorsen
Follow-up. Started to look at this. First step is to make a graph showing dependencies between R packages(CRAN, Bioconductor,Omegahat). As a curiosum, this graph has diameter 20: > require(igraph) > diameter(CRANgraph) [1] 20 > dia <- get.diameter(CRANgraph) > dia [1] 221 1866 2344 2192 330 161

Re: [R] get the rows so that there is no redundant element in a certain column

2010-10-28 Thread Dennis Murphy
Hi: Is something like this what you were after? x <- data.frame(A = sample(LETTERS[1:5], 1000, replace = TRUE), B = rpois(1000, 50), C = rnorm(1000)) x[unique(x$A), ] A B C 4 E 49 1.18424176 5 B 51 0.51911271 1 D 71 0.06266016 2 E 61 0.59862609 3 A 45

Re: [R] How to perform arithmetic across rows

2010-10-28 Thread Joshua Wiley
Hi Nick, Take a look at ?cbind and ?"[" Here is some (untested) code that is how I might go about it. It takes advantage of the fact that a single value will be recycled to equal the necessary length. Then I just assign over the NA in row 24. myframe <- cbind(myframe, New = NA) myframe[24, "Ne

[R] get the rows so that there is no redundant element in a certain column

2010-10-28 Thread boshao zhang
Dear everyone in the Mailing list:   It is easy to get the unique elements in a column. But I would like to get rid of those rows that the elements of this column are redundant. Or sometimes, to have a look at the rows that the elements of this column are redundant is also important. I guess it

[R] How to perform arithmetic across rows

2010-10-28 Thread Nick Ackerman
Hi All, I have a data frame (myframe) with variables (columns) A,B,C and 100 records (rows) for each. Column A is numeric. I would like to append a column to myframe that subtracts the value in row 24 of A from row 1 of A. In this procedure the first 23 rows of the new column will necessarily be

Re: [R] wait for graph to finish plotting

2010-10-28 Thread Joshua Wiley
Hi aleblanc, Does something like this work? See inline comments for details. ## If you want them in separate files, you might use onefile = FALSE ## I also often find I need to adjust width and height ## which could be done with height = 9, width = 9, for example pdf(file = "~/Dropbox/phd/resul

Re: [R] draw path diagram using dot

2010-10-28 Thread John Fox
Dear eshi, That depends on your system. On my Windows Vista system, dot.exe lives in C:\Graphviz2.20\bin, so I placed this directory on my path, via the System Properties -> Advanced tab -> Environment Variables dialog, editing either the user variables or system variables. I hope this helps, Jo

Re: [R] online course: SVM in R with Lutz Hamel at statistics.com

2010-10-28 Thread Changbin Du
Sorry, I was a little numb at that time. On Thu, Oct 28, 2010 at 10:45 AM, David Winsemius wrote: > In a sense you deserve what you have asked for. You have asked thousands of > people to send you a copy when you could have instead searched the archives > yourself and gotten a much quicker ans

[R] draw path diagram using dot

2010-10-28 Thread eshi
I did a simple path analysis and tried to draw the path diagram. I used 'path.diagram' in sem package and produced a graph using dotty in graphviz; however, I don't know how to produce a graph from R directly. In the sem package manual John mentioned that "to obtain graphics output directly, the d

Re: [R] adding copies of rows toa data frame based upon start and end dates

2010-10-28 Thread Joshua Wiley
Dear Grant, This is far from the prettiest solution, but: ## Your sample data tmp <- structure(list(ID = 1001:1007, GRID = c(1L, 1L, 1L, 1L, 1L, 1L, 1L), FOOD = c(0L, 0L, 0L, 0L, 0L, 0L, 0L), WB1 = c(319L, 659L, 325L, 322L, 654L, 301L, 349L), WB2 = c(999L, 671L, 662L, 655L, 899L, 651L, 669L), S =

Re: [R] Clustering

2010-10-28 Thread David Winsemius
On Oct 28, 2010, at 8:00 AM, dpender wrote: I am looking to use R in order to determine the number of extreme events for a high frequency (20 minutes) dataset of wave heights that spans 25 years (657,432) data points. I require the number, spacing and duration of the extreme events as an

Re: [R] How do I install (download) a package with my own package?

2010-10-28 Thread Uwe Ligges
See Writing R Extensions: You can declare dependencies and install.packages(...) and its argument "dependencies" can handle automatical installation of dependencies. Uwe Ligges On 28.10.2010 21:13, Ian Schiller wrote: I want to create my own package in which some of my functions depend on f

[R] How do I install (download) a package with my own package?

2010-10-28 Thread Ian Schiller
I want to create my own package in which some of my functions depend on functions already existing in another package that is not part of the default library (i.e. when you install R for the first time, you need to download that package to access the functions.) Is there a way to bundle this ex

Re: [R] Generate random percentages and placing vectors

2010-10-28 Thread Henrique Dallazuanna
Try this: out <- rep(0, 25) out[embed(seq(out), 3)[sample(1:(length(out) - 2), 2),]] <- rev(rbind(v1, v2)) On Thu, Oct 28, 2010 at 3:59 PM, Aaron Lee wrote: > Thanks for the help! > > However, for the code in #2, it seems to just randomly split up the > vectors. > I would still like to keep the

Re: [R] scatterplot3d; scaling point symbols to depth of graph

2010-10-28 Thread Uwe Ligges
It's a bug (since I did not expect people to change the size of the symbols vectorized). Will provide a fix tomorrow. Uwe On 28.10.2010 11:28, John Coulthard wrote: Hi I'm trying to scale the point symbols on a 3d plot so that the ones at the front are larger than the ones at the back.

Re: [R] Clustering

2010-10-28 Thread Albyn Jones
I have worked with seismic data measured at 100hz, and had no trouble locating events in "long" records (several times the size of your dataset). 20 minutes is high frequency? what kind of waves are these? what is the wavelength? some details would help. albyn On Thu, Oct 28, 2010 at 05:00:10A

Re: [R] help with help()

2010-10-28 Thread Erik Iverson
claudia tebaldi wrote: Hi all Just this morning I upgraded to R 2.12.0 (for Mac OS X 10.6.4). All went well until I needed to run a help() or help.search() in my session, which I'm running within Emacs (ESS 5.3.7). That's very old version of ESS, I have no problems with 2.12.0 with ESS 5.11

Re: [R] help with help()

2010-10-28 Thread Joshua Wiley
Hi, Is it possible to upgrade your version of Emacs and ESS (ESS is up to 5.11)? The official website for ESS is: http://ess.r-project.org/ Vincent Goulet also maintains a nice distribution of the latest Emacs bundled with AUCTeX and ESS for Mac at: http://vgoulet.act.ulaval.ca/en/ressources/ema

Re: [R] help with help()

2010-10-28 Thread Marc Schwartz
On Oct 28, 2010, at 1:32 PM, Marc Schwartz wrote: > On Oct 28, 2010, at 1:20 PM, claudia tebaldi wrote: > >> Hi all >> >> Just this morning I upgraded to R 2.12.0 (for Mac OS X 10.6.4). >> All went well until I needed to run a help() or help.search() in my session, >> which I'm running within

Re: [R] runtime on ising model

2010-10-28 Thread Mike Marchywka
> Date: Thu, 28 Oct 2010 09:58:40 -0700 > From: wdun...@tibco.com > To: dwinsem...@comcast.net; mike...@gmail.com > CC: r-help@r-project.org > Subject: Re: [R] runtime on ising model > > > -Original Message- > > From: r-help-boun...@r-project.

Re: [R] help with help()

2010-10-28 Thread Marc Schwartz
On Oct 28, 2010, at 1:20 PM, claudia tebaldi wrote: > Hi all > > Just this morning I upgraded to R 2.12.0 (for Mac OS X 10.6.4). > All went well until I needed to run a help() or help.search() in my session, > which I'm running within Emacs (ESS 5.3.7). > Say I need help with the command 'densit

[R] help with help()

2010-10-28 Thread claudia tebaldi
Hi all Just this morning I upgraded to R 2.12.0 (for Mac OS X 10.6.4). All went well until I needed to run a help() or help.search() in my session, which I'm running within Emacs (ESS 5.3.7). Say I need help with the command 'density'. When I type help(density) or ?density the ESS help buffer o

[R] RWeka, "java.lang.NullPointerException"

2010-10-28 Thread Markus Loecher
Dear all, I have trained a J48 classifier in RWeka but when I try to predict on new data I get the following exceptions: fit <- J48(...) yNew <- predict(fit, x, type="probability"); Error in .jcall("RWekaInterfaces", "[D", "distributionForInstances", .jcast(classifier, : java.lang.NullPointerE

Re: [R] Returning highs and lows in R

2010-10-28 Thread Jason Kwok
I was able to get what I wanted using the lag function to offset an addition period. lag(rollapply(xx,3,max),-2) or lag(rollapply(xx,3,max,align="right"),-1) Thanks. Jason On Thu, Oct 28, 2010 at 1:49 PM, Jason Kwok wrote: > I figured out how to offset my observations by 1 period by using th

Re: [R] Generate random percentages and placing vectors

2010-10-28 Thread Aaron Lee
Thanks for the help! However, for the code in #2, it seems to just randomly split up the vectors. I would still like to keep the integrity of each vector. For example: if v1 = (1,2,3) v2 = (4,5,6) output = (0,0,0,1,2,3,0,0,0,0,4,5,6,0,0,0,0,0,0,0,0,0,0,0,0) - which has a specified length of

Re: [R] wait for graph to finish plotting

2010-10-28 Thread David Winsemius
On Oct 28, 2010, at 1:27 PM, wrote: pdf(file = "~/Dropbox/phd/results/graphs/TEST%03d.pdf") for (dataset in c("breastCancer","pima","heartDisease","crx","ionosphere","votes")) { p <- eval(parse(text=paste(dataset,"Probs",sep=""))) m <- melt(t(p)) title <- titles[[dataset]] filename=pas

[R] How to enable Arial font for postcript/pdf figure on Windows?

2010-10-28 Thread Agnès Paquet
Hi, I need to generate some figure using the Arial font as a requirement for PLoS. Following their guidelines, I have converted the windows font files arial.tff files to .afm using tff2afm (exec file from MikTeX), but when I try to generate a postcript file, the postcript device does not recognize

Re: [R] Please help me about Monte Carlo Permutation

2010-10-28 Thread Łukasz Ręcławowicz
I'm not sure is this correct, but maybe you are looking for something like this: test<-function(){ permuted.Qtot<-permn(data$Qtot) n<-length(permuted.Qtot) correlation<-rep(NA,n) for(i in 1:n){ correlation[i]<-cor(data$Itot,permuted.Qtot[[i]])} p<-sum(correlation>=cor(data$Qtot,data$Itot))/n print

Re: [R] Returning highs and lows in R

2010-10-28 Thread Jason Kwok
I figured out how to offset my observations by 1 period by using the rollapply(xx,3,max,align="right"), which would calculate the mean for (current observation, obs - 1 and obs -2 ). How would I further offset by 1 more period? Thanks, Jason On Thu, Oct 28, 2010 at 1:29 PM, Jason Kwok wrote:

Re: [R] wait for graph to finish plotting

2010-10-28 Thread news
pdf(file = "~/Dropbox/phd/results/graphs/TEST%03d.pdf") for (dataset in c("breastCancer","pima","heartDisease","crx","ionosphere","votes")) { p <- eval(parse(text=paste(dataset,"Probs",sep=""))) m <- melt(t(p)) title <- titles[[dataset]] filename=paste("~/Dropbox/phd/results/graphs/",dat

Re: [R] runtime on ising model

2010-10-28 Thread David Winsemius
On Oct 28, 2010, at 12:20 PM, David Winsemius wrote: On Oct 28, 2010, at 11:52 AM, Michael D wrote: Mike, I'm not sure what you mean about removing foo but I think the method is sound in diagnosing a program issue and the results speak for themselves. I did invert my if statement at the

Re: [R] adding environment variables

2010-10-28 Thread Henrique Dallazuanna
Take a look in ?Sys.setenv On Thu, Oct 28, 2010 at 12:21 PM, Robert M. Flight wrote: > Hi All, > > I am developing a package that requires information about the location > of a set of files that will be used often in the calculations. In my > current version, I define the location in the main f

Re: [R] Returning highs and lows in R

2010-10-28 Thread Jason Kwok
Thanks for the help. I'm looking to calculate rolling max and means for the last 3 observations in my data including AND not including the current observation. I'm not sure how to offset the observations used. For the 3 period max, I would like to return the max value over the last 3 observation

[R] GBM and Extracting the Model

2010-10-28 Thread Jeff
Hi all, I have found a couple posts on this topic but could not (yet) find an answer. Is there a way to extract the model (trees and weights) from the GBM package in order to program the prediction in a non R environment (SQL database)? The constraint of not using R is based on production requirem

[R] svm online course in R

2010-10-28 Thread Changbin Du
Hi, Dear Community, Several days ago, I received one email about the online svm course in R, I try to find it. Can someone forward the information to me. Thanks! -- Sincerely, Changbin -- [[alternative HTML version deleted]] __ R-help@r-pro

Re: [R] Control of axis limits in multiple panel lattice plots

2010-10-28 Thread Deepayan Sarkar
On Wed, Oct 27, 2010 at 6:45 AM, Peter Davenport wrote: > I've found the solution to this in an old post of Deepayan's: > > lattice.options(axis.padding = list(numeric=0)) Or xyplot(a~b|c,data=test.df, scales = list(axs = "i")) -Deepayan > > Best, > Peter > > On 27 October 2010 09:28, Peter Da

[R] R shp(ESRI) point patterns and marks

2010-10-28 Thread Gary Nobles
I have a point dataset (ESRI shp file) each point has an associated weight (grams) These are the weights of animal bones recovered from an archaeological excavation I am trying to import the shp file and then do a density plot of the weight data, so: #Import shp file library(spatstat) library(map

Re: [R] runtime on ising model

2010-10-28 Thread William Dunlap
> -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of David Winsemius > Sent: Thursday, October 28, 2010 9:20 AM > To: Michael D > Cc: r-help@r-project.org > Subject: Re: [R] runtime on ising model > > > On Oct 28, 2010, at 11:52 A

Re: [R] RGTK2 - Entry Point not found

2010-10-28 Thread Michael Lawrence
2010/10/28 W Eryk Wolski > Failed to load RGtk2 dynamic library, attempting to install it. > trying URL ' > http://downloads.sourceforge.net/gladewin32/gtk-2.12.9-win32-2.exe' > Content type 'application/x-msdownload' length 7378984 bytes (7.0 Mb) > > I run the complete setup of GTK . > Hence, I

Re: [R] lattice key subtitle

2010-10-28 Thread Deepayan Sarkar
On Tue, Oct 26, 2010 at 2:49 AM, Alexandru Dumitrescu wrote: > Hello everybody, > Is there a way to add a subtitle to a lattice key? None specifically for that purpose, but latticeExtra does have a mergedTrellisLegendGrob() function that may help: mylegend <- mergedTrellisLegendGrob(list(fun = d

[R] ggplot2: facet_grid with only one level does not display the graph with the facet_grid level in title

2010-10-28 Thread Matthew Pettis
Hi All, Here is the code that I'll be referring to: p <- ggplot(wastran.data, aes(PER_KEY, EVENTS)) (p <- p + facet_grid( pool.short ~ .) + stat_summary(aes(y=EVENTS), fun.y = sum, geom="line") + opts(axis.text.x = theme_text(angle = 90, hjust=1), title="Events (15min.) vs. Time: Face

Re: [R] overloading the generic primitive functions "+" and "["

2010-10-28 Thread Hadley Wickham
> Note how S3 methods are dispatched only by reference to the first > argument (on the left of the operator). I think S4 beats this by > having signatures that can dispatch depending on both arguments. That's somewhat of a simplification for primitive binary operators. R actually looks up the meth

Re: [R] Returning highs and lows in R

2010-10-28 Thread Bert Gunter
Jason: Please read AND FOLLOW the posting guide on how to ask clear questions. Here, you need to more carefully define what you mean by "the last 3 days." Do you mean:(a) the last 3 values in the series (including or excluding the present one?) or the last 3 calendar days -- e.g. for 10-05, only 1

[R] adding copies of rows toa data frame based upon start and end dates

2010-10-28 Thread Grant Gillis
Hello All and thanks in advance for any advice. I have a data frame with rows corresponding radio-collared animals (see sample data below). There is a start date (DATESTART), and end date (DATEEND), and the number of days on air (DAYSONAIR). What I would like to do is add a column called DATE to

Re: [R] Returning highs and lows in R

2010-10-28 Thread Peter Ehlers
On 2010-10-28 09:27, Jason Kwok wrote: I'm having trouble returning a rolling n period highest value for a data set. For each day I want to calculate the highest value over the last 3 days. I am using the following packages: zoo, xts, quantmod and TTR. Isn't that exactly what rollmax() does?

Re: [R] Please help me about Monte Carlo Permutation

2010-10-28 Thread Chitra
Dear Kjetil, Thanks a lot for your help. I could not get histogram when I ask by R. It simply gave me blank plot between frequency and test. I want to plot sample (y) verses xl. Can you please tell me are both variables were permuted or only x? Thanking your help, Chitra -- View this message in c

Re: [R] Returning highs and lows in R

2010-10-28 Thread Jorge Ivan Velez
Hi Jason, Please consider the following example: > require(zoo) > z2 <- zoo(rnorm(6)) > z2 1 2 3 4 5 6 -0.53305704 -1.09374867 1.55171109 -0.05830751 -0.25987647 -0.02009973 > rollapply(z2, 3, max, by = 1) 2 3

Re: [R] removing margin space between columns in lattice plots

2010-10-28 Thread Deepayan Sarkar
On Sat, Oct 23, 2010 at 9:25 AM, Stephen T. wrote: > > Hi list, > > From the xyplot() documentation I'm guessing this may not be > possible, but is there a way to specify a scale definition something > between relation="free" and relation="same" such that the scales are > fixed across rows and col

[R] Returning highs and lows in R

2010-10-28 Thread Jason Kwok
I'm having trouble returning a rolling n period highest value for a data set. For each day I want to calculate the highest value over the last 3 days. I am using the following packages: zoo, xts, quantmod and TTR. Thanks, Jason GLD.Close 2010-10-01128.91 2010-10-04128.46 2010

Re: [R] runtime on ising model

2010-10-28 Thread David Winsemius
On Oct 28, 2010, at 11:52 AM, Michael D wrote: Mike, I'm not sure what you mean about removing foo but I think the method is sound in diagnosing a program issue and the results speak for themselves. I did invert my if statement at the suggestion of a CS professor (who also suggested reco

Re: [R] RGTK2 - Entry Point not found

2010-10-28 Thread Łukasz Ręcławowicz
W dniu 28 pa¼dziernika 2010 16:09 u¿ytkownik W Eryk Wolski < wewol...@gmail.com> napisa³: > > Any other ideas? > Restart R and then try load library :) -- Mi³ego dnia [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] runtime on ising model

2010-10-28 Thread Michael D
Mike, I'm not sure what you mean about removing foo but I think the method is sound in diagnosing a program issue and the results speak for themselves. I did invert my if statement at the suggestion of a CS professor (who also suggested recoding in C, but I'm in an applied math program and haven't

[R] Rsolnp examples

2010-10-28 Thread Jan Theodore Galkowski
I'm interested in the Rsolnp package. For their primary function "solnp", one example is given, and there is a reference to "unit tests". Anyone know where these can be found? Also, Rsolnp is used in a few other packages (e.g., depmixS4), but I cannot seem to find source illustrating its call seq

Re: [R] Merging nested lists

2010-10-28 Thread Charles C. Berry
On Wed, 27 Oct 2010, Charles C. Berry wrote: On Wed, 27 Oct 2010, Alex P. wrote: Hello All, I have multiple "list of lists" in the form of Mylist1[[N]][[K]]$Name_i, with N=1..6, K=1..3, and i=1..7. Each Name_i is a matrix. I have 30 of these objects Mylist1, Mylist2, ... I would like

Re: [R] Key combination that removes all R objects

2010-10-28 Thread Viechtbauer Wolfgang (STAT)
I am not aware of the existance of a shortcut that would do what you describe. On Windows, one could hit Ctrl-M, followed by R, but then one gets a prompt, asking for confirmation to remove all objects, but this can't be what you are referring to. Are you perhaps using Tinn-R and (accidentally)

Re: [R] R and Matlab

2010-10-28 Thread Claudia Beleites
On 10/28/2010 03:16 PM, Thomas Levine wrote: Is there a particular reason you can't use csv? (Not sure whether I'm meant - as I also suggested csv to Santosh) But: - It used to work, so there may be code existing that is broken now (e.g. I do have such code, but at least for the moment it does

Re: [R] coxph linear.predictors

2010-10-28 Thread Bond, Stephen
To close the issue: > S.ave <- survfit(fit) # this is average survival > S.1 <- (S.ave$surv)^exp(fit$linear.predictors[1]) # get subject 1 > S.1 [1] 0.848450223861993 0.696973203043377 0.530604282995790 0.391136296063732 0.228370373409774 0.132991279576665 0.071742127376216 [8] 0.03098867145792

Re: [R] Please help me about Monte Carlo Permutation

2010-10-28 Thread Kjetil Halvorsen
This is one way. I read your two columns of data into two variables, x and y. Then: test <- replicate(5000, cor(x, sample(y))) > hist(test) Kjetil On Thu, Oct 28, 2010 at 9:49 AM, Chitra wrote: > >> Dear R experts, >>I am sorry for my inability. >>I have the following dataset: > >  > Qtot Ito

[R] adding environment variables

2010-10-28 Thread Robert M. Flight
Hi All, I am developing a package that requires information about the location of a set of files that will be used often in the calculations. In my current version, I define the location in the main file that calls all the subfunctions. This works fine when you are installing from source, but will

[R] Heatmap construction problems

2010-10-28 Thread Struchtemeyer, Chris
I am very new to R and don't have any computer program experience whatsoever. I am trying to generate a heatmap of the following data: Phylum,AI,AJT,BY,GA,Grt,Sm Acidobacteria,0.5,0.7,2.7,0.1,2.6,1.0 Actinobacteria,33.7,65.1,9.7,2.0,3.9,2.1 Bacteroidetes,9.7,5.6,0.7,13.2,41.1,21.6 CC

Re: [R] bugs when using R-2.12.0 Please HELP!

2010-10-28 Thread David Winsemius
On Oct 28, 2010, at 10:01 AM, Hao Wu wrote: Hi, R-help group, I kinda meeting a question when using R-2.12.0(Previous version is 2.10.0): When I typed "library("Biobase")", everything is alright! But when I type "library("genefilter")", it doesn't work! And echo this: Error in library.dynam

[R] bugs when using R-2.12.0 Please HELP!

2010-10-28 Thread Hao Wu
Hi, R-help group, I kinda meeting a question when using R-2.12.0(Previous version is 2.10.0): When I typed "library("Biobase")", everything is alright! But when I type "library("genefilter")", it doesn't work! And echo this: Error in library.dynam(lib, package, package.lib) : DLL 'R

Re: [R] RGTK2 - Entry Point not found

2010-10-28 Thread W Eryk Wolski
Failed to load RGtk2 dynamic library, attempting to install it. trying URL 'http://downloads.sourceforge.net/gladewin32/gtk-2.12.9-win32-2.exe' Content type 'application/x-msdownload' length 7378984 bytes (7.0 Mb) I run the complete setup of GTK . Hence, I assume Version 2.12.9 is installed on my

[R] Key combination that removes all R objects

2010-10-28 Thread claire-c.jones
Dear readers, There is a combination of keys that I have (on several occasions now) typed by accident into R (2.10.0) which removes all the objects in the environment, and clears the console, as though I had typed rm(list=ls()). Unfortunately I don't know what the combination of keys are, so I a

Re: [R] overloading the generic primitive functions "+" and "["

2010-10-28 Thread Barry Rowlingson
On Thu, Oct 28, 2010 at 12:14 PM, Christofer Bogaso wrote: > Dear Barry, this is really interesting. However I could not understand > this line: > > Ops.ss=function(e1,e2){paste(e1,e2)} > > Where you have told R to behave "+" function differently when it faces > "ss" class? > What should be the id

Re: [R] overloading the generic primitive functions "+" and "["

2010-10-28 Thread Barry Rowlingson
On Thu, Oct 28, 2010 at 2:12 PM, Martin Morgan wrote: > Not so hard, eh? Though then like your S3 implementation this makes all > 'Ops' (see ?Ops) Except you have to re-run the set* things every R session: > setClass("SS", "character") > setMethod(Ops, c("SS", "SS"), function(e1, e2) paste(e

Re: [R] R and Matlab

2010-10-28 Thread Thomas Levine
Is there a particular reason you can't use csv? write.csv() in R It seems that you can read csv in Matlab with this http://www.mathworks.com/help/techdoc/ref/importdata.html Tom 2010/10/28 Claudia Beleites : >> I am looking for ways to use R and Matlab. Doing the data transformations >> in >> R

Re: [R] RGTK2 - Entry Point not found

2010-10-28 Thread Łukasz Ręcławowicz
"The stable version of RGtk2 requires GTK version 2.8.0 or higher (and its dependencies)." -- Mi³ego dnia [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

  1   2   >