### Re: [R] sizing and saving graphics in R

Why not plot directly to a bitmapped format, using bmp() or png()? That way you can create a large 'display region' when you open the device. BTW, I guess you are on Windows but you did not say so: bmp() only exists on Windows. On Wed, 30 May 2007, Felicity Jones wrote: Dear R wizards, I

### Re: [R] how to preserve trained model in LDA?

On Wed, 30 May 2007, Feng Qiu wrote: Hi all: I'm developing an application in which I use standard data to train the model in LDA and use the trained model to predict on test data. I can't train the model every time when I do prediction. So I need to save the trained model

### Re: [R] Generating Data using Formulas

On Wed, 30 May 2007, Charles C. Berry wrote: Christian, The formula language is not suited to such recursive useage AFAICS. But filter() is. In this case the result is an AR(1) process, so arima.sim() could be used (and internally that uses filter). I know this is an exercise, but using

### [R] Reference for npconmode (in the np package)?

The np package contains a function called npconmode which performs 'kernel modal regression'. Does anyone know of a reference that explains this? The R documentation cites Li and Racine's book, but I couldn't find any reference to kernel modal regression in it. I gather that this is the

### Re: [R] lattice: aligning independent graphs

On Thu, 31 May 2007 00:26:00 -0500, Sebastian P. Luque [EMAIL PROTECTED] wrote: [...] which gives wrong width and placement. How can this be modified so it places the labels close to the axis annotation, centered on each panel? Thanks in advance. Ok, this is it I think:

### Re: [R] opinions please: text editors and reporting/Sweave?

Jared == Jared O'Connell [EMAIL PROTECTED] on Thu, 31 May 2007 11:28:11 +0800 writes: Jared Winshell (http://www.winshell.de/) is another (free) option if you want a Jared Windows editor with good MikTEX integration. Looks like it. Note however that the above free is only as in

### [R] Choosing a column for analysis in a function

Hello all, I'm having a problem concerning choosing columns from a dataset in a function. I'm writing a function for data input etc., which first reads the data, and then does several data manipulation tasks. The function can be then used, with just giving the path of the .txt file where the

### [R] Many warnings in the newest R ...

Hello! I am using R 2.5.0 under Ubuntu 6.06, and I am not an expert. Recently, I think from the latest update some warning messages started to appear, when I use my old data-file and R-histories (hence, everything was done before and worked perfectly well). It seems to me that those are related to

### Re: [R] opinions please: text editors and reporting/Sweave?

Den To, 2007-05-31, 09:01 skrev Martin Maechler: Jared == Jared O'Connell [EMAIL PROTECTED] on Thu, 31 May 2007 11:28:11 +0800 writes: Jared Winshell (http://www.winshell.de/) is another (free) option if you want a Jared Windows editor with good MikTEX integration. Looks like

### [R] [R-pkgs] adehabitat version 1.6

Dear all, I have just uploaded to CRAN the version 1.6 of the package 'adehabitat'. Significant changes are listed below: * The package has been reorganized into four parts (see ?adehabitat-package for a description): (i) management of raster maps, (ii) habitat selection / ecological niche

### Re: [R] opinions please: text editors and reporting/Sweave?

On Thu, 31 May 2007, Henric Nilsson wrote: Den To, 2007-05-31, 09:01 skrev Martin Maechler: Jared == Jared O'Connell [EMAIL PROTECTED] on Thu, 31 May 2007 11:28:11 +0800 writes: Jared Winshell (http://www.winshell.de/) is another (free) option if you want a Jared Windows

### Re: [R] sizing and saving graphics in R

There is also the functions pdf(), jpeg(), bmp() and png() -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Murray Pung Sent: 31 May 2007 01:22 To: Felicity Jones Cc: r-help@stat.math.ethz.ch Subject: Re: [R] sizing and saving graphics in R I use the

### [R] predict.nls - gives error but only on some nls objects

Dear list, I have encountered a problem with predict.nls (Windows XP, R.2.5.0), but I am not sure if it is a bug... On the nls man page, an example is: DNase1 - subset(DNase, Run == 1) fm2DNase1 - nls(density ~ 1/(1 + exp((xmid - log(conc))/scal)), data = DNase1,

### [R] A matrix with mixed character and numerical columns

Is it possible to have one? I have a data.frame with two character columns and 6 numerical columns. I converted to a matrix as I needed to use the col() and row() functions. However, if I convert the data.frame to a matrix, using as.matrix, the numerical columns get converted to characters, and

### [R] Accessing plots in Trellis graphics

Hi, I used xyplot to create conditional scatterplots. My layout is 5x3 plots, but my data contains only 14 subgroups. So I would like to use the empty plot to display additional information about the data. How can I access the plot? Thanks in advance Sigbert --- Here my call:

### [R] Where is CRAN mirror address stored?

When I update.packages(), R shows the dialog window, listing CRAN mirrors and asks to choose the CRAN mirror to use in this session. Then, R uses this address and never asks again until quit. Is there any way to make R ask for the CRAN mirror again, except restarting it? I am just trying to

### Re: [R] Where is CRAN mirror address stored?

chooseCRANmirror() -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Vladimir Eremeev Sent: 31 May 2007 12:14 To: r-help@stat.math.ethz.ch Subject: [R] Where is CRAN mirror address stored? When I update.packages(), R shows the dialog window, listing CRAN

### Re: [R] Accessing plots in Trellis graphics

I used similar empty space to place the legend, by specifying the placement coordinates to the key argument of xyplot. This was rather long time ago, and I had to explicitly form the list, used as the key argument for this function. Lattice has evolved since that, some automation has appeared.

### Re: [R] A matrix with mixed character and numerical columns

Hi Michael, I dont think it is possible. Please see first the definition of a dataframe and matrix - Original Message From: michael watson (IAH-C) [EMAIL PROTECTED] To: r-help@stat.math.ethz.ch Sent: Thursday, May 31, 2007 4:18:11 PM Subject: [R] A matrix with mixed character and

### [R] Odp: A matrix with mixed character and numerical columns

Hi [EMAIL PROTECTED] napsal dne 31.05.2007 12:48:11: Is it possible to have one? I have a data.frame with two character columns and 6 numerical columns. I converted to a matrix as I needed to use the col() and row() functions. However, if I convert the data.frame to a matrix, using

### Re: [R] determining a parent function name

Does tail(capture.output(traceback()),n=1) do what you want? that is error - function(...) { msg - paste(..., sep = ) if(!length(msg)) msg - if(require(tcltk, quiet = TRUE)) { tt - tktoplevel() tkwm.title(tt, Error) tkmsg - tktext(tt, bg = white)

### Re: [R] installing problems

Would like to share that I am having the exact same problem running on Ubuntu 7.04 trying to install the R-2.5.0.tar.gz file After trying './configure' I also get the same error message: configure: error: --with-readline=yes (default) and headers/libs are not available Hope some one can help us

### Re: [R] determining a parent function name

Vladimir Eremeev wrote: Does tail(capture.output(traceback()),n=1) do what you want? that is Hmmm... Seems, no... Having the earlier error() definition and bar-function() error(asdasdf) ft-function() bar() ft() I get in the tcl/tk window: Error in bar(): asdasdf bar() I

### Re: [R] installing problems

INSTALL says The main source of information on installation is the `R Installation and Administration Manual', an HTML copy of which is available as file `doc/html/R-admin.html'. Please read that before installing R. But if you are impatient, read on but please refer to the manual

### Re: [R] Estimate Fisher Information by Hessian from OPTIM

ChenYen wrote: Dear All, I am trying to find MLE by using OPTIM function. Difficult in differentiating some parameter in my objective function, I would like to use the returned hessian matrix to yield an estimate of Fisher's Information matrix. My question: Since the hessian is calculated

### Re: [R] predict.nls - gives error but only on some nls objects

Why do you think feeding a model fit (fm2DNase1) is suitable 'newdata'?. From the help page newdata: A named list or data frame in which to look for variables with which to predict. If 'newdata' is missing the fitted values at the original data points are returned. It is

### [R] Venn diagram

Hello, I am a total beginner with “R” and found a package “venn” to create a venn diagram. The problem is, I cannot create the vectors required for the diagram. The manual say: R venn(accession, libname, main = All samples) where accession was a vector containing the codes identifying the

### Re: [R] Partially reading a file (particularly)

The responses are much appreciated, thanks. findstr works and saves a lot of time. I didn't however have much success with that exact code persay; I get an error message that I don't understand, as follows: c1 - read.fwf(pipe(findstr /b 5 my.file), ...) Error in readLines(con, n, ok, warn,

### Re: [R] A matrix with mixed character and numerical columns

What I am trying to do is create an x-y plot from the numerical values, and the output of row() or col() gives me an excellent way of calculating an x- or y- co-ordinate, with the value in the data.frame being the other half of the pair. Thanks for the code, Petr - I'm sure you would agree,

### [R] loading several samples of data from hard-drive, run lm, rlm, etc, save results in a list

I have many sample datasets (e.g. sample 5, sample 6, etc), each identified by a number as a suffix. These datasets are saved as individual R objects on my hard drive. (e.g.Wind.5.r . Wind.6.r,Solar.5.r,Solar.6.r) For example purposes, I have written code that creates similar data files using

### [R] Conditional logistic regression for events/trials format

Dear R users, I have a large individual-level dataset (~700,000 records) which I am performing a conditional logistic regression on. Key variables include the dichotomous outcome, dichotomous exposure, and the stratum to which each person belongs. Using this individual-level dataset I can

### Re: [R] Partially reading a file (particularly)

Try this: con - pipe(findstr /b 5 myfile.dat) open(con, r) DF - read.fwf(con, widths = c(1, 1, 2)) # replace with right args close(con) On 5/31/07, Tobin, Jared [EMAIL PROTECTED] wrote: The responses are much appreciated, thanks. findstr works and saves a lot of time. I didn't however have

### Re: [R] determining a parent function name

Hi, Vladimir, In general, this won't work since traceback only contains the stack from the last uncaught error (see ?traceback). When traceback is called below it would be from the previous error, not the current one. error - function() { parent - tail(capture.output(traceback()), n = 1)

### Re: [R] determining a parent function name

Hi, Vladimir, Sorry, didn't see this reply. .Traceback - NULL doesn't work because of the warning in ?traceback. Warning: It is undocumented where '.Traceback' is stored nor that it is visible, and this is subject to change. Prior to R 2.4.0 it was stored in the workspace,

### Re: [R] A matrix with mixed character and numerical columns

[EMAIL PROTECTED] napsal dne 31.05.2007 14:32:01: What I am trying to do is create an x-y plot from the numerical values, and the output of row() or col() gives me an excellent way of calculating an x- or y- co-ordinate, with the value in the data.frame being the other half of the pair.

### [R] Selective 'expansion' of arguments in a match.call() result ...

Is it possible to write a support function to automatize selective argument expansion (based on argument value type) as in the following example, in order to write terse code even when there are many arguments? Forcing evaluation of all arguments is not a problem ...

### Re: [R] Selective 'expansion' of arguments in a match.call() result ...

Try this: # ith arg is expanded if expand[[i]] is TRUE where expand is # extended to vector of same length as ... . # default is to expand all args if 1st arg is character example2 - function(..., expand = is.character(..1)) { L - list(...) expand - rep(expand, length =

### [R] VGAM package

Hi, R-users Could someone help me to understand this following error. I'm using vglm function in VGAM package Best regards and thank you for your ehlp mydata - read.table(Data2_overruns.csv, sep =;, header = T, row.names=NULL) attach(mydata) y - mydata$cat.event phase.vol

### [R] plotting variable sections of hourly time series data using plot.zoo

Dear list, I have to look examine hourly time - series and would like to plot variable section of them using plot.zoo. Hourly time series data which looks like this: MM DD HHP-ukP-kor P-SME EPOTEREA RO R1 R2 RGES S-SNO SISSM SUZSLZ 2003

### Re: [R] Choosing a column for analysis in a function

Perhaps the use of as.character() like following might help? data.whole$Analyte.Values - data.whole$as.character(analyte) Junnila, Jouni wrote: Hello all, I'm having a problem concerning choosing columns from a dataset in a function. I'm writing a function for data input etc., which

### Re: [R] cox goodness of fit

Hi, assuming you are doing a Cox-PH-Model, you can check: library(survival) ?coxph.object There it says that the components 'residuals' refers to the martingale residuals. I hope I recall it correctly but there exists a simple relation between the martingale residuals ('mgr') and the

### Re: [R] plotting variable sections of hourly time series data using plot.zoo

Regarding your other questions: plot(z[,3:5]) # only plot columns 3 to 5 # only plot between indicated times st - chron(01/01/03, 02:00:00) en - chron(03/26/2003, 07:00:00) zz - window(z, start = st, end = en) plot(zz) On 5/31/07, Gabor Grothendieck [EMAIL PROTECTED] wrote: There seems to

### Re: [R] Venn diagram

I cannot find the venn package (searched the author's page and googled) despite some posts referring to it, so I cannot help you. But I can suggest you check out the varpart in vegan package, vennDiagram in limma package or http://finzi.psych.upenn.edu/R/Rhelp02a/archive/14637.html Regards,

### Re: [R] plotting variable sections of hourly time series data using plot.zoo

There seems to be an error in your names(DF) - line so I just renamed the first 4 fields. Try this: # Should be 3 lines in Lines. Lines - MM DD HHP-ukP-kor P-SME EPOTEREA RO R1 R2 RGES S-SNO SISSM SUZSLZ 2003 1 1 10.385 0.456

### Re: [R] determining a parent function name

Hi sundar -- maybe myerr - function(err) err$call foo - function() stop() tryCatch({ foo() }, error=myerr) foo() suggests a way to catch errors without having to change existing code or re-invent stop? Martin Sundar Dorai-Raj [EMAIL PROTECTED] writes: Hi, Vladimir, Sorry, didn't see

### Re: [R] A matrix with mixed character and numerical columns

OK, where is the best place to post these to to get them incorporated in R? -Original Message- From: Petr PIKAL [mailto:[EMAIL PROTECTED] Sent: 31 May 2007 14:23 To: michael watson (IAH-C) Cc: r-help@stat.math.ethz.ch Subject: Re: [R] A matrix with mixed character and numerical columns

### [R] distribution of peaks in random data results

Dear all, I have the positions of N points spread through some sequence of length L (LN), and I would like to know how can do the following: 1- Permute the positions of the N points along the whole sequence. Assuming a uniform distribution I did: position1 - runif(N, 1, L) 2- Apply a

### [R] confidence band

Hello, I made a function, which calculates the confidence interval and the prediction interval, but if I want to plot it, then it plots only the regressionline. Maybe somebody can help me: conf.band - function(x,y) { res.lsfit - lsfit(x,y) xi - seq(from=40, to=160, length=200) n -

### Re: [R] Venn diagram

I'm not sure where you're getting the venn package. I don't find venn in either of these places: - http://cran.r-project.org/src/contrib/PACKAGES.html - http://www.bioconductor.org/packages/release/Software.html In case this helps, here are some notes about creating Venn Diagrams using the

### [R] Per-row minima for matrix

Hi all, Probably a very easy question, but I was wondering whether or not it is possible to calculate the per-row (or per-column) minima and maxima for a matrix object. Thanks in advance, Dirk -- Dirk De Becker Work: Kasteelpark Arenberg 30 3001 Heverlee phone:

### Re: [R] Where is CRAN mirror address stored?

?chooseCRANmirror [help.search(CRAN mirror) found this.] On Thu, 31 May 2007, Vladimir Eremeev wrote: When I update.packages(), R shows the dialog window, listing CRAN mirrors and asks to choose the CRAN mirror to use in this session. Then, R uses this address and never asks again until

### Re: [R] Comparing multiple distributions

Nobody answered my first request. I am sorry if I did not explain my problem clearly. English is not my native language and statistical english is even more difficult. I'll try to summarize my issue in more appropriate statistical terms: Each of my observations is not a single number but a

### Re: [R] Venn diagram

There is a venn package at these links: http://fisher.stats.uwo.ca/faculty/murdoch/repos/html/vennv1.5.html http://www.jstatsoft.org/v11/c01/ On 5/31/07, Earl F. Glynn [EMAIL PROTECTED] wrote: I'm not sure where you're getting the venn package. I don't find venn in either of these places: -

### Re: [R] Comparing multiple distributions

Your data is compositional data. The R package compositions might be useful. You might also want to consult the book by J. Aitchison: statistical analysis of compositional data. Ravi. --- Ravi Varadhan, Ph.D.

### [R] Import data from Access

Hi, I want to import some data from Access and I am using the following codes: testdb - file.path(c/../db1) channel - odbcConnect(testdb) sqlFetch(channel,tbl,colnames = TRUE, rownames = FALSE) It comes out the error message: 1: [RODBC] ERROR: state IM002, code 0, message [Microsoft][ODBC

### Re: [R] Per-row minima for matrix

apply(mat1, 1, min) should do it ( or max ) --- Dirk De Becker [EMAIL PROTECTED] wrote: Hi all, Probably a very easy question, but I was wondering whether or not it is possible to calculate the per-row (or per-column) minima and maxima for a matrix object. Thanks in advance,

### [R] Standard errors of the predicted values from a lme (or lmer)-object

Hi how do I obtain standard errors of the predicted values from a lme (or lmer)-object? Thanks ## Dr. Fränzi Korner-Nievergelt oikostat - Statistische Analysen und Beratung Ausserdorf 43 6218 Ettiswil Tel: +41 (0) 41 980 49 22 [EMAIL

### [R] mahalanobis

Hi, I am not sure I am using correctly the mahalanobis distnace method... Suppose I have a response variable Y and predictor variables X1 and X2 all - cbind(Y, X1, X2) mahalanobis(all, colMeans(all), cov(all)); However, my results from this are different from the ones I am getting using another

### Re: [R] Venn diagram

I'm really glad to see this topic come up. Area-proportional Venn diagrams are a phantastic way to visualize agreement. For the 2-rater scenario this is straightforward; here are two examples from my own work that were done in R. (I'm far too embarrassed to enclose the code).

### Re: [R] Comparing multiple distributions

While Ravi's suggestion of the compositions package is certainly appropriate, I suspect that the complex and extensive statistical homework you would need to do to use it might be overwhelming (the geometry of compositions is a simplex, and this makes things hard). As a simple and perhaps useful

### [R] Different fonts on different axes

Hi Folks, How do I get red bold font on my y axis and black standard font on my x axis? plot(runif(10), ylab=Red, Bold?, xlab=Black, standard?) Any pointers or examples would be great. Thanks! Hank Dr. Hank Stevens, Assistant Professor 338 Pearson Hall Botany Department Miami University

### Re: [R] Different fonts on different axes

Try this: plot(runif(10), ylab=, xlab=Black, standard?) mtext('Red, Bold', side=2, line=3, col='red', font=2) Hope this helps, -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare [EMAIL PROTECTED] (801) 408-8111 -Original Message- From: [EMAIL

### Re: [R] Import data from Access

You need to do 1 of 2 things (but not both). Either register your database file with your odbc driver (done outside of R) Or Use odbcConnectAccess in place of odbcConnect The 2nd is simpler if you just want to import that file, the first may be better in the long run if you are going to be

### [R] Factor analysis

Hi, is there any other routine for factor analysis in R then factanal? Basically I'am interested in another extraction method then the maximum likelihood method and looking for unweighted least squares. Thanks in advance Sigbert Klinke __

### Re: [R] Different fonts on different axes

Martin Henry H. Stevens said the following on 5/31/2007 9:59 AM: Hi Folks, How do I get red bold font on my y axis and black standard font on my x axis? plot(runif(10), ylab=Red, Bold?, xlab=Black, standard?) Any pointers or examples would be great. Thanks! Hank Dr. Hank

### Re: [R] Import data from Access

library(RODBC); mdbConnect - odbcConnectAccess(C:\\db.mdb); data - sqlFetch(mdbConnect, tblData); odbcClose(mdbConnect); On 5/31/07, livia [EMAIL PROTECTED] wrote: Hi, I want to import some data from Access and I am using the following codes: testdb - file.path(c/../db1) channel -

### Re: [R] Different fonts on different axes

There's also this approach plot(runif(10), ylab=list(Red, Bold?, col = red, font = 2), xlab=Black, standard?) On 5/31/07, Greg Snow [EMAIL PROTECTED] wrote: Try this: plot(runif(10), ylab=, xlab=Black, standard?) mtext('Red, Bold', side=2, line=3, col='red', font=2) Hope this helps,

### Re: [R] Conditional logistic regression for events/trials format

On Thu, 31 May 2007, Strickland, Matthew (CDC/CCHP/NCBDDD) (CTR) wrote: Dear R users, I have a large individual-level dataset (~700,000 records) which I am performing a conditional logistic regression on. Key variables include the dichotomous outcome, dichotomous exposure, and the stratum to

### [R] recompile R using ActiveTcl

Dear all, While running some code requiring the tcltk package I have realised that my version of R was compiled with the Tcl/Tk libraries included in Fedora 6. It would be for me better to use the ActiveTcl libraries (which I have under /usr/local), and I'm aware that this probably means to

### Re: [R] Different fonts on different axes

Man, you folks rock! Thanks to Greg, Sundar, and Stephen for excellent stuff. Hank On May 31, 2007, at 1:24 PM, Stephen Weigand wrote: There's also this approach plot(runif(10), ylab=list(Red, Bold?, col = red, font = 2), xlab=Black, standard?) On 5/31/07, Greg Snow [EMAIL PROTECTED]

### Re: [R] Comparing multiple distributions

On 2007-May-31 , at 18:56 , Bert Gunter wrote: While Ravi's suggestion of the compositions package is certainly appropriate, I suspect that the complex and extensive statistical homework you would need to do to use it might be overwhelming (the geometry of compositions is a simplex, and

### [R] Restoring .Random.seed

Hi. Suppose I have a function which does some random number generation within. The random number generation inside the function changes the value of .Random.seed in the calling environment. If I want to restore the pre-function call .Random.seed, I can do: save.seed-.Random.seed

### Re: [R] Conditional logistic regression for events/trials format

Thanks for your reply Charles. I do indeed have other variables. I apologize for being vague, here is my study in more detail: I have a cohort of births. My outcome is a dichotomous variable for presence/absence of a birth defect. For each cohort member I estimate the date of conception, and

### Re: [R] Accessing plots in Trellis graphics

On 5/31/07, Vladimir Eremeev [EMAIL PROTECTED] wrote: I used similar empty space to place the legend, by specifying the placement coordinates to the key argument of xyplot. This was rather long time ago, and I had to explicitly form the list, used as the key argument for this function.

### [R] sd with n not n-1

need a version of sd [or var] to return population standard deviation (using n rather than n-1 denominator) that will operate on a dataframe containing missings, i.e. unequal n's. any ideas? thx, ted. Ted (Edwin) Blew [EMAIL PROTECTED]

### [R] (no subject)

need a version of sd [or var] to return population standard deviation (using n rather than n-1 denominator) that will operate on a dataframe containing missings, i.e. unequal n's. any ideas? thx, ted. Ted (Edwin) Blew [EMAIL PROTECTED]

### [R] sd with n not n-1

need a version of sd [or var] to return population standard deviation (using n rather than n-1 denominator) that will operate on a dataframe containing missings, i.e. unequal n's. any ideas? thx, ted. Ted (Edwin) Blew [EMAIL PROTECTED]

### Re: [R] sd with n not n-1

Ted, This is pretty simple. If you are new to programming with R, please read the Introduction to R at http://cran.r-project.org/doc/manuals/R-intro.html This will answer most of the basic questions, but it requires more time than typing out an email. If you still have questions, please

### Re: [R] Partially reading a file (particularly)

This is perfect, thanks for the help. The read-in time for one of these files alone (of 30+) on this machine improves from about 2:30 to 0:10 when using this method. -- jared tobin, student research assistant dept. of fisheries and oceans [EMAIL PROTECTED] -Original Message- From:

### Re: [R] determining a parent function name

Thanks for the input. I don't think this will help either since it still requires you know the error occurred in foo. I settled on passing the call to error: error - function(..., call) {} foo - function() error(some error, call = match.call()) Thanks, --sundar Martin Morgan said the

### Re: [R] determining a parent function name

Hi, On Wednesday 30 May 2007 14:53:28 Sundar Dorai-Raj wrote: error - function(...) { msg - paste(..., sep = ) if(!length(msg)) msg - if(require(tcltk, quiet = TRUE)) { tt - tktoplevel() tkwm.title(tt, Error) tkmsg - tktext(tt, bg = white) tkinsert(tkmsg,

### Re: [R] determining a parent function name

Thanks! That's the answer I was looking for. --sundar Ismail Onur Filiz said the following on 5/31/2007 12:23 PM: Hi, On Wednesday 30 May 2007 14:53:28 Sundar Dorai-Raj wrote: error - function(...) { msg - paste(..., sep = ) if(!length(msg)) msg - if(require(tcltk, quiet =

### [R] RODBC query

As a newbie to RODBC (Windows XP), I find that the commands aren't working quite as expected. After Library(RODBC) I had planned to use the two-step process myConn = odbcConnectExcel(Dates.xls) sqlQuery(myConn,SELECT ID, ADM_DATE, ADM_TIME FROM A) #A is the Excel spreadsheet name X =

### [R] Merging two data objects question

I have two R objects, allDataSubset1 and allDataSubset2 and the str of both of them is shown below ( I don't show all 18 lists for space purposes ). The difference between them is that the times ( and possibly the days ) and the data is different and what I want to do is merge them so that only

### [R] Aggregate to find majority level of a factor

I want to use the aggregate function to summarize data by a factor (my field plots), but I want the summary to be the majority level of another factor. For example, given the dataframe: Plot1 big Plot1 big Plot1 small Plot2 big Plot2 small Plot2 small Plot3

### Re: [R] Restoring .Random.seed

On Thu, 31 May 2007, Talbot Katz wrote: Hi. Suppose I have a function which does some random number generation within. The random number generation inside the function changes the value of .Random.seed in the calling environment. If I want to restore the

### Re: [R] determining a parent function name

Sorry for replying to myself, but: On Thursday 31 May 2007 12:23:12 Ismail Onur Filiz wrote: Hi, On Wednesday 30 May 2007 14:53:28 Sundar Dorai-Raj wrote: error - function(...) { msg - paste(..., sep = ) if(!length(msg)) msg - if(require(tcltk, quiet = TRUE)) { tt -

### Re: [R] R's Spearman

Dear Ray, The R's Spearman calculated by R is correct for ties or nonties, which is not correct is the probability for the case of ties. I send to you formulates it for the correlation with ties, that is equal to R. Regards, Felipe de Mendiburu Statistician # Spearman correlation rs with

### Re: [R] Aggregate to find majority level of a factor

How about tapply? plot - gl(2,3); plot type - letters[c(1,2,2,1,1,1)]; type tapply(type, list(plot), function(x) {tabl - table(x) names(tabl[tabl==max (tabl)])}) Hank On May 31, 2007, at 3:25 PM, Thompson, Jonathan wrote: I want to use the

### [R] Follow up: surfaces and digital terrain model

I realize that as of yesterday, this message thread is 4 years old but can someone possibly post the clines function that Renaud mentions in the posting below? That would be wonderful and most appreciated. Thanks, Andrew Andrew Niccolai Doctoral Candidate Yale School of Forestry From:

### Re: [R] Aggregate to find majority level of a factor

On Thu, 2007-05-31 at 12:25 -0700, Thompson, Jonathan wrote: I want to use the aggregate function to summarize data by a factor (my field plots), but I want the summary to be the majority level of another factor. For example, given the dataframe: Plot1 big Plot1 big Plot1

### Re: [R] Aggregate to find majority level of a factor

Jon One way: assuming your data.frame is 'jon' aggregate(jon[,2], list(jon[,1]), function(x) levels(x)[which.max(table(x))]) Group.1 x 1 Plot1 big 2 Plot2 small 3 Plot3 small HTH Peter Alspach -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL

### Re: [R] Restoring .Random.seed

Thanks! The get / assign combination does just what I want, and the warning about the pre-existence of .Random.seed was very helpful. As for set.seed, I have used it to create a replicable state (in fact, I have an option to use it in the function I was writing that prompted my query), but I

### Re: [R] Aggregate to find majority level of a factor

This should do the trick. Also labels ties with NA. a=as.data.frame(cbind(c(1,1,1,2,2,2,3,3,3,4,4),c ('big','big','small','big','small','small','small','small','small','big' ,'small'))) a$V2=factor(a$V2) maj=function(x){ y=table(x) z=which.max(y) if(sum(y==max(y))==1){

### [R] Mac OS X crash bug?

Hi all, I want to check if this is a bug for which I should file a report. I am using R2.5.0 on OS X 10.4.9. When I invoke the data editor and when I change the values of individual cells, it seems to work as intended. However, when I try to delete/add a row/column, R.app

### Re: [R] determining a parent function name

Ismail Onur Filiz said the following on 5/31/2007 1:03 PM: Sorry for replying to myself, but: On Thursday 31 May 2007 12:23:12 Ismail Onur Filiz wrote: Hi, On Wednesday 30 May 2007 14:53:28 Sundar Dorai-Raj wrote: error - function(...) { msg - paste(..., sep = ) if(!length(msg))

### Re: [R] RODBC query

On Thu, 31 May 2007, Lucke, Joseph F wrote: As a newbie to RODBC (Windows XP), I find that the commands aren't working quite as expected. After Library(RODBC) I had planned to use the two-step process myConn = odbcConnectExcel(Dates.xls) sqlQuery(myConn,SELECT ID, ADM_DATE, ADM_TIME FROM

### [R] Clines library

I truly apologize, I just found the clines package. Thanks. Andrew Niccolai Doctoral Candidate Yale School of Forestry __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

### [R] R keeps crashing when executing 'rlogspline'

Dear List, I have a simple model as follows: x - rnorm(500) library(logspline) fit - logspline(x) n - 100 y - replicate(n, sum(rlogspline(rpois(1,10), fit))) # last line The problem I keep getting is R crashes when doing the last line. It seems to be fine if n is small, but not if n is

### Re: [R] [R-sig-Geo] Clines library

You can now use contourLines in the grDevices package included with R. Hadley On 5/31/07, Andrew Niccolai [EMAIL PROTECTED] wrote: I truly apologize, I just found the clines package. Thanks. Andrew Niccolai Doctoral Candidate Yale School of Forestry