Re: [R] non-ascii characters in R output

2011-02-18 Thread Matt Shotwell
On Fri, 2011-02-18 at 19:50 -0500, Duncan Murdoch wrote: On 18/02/2011 5:58 PM, Matt Shotwell wrote: OK, looks like my web browser does render non-ascii characters output by R when it's given the encoding explicitly. This works for me:meta http-equiv=Content-Type content=text/html

Re: [R] Revolution Analytics reading SAS datasets

2011-02-10 Thread Matt Shotwell
of Dr. Nie's comments on the page linked below, it seems unlikely this feature is the result of a licensing agreement with SAS. Is that correct? Matt It is, though, available for download free of charge to members of the academic community (as is all of Revolution Analytics' software) from http

Re: [R] Legend outside the plot? xpd?

2011-02-06 Thread Matt Cooper
at the par() level to ever be able to get anything outside of a plot square. Alas. Thanks David Matt [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

[R] Legend outside the plot? xpd?

2011-02-05 Thread Matt Cooper
. To sort this I've called box() at the end. This all seems very redundant? Thanks Matt -- mattcst...@gmail.com [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] clustering with finite mixture model

2011-02-02 Thread Matt Shotwell
-Matt On 02/02/2011 04:28 AM, karuna m wrote: Dear R-help, I am doing clustering via finite mixture model. Please suggest some packages in R to find clusters via finite mixture model with continuous variables. And also I wish to verify the distributional properties of the mixture distributions

[R] Movie Question

2011-01-22 Thread Matt Curcio
that this would be a great little project. Cheers, M Matt Curcio E: matt.curcio...@gmail.com __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide

Re: [R] User input in R program

2011-01-21 Thread Matt Shotwell
Martyn Plummer's 'coda' package has some nice interactive menus. The package appears to be written entirely in R. You could start with the codamenu() function in the package source: http://cran.r-project.org/web/packages/coda/index.html -Matt On Fri, 2011-01-21 at 14:26 +0200, christiaan pauw

[R] Pure curiosity

2010-12-12 Thread Matt Cooper
Pure curiosity but does anyone know why '-' and '=' generate different columning headers? test - data.frame(V1=c(1,2,3), V2=c(4,5,6)) test V1 V2 1 1 4 2 2 5 3 3 6 test - data.frame(V1-c(1,2,3), V2-c(4,5,6)) test V1c.1..2..3. V2c.4..5..6. 114

Re: [R] Encoding problem - I fails to read Hebrew text from online

2010-12-09 Thread Matt Shotwell
an HTMLDecode function if there isn't one already. By the way, what's the Hebrew text in English? Best, Matt On Thu, 2010-12-09 at 12:21 -0500, Tal Galili wrote: I am bumping this question in the hopes that someone might be able to advise. This Hebrew and R business is not as smooth as I had hoped

Re: [R] Encoding problem - I fails to read Hebrew text from online

2010-12-09 Thread Matt Shotwell
solution, I think it might be worthwhile to look at how PHP and Python do it (and maybe borrow some code :) ). -Matt On Thu, 2010-12-09 at 14:27 -0500, Tal Galili wrote: Hi Matt, Thanks for having a look at this. I just spent some time looking around and couldn't find any R function to decode

[R] ggplot - line_range help, second tier axis label

2010-12-08 Thread Matt Cooper
() + geom_errorbar(width=0.2) + opts(title=Title goes here) + labs(x=Var2, y=Y units, linetype=Var1) Thanks Matt [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

[R] convert non-ultrametric phylo to dendrogram

2010-12-08 Thread Matt Bakker
the layout of a heatmap). I get an error using as.hclust.phylo because the tree is not ultrametric. Is there no way to convert a non-ultrametric tree of class phylo into a dendrogram? With thanks for any help that you may be able to offer, Matt -- Matthew Bakker Ph.D. Candidate Department

Re: [R] statistical test for comparison of two classifications (nominal)

2010-11-22 Thread Matt Shotwell
a meaningful null hypothesis about the collection of classifications, and imposing the null hypothesis in a bootstrap sampling scheme. -Matt On Wed, 2010-11-17 at 10:01 -0500, Martin Tomko wrote: Thanks Mat, I have in the meantime identified the Rand index, but not the others. I will also have

Re: [R] Fatal Error R

2010-11-17 Thread Matt Shotwell
Please see below. On Wed, 2010-11-17 at 04:41 -0500, Ted Harding wrote: On 17-Nov-10 00:02:39, José Fernando Zea Castro wrote: Hello. First, I'm thankful about your wonderful project. However, I have serious worries about the reliability of R. I found the next bug which I consider

Re: [R] statistical test for comparison of two classifications (nominal)

2010-11-17 Thread Matt Shotwell
statistical inference about these indices. It's difficult to formulate a null hypothesis, and even more difficult to determine a null distribution for a partition comparison index. A bootstrap test might work, but you will probably have to implement this yourself. -Matt On Wed, 2010-11-17 at 08:33 -0500

Re: [R] log-transformed linear regression

2010-11-11 Thread Matt Shotwell
construct a bootstrap confidence interval for the approximate slope. -Matt On Wed, 2010-11-10 at 19:27 -0500, servet cizmeli wrote: Dear List, I would like to take another chance and see if there if someone has anything to say to my last post... bump servet On 11/10/2010 01:11 PM, servet

Re: [R] data acquisition with R?

2010-11-05 Thread Matt Shotwell
, a more low level connection to the POSIX termios interface http://biostatmatt.com/archives/564. Both of these solutions require that you apply the patch and recompile R. I can help with this, if you like. AFAIK, these are the only attempts at interfacing R with POSIX TTYs directly. -Matt On Fri

Re: [R] Lattice plots for images

2010-11-03 Thread Matt Shotwell
Have you tried using the 'mai' argument to par()? Something like: par(mfrow=c(3,3), mai=c(0,0,0,0)) I've used this in conjunction with image() to plot raster data in a tight grid. http://biostatmatt.com/archives/727 -Matt On Wed, 2010-11-03 at 11:13 -0400, Neba Funwi-Gabga wrote: Hello UseRs

Re: [R] ForestPlot or similar

2010-10-30 Thread Matt Shotwell
Here is a small function for forest plots in R, with an example: http://biostatmatt.com/wiki/r-credplot -Matt On Sat, 2010-10-30 at 11:40 -0400, Mestat wrote: Here is one example: I have three vectors (mean,lower interval, upper interval) mean-c(2,4,6,8) l-c(1,2,3,4) u-c(4,8,12,16) How

[R] Data.frame Vs Matrix Vs Array: Definitions Please

2010-10-26 Thread Matt Curcio
to simplify your work. Here are a few possibilities for simplifying: • Don’t use a list when an atomic vector will do. • Don’t use a data frame when a matrix will do. • Don’t try to use an atomic vector when a list is needed. • Don’t try to use a matrix when a data frame is needed. Cheers, Matt C

Re: [R] Regular expression to find value between brackets

2010-10-13 Thread Matt Shotwell
Here's a shorter (but more cryptic) one: gsub(^([^\\(]+)(\\((.+)\\))?, \\2, tests) [1] (%) (%) (mg/ml) gsub(^([^\\(]+)(\\((.+)\\))?, \\3, tests) [1] % % mg/ml -Matt On Wed, 2010-10-13 at 14:34 -0400, Henrique Dallazuanna wrote: Try this: replace(gsub

[R] read.xls??

2010-10-09 Thread Matt Curcio
Greeting all, I am having a little trouble finding the 'right' package that will read in .xls Excel spreadsheets. My Ubuntu base does not seem to have the ability to read them. Any suggestions? Cheers, M __ R-help@r-project.org mailing list

Re: [R] puzzle with integrate over infinite range

2010-09-21 Thread Matt Shotwell
You could try pnorm also: shiftedGaussR - function(x0 = 500) { sd - 100/sqrt(2) int - pnorm(0, x0, sd, lower.tail=FALSE, log.p=TRUE) exp(int + log(sd) + 0.5 * log(2*pi)) } shiftedGaussR(500) [1] 177.2454 shiftedGauss(500) [1] 177.2454 -Matt On Tue, 2010-09-21 at 09:38 -0400

Re: [R] Is there a bisection method in R?

2010-09-20 Thread Matt Shotwell
) because recursion is more expensive than looping. -Matt On Fri, 2010-09-17 at 17:44 -0400, Ravi Varadhan wrote: Here is something simple (does not have any checks for bad input), yet should be adequate: bisect - function(fn, lower, upper, tol=1.e-07, ...) { f.lo - fn(lower, ...) f.hi - fn

Re: [R] R Founding

2010-09-16 Thread Matt Shotwell
. Your massage has inspired me to write a post on the topic, titles: Was this --^ a Freudian slip? In any case, it seems consistent with your notion of compensation for open-source developers. :) Interesting post Tal. -Matt Open source and money – why R developers shouldn’t be paidhttp

Re: [R] Which language is faster for numerical computation?

2010-09-09 Thread Matt Shotwell
++ are consistently rated highly (often in the top 3) in popularity and use. Fortran is not. This would make a difference if you want to collaborate or ask for help. -Matt On Thu, 2010-09-09 at 06:26 -0400, Christofer Bogaso wrote: Dear all, R offers integration mechanism with different programming

Re: [R] Reproducible research

2010-09-09 Thread Matt Shotwell
differently. It depends on the evaluate package, available in the CRAN. The tentatively titled 'markup' package is attached. After it's installed, see ?markup and the few examples in the inst/ directory, or just example(markup). -Matt On Thu, 2010-09-09 at 01:47 -0400, David Scott wrote: I am

Re: [R] Reproducible research

2010-09-09 Thread Matt Shotwell
Well, the attachment was a dud. Try this: http://biostatmatt.com/R/markup_0.0.tar.gz -Matt On Thu, 2010-09-09 at 10:54 -0400, Matt Shotwell wrote: I have a little package I've been using to write template blog posts (in HTML) with embedded R code. It's quite small but very flexible

Re: [R] Uncompressing data from read.socket

2010-09-08 Thread Matt Shotwell
. There is no indication in the gzcon help file that explicitly prohibits socketConnections. Also, see memDecompress for in-memory decompression of the entire object. -Matt On Wed, 2010-09-08 at 00:50 -0400, raje...@cse.iitm.ac.in wrote: Hi, Is it possible to uncompress gzipped data coming over a socket

Re: [R] remove accents in strings

2010-09-07 Thread Matt Shotwell
does. Hence, I'm not sure this will work. But it's worth a try. -Matt On Tue, 2010-09-07 at 13:04 -0400, lamack lamack wrote: Dear all, there is a R function to remove all accents in strings? best regards. JL [[alternative HTML version

Re: [R] remove accents in strings

2010-09-07 Thread Matt Shotwell
to remind anyone interested that R still has trouble with embedded zeros in character strings. I may be abusing terminology, but I think that makes R 8-bit dirty. -Matt On Tue, 2010-09-07 at 14:01 -0400, David Winsemius wrote: On Sep 7, 2010, at 1:35 PM, Matt Shotwell wrote: If you know

Re: [R] Why is vector assignment in R recreates the entire vector ?

2010-09-01 Thread Matt Shotwell
in modern operating systems, like GNU Linux. I mostly find that the rate limiting steps in my code are computational routines, like exp(). -Matt On Wed, 2010-09-01 at 11:09 -0400, Tal Galili wrote: Hello all, A friend recently brought to my attention that vector assignment actually recreates

Re: [R] documentation to upgrade R-package from 32 to 64bit

2010-09-01 Thread Matt Shotwell
Try this: http://www.stats.ox.ac.uk/~ripley/Win64/W64porting.html -Matt On Wed, 2010-09-01 at 07:40 -0400, Hayes, Daniel wrote: Dear all, I am working with the an R-package named GAMLSS (www.gamlss.comhttp://www.gamlss.com) it is currently only functional under the 32-bit version of R

Re: [R] [semi-OT] Using fortune() in an email signature

2010-09-01 Thread Matt Shotwell
Or using R GNU tools: m...@max:~$ R -e fortunes::fortune() | gawk '/^[^]/ {print}' It's not a question of trying variations, rather of following instructions. -- Brian D. Ripley (about using 'Writing R Extensions') R-help (January 2006) -Matt On Wed, 2010-09-01 at 16:49 -0400, Stuart

Re: [R] Sweave.sty

2010-08-24 Thread Matt Shotwell
Here is one: http://svn.r-project.org/R/trunk/share/texmf/tex/latex/Sweave.sty -Matt On Tue, 2010-08-24 at 15:40 -0400, r.ookie wrote: Does anyone know where I can download the latest version of Sweave.sty? I have looked all over the site http://www.stat.umn.edu/~charlie/Sweave

Re: [R] Adding column to dataframe

2010-08-23 Thread Matt Cooper
and work up so that you know what to expect. On Wed, Aug 18, 2010 at 9:46 PM, Matt Cooper mattcst...@gmail.com wrote: 2) My specific problem with this dataset. I am essentially trying to convert a date and add it to a data frame. I imagine any 'data manipulation on a column within dataframe

Re: [R] on abort error, always show call stack?

2010-08-22 Thread Matt Shotwell
to get into the R language. The traceback() function will print out the call stack after an error. However, you may find the debug() family of functions more useful for debugging. Also see the browser() function. -Matt regards, /iaw Ivo Welch (ivo.we...@brown.edu, ivo.we...@gmail.com

Re: [R] on abort error, always show call stack?

2010-08-22 Thread Matt Shotwell
the effect with $ R --interactive test.R 1 test.out 2 test.err This seems reasonable, but maybe others will say if I'm missing something more automagic. -Matt On Sun, 2010-08-22 at 11:58 -0400, ivo welch wrote: yes, thank you. is it possible to have it invoked to STDERR automatically on a program

Re: [R] Does R always insist on sending plot output to a file?

2010-08-19 Thread Matt Shotwell
$ R postscript(file=Rfifo) plot(0) dev.off() -Matt On Wed, 2010-08-18 at 23:21 -0400, Matt Shotwell wrote: Donald, At least for the PDF device (I know you asked about png, but I believe they are similar), the answer no. Ultimately, this device calls the standard C function fopen

Re: [R] Pass By Value Questions

2010-08-19 Thread Matt Shotwell
duplication by utilizing R environments. See for example http://biostatmatt.com/archives/663 . However, this may be more trouble that it's worth. -Matt Duncan Murdoch __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] Delete rpart/mvpart cross-validation output

2010-08-18 Thread Matt Shotwell
Or, if using GNU Linux or other UNIX-like system: sink(/dev/null) # Issue commands sink() -Matt On Wed, 2010-08-18 at 09:14 -0400, Gabor Grothendieck wrote: On Fri, Aug 13, 2010 at 1:52 PM, Marie-Hélène Ouellette mariehele...@gmail.com wrote: Dear all, I was wondering

[R] Adding column to dataframe

2010-08-18 Thread Matt Cooper
. Thanks Matt [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self

Re: [R] Does R always insist on sending plot output to a file?

2010-08-18 Thread Matt Shotwell
connections would require significant changes. 2. The graphics devices are mostly implemented in C, and there is (at present) no interface to R connections at the C level. -Matt On Wed, 2010-08-18 at 21:49 -0400, Donald Paul Winston wrote: I need to write the output of a R plot to a Java OutputStream

Re: [R] when to use textConnection ??

2010-08-16 Thread Matt Shotwell
characters. -Matt On Mon, 2010-08-16 at 13:06 -0400, Joshua Wiley wrote: Hi, One useful case is when data is sent in an email. For instance: T1 T2 T3 -0.24 -0.26 -0.67 -1.58 0.04 0.14 -1.21 1.55 -0.45 0.31 0.48 -1.39 One could read it in via con - textConnection( T1 T2

Re: [R] band pass filter

2010-08-15 Thread Matt Shotwell
R script linked there. Also see the link to a free downloadable book by Steven Smith, which discusses the DFT and building filter kernels. -Matt On Sat, 2010-08-14 at 23:52 -0400, nuncio m wrote: Hello list, Is there any way to bandpass filter in R thanks nuncio -- Matthew S

Re: [R] reading a text file, one line at a time

2010-08-15 Thread Matt Shotwell
Walt, Something like: con - file(your-large-file.txt, rt) readLines(con, 1) # Read one line -Matt On Sun, 2010-08-15 at 10:58 -0400, Data Analytics Corp. wrote: Hi, I have an upcoming project that will involve a large text file. I want to 1. read the file into R one line at a time

Re: [R] ASCI characters

2010-08-15 Thread Matt Shotwell
How about: rawToChar(as.raw(82)) [1] R -Matt On Sun, 2010-08-15 at 19:50 -0400, Orvalho Augusto wrote: Hello guys! Is there any function that permits me to get an ASCI character from its code? Eg. ascifunction(34) would give me ' or ascifunction(92) gives \ Thanks Caveman

Re: [R] Numerical Methods Course

2010-08-10 Thread Matt Shotwell
not just ask your instructor? If your instructor insists on MATLAB, you could also consider using GNU Octave, a free MATLAB clone. -Matt On Tue, 2010-08-10 at 10:55 -0400, TGS wrote: I want to take this numerical methods course where the text is http://www.amazon.com/Numerical-Methods-J-Douglas

Re: [R] Good Book To Work Through This Summer

2010-08-09 Thread Matt Shotwell
, though I haven't read it myself. There are other high quality authors in the list also. -Matt On Mon, 2010-08-09 at 03:20 -0400, Ondrej Vozar wrote: Hello, I think that good introduction for application oriented people is book of Peter Dalgaard, Introductory Statistics with R http

Re: [R] Changing downloaded source code into a package

2010-08-09 Thread Matt Shotwell
See comments below. On Mon, 2010-08-09 at 10:22 -0400, JH wrote: I am wanting to change some lines of code in the R package named nlme http://cran.r-project.org/web/packages/nlme/index.html To do this I have downloaded the Package source named nlme_3.1-96.tar.gz, opened up the file and

Re: [R] Is there paid support for R?

2010-08-02 Thread Matt Aldridge
Thanks for the message Raghu. We do indeed provide R support to a wide variety of customers. I have sent a message directly to Chris. Thanks Matt Mango Solutions Hadley Wickham, Creator of ggplot2 - first time teaching in the UK. 1st - 2nd November 2010. To book your seat please go to http

Re: [R] grep with search terms defined by a variable

2010-08-02 Thread Matt Shotwell
) for(term in search.terms) { + print(grep(paste(^,term,sep=),names)) + } [1] 1 [1] 4 -Matt On Tue, 2010-08-03 at 00:05 -0400, Daniel Malter wrote: Hi, I have a good grasp of grep() and gsub() for finding and extracting character strings. However, I cannot figure out how to use a search

Re: [R] Meaning of following function

2010-08-01 Thread Matt Shotwell
, the 'times' or 'multiply' operator '*' is generally a binary operator in arithmetic. Hence, the function `*`() requires two arguments. -Matt On Sun, 2010-08-01 at 10:56 -0400, Ron Michael wrote: Hi friends, I am aware of the function -() which acts as minus in ordinary computations

Re: [R] how to code it??

2010-07-28 Thread Matt Shotwell
] == 1) + state - -1 + } + x + } easy(x) [1] 0 0 0 0 0 0 0 1 -1 0 1 1 -1 0 1 -1 0 0 1 -Matt On Wed, 2010-07-28 at 14:10 -0400, Raghu wrote: Hi I have say a large vector of 3500 digits. Initially the digits are 0s and 1s. I need to check for a rule

[R] Prediction Intervals vs. Confidence Bands

2010-07-27 Thread Matt Stati
When I ask R to compute: predict(data, int = c), following a linear regression, what is it computing exactly? How are these lower and upper prediction limits different than what I would get for confidence limits? Thanks, Matt. [[alternative HTML version deleted

Re: [R] what is a vignette?

2010-07-26 Thread Matt Shotwell
/manuals.html -Matt On Mon, 2010-07-26 at 07:55 -0400, Alaios wrote: I am trying to find a simple R guide that explain what a vignette is but so far I didnt make any progress. I tried to search inside R's built in help.start() but it only returns results how to see vignettes. So could you

[R] Book on R's Programming Language

2010-07-24 Thread Matt Stati
. . . Matt. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented

Re: [R] sink function

2010-07-23 Thread Matt Shotwell
I had addressed a problem similar to this only a few days ago. Please see the following URL: http://tolstoy.newcastle.edu.au/R/e11/help/10/07/1677.html On Fri, 2010-07-23 at 08:45 -0400, nuncio m wrote: I have the following code to write the output from auto.arima function. The issue is not

Re: [R] Help with Sink Function

2010-07-16 Thread Matt Shotwell
Your code between calls to sink() does not generate any output. Hence, nothing will be diverted to the file. To illustrate this point, consider for(i in 1:10) i This produces no output. However, for(i in 1:10) print(i) produces output as expected. -Matt On Fri, 2010-07-16 at 13:34 -0400

Re: [R] calling a c function from R

2010-07-14 Thread Matt Shotwell
Fahim, Please see the Writing R Extensions manual http://cran.r-project.org/doc/manuals/R-exts.pdf There are simple instructions in this document under the heading System and foreign language interfaces. -Matt On Wed, 2010-07-14 at 01:21 -0400, Fahim Md wrote: Hi, I am trying to call a C

[R] Longitudinal negative binomial regression - robust sandwich estimator standard errors

2010-07-14 Thread Matt Cooper
on this appreciated. Matt [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented

Re: [R] Fast string comparison

2010-07-13 Thread Matt Shotwell
(strings[-1], strings[-1e5])) user system elapsed 0.032 0.000 0.034 That's pretty fast, though I seem to be working with a slower system than Hadley. It's hard to see how this could be improved, except maybe by caching results of string comparisons. -Matt Hadley On Tue, Jul 13

Re: [R] Fast string comparison

2010-07-13 Thread Matt Shotwell
, Romain Francois wrote: Hi Matt, I think there are some confusing factors in your results. system.time(strcmp(strings[-1], strings[-1e5])) would also include the time required to perform both subscripting (strings[-1] and strings[-1e5] ) which actually takes some time. Also, you do

Re: [R] Compress string memCompress/Decompress

2010-07-11 Thread Matt Shotwell
On Fri, 2010-07-09 at 20:02 -0400, Erik Wright wrote: Hi Matt, This works great, thanks! At first I got an error message saying BLOB is not implemented in RSQLite. When I updated to the latest version it worked. SQLite began to support BLOBs from version 3.0. Is there any reason

Re: [R] Compress string memCompress/Decompress

2010-07-09 Thread Matt Shotwell
as blob in SQLite database -Matt On Fri, 2010-07-09 at 12:51 -0400, Erik Wright wrote: Hello, I would like to compress a long string (character vector), store the compressed string in the text field of a SQLite database (using RSQLite), and then load the text back into memory and decompress

Re: [R] LondonR July Meeting

2010-07-08 Thread Matt Aldridge
Hi Raghu, I'm not sure which link isn't working but I can confirm we have registered you for the event. Anyone else wishing to register can email lond...@mango-solutions.com See you next Tuesday Thanks Matt -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun

Re: [R] Calling Gnuplot from R

2010-07-08 Thread Matt Shotwell
ASCII graphics in R. Maybe there are other good reasons also? I believe octave makes good use of Gnuplot... -Matt On Thu, 2010-07-08 at 11:28 -0400, Erik Iverson wrote: If you use Emacs, you can use org-mode with org-babel to facilitate this... I'll refrain from asking why :). See: http

Re: [R] Plot with whispers

2010-07-05 Thread Matt Shotwell
It looks like read.table is reading the first line as a data value, which is the default for read.table. Try using read.table with the argument header=TRUE. Also, consider using a box and whiskers plot for these data (?boxplot, ?lattice::bwplot). -Matt On Mon, 2010-07-05 at 12:08 -0400, Ian

Re: [R] Function to compute the multinomial beta function?

2010-07-05 Thread Matt Shotwell
How about this? mbeta - function(...) { exp(sum(lgamma(c(...)))-lgamma(sum(c(... } gamma(5)*gamma(6)*gamma(7)/gamma(18) [1] 5.829838e-09 mbeta(5,6,7) [1] 5.829838e-09 On Mon, 2010-07-05 at 17:10 -0400, Gregory Gentlemen wrote: Dear R-users, Is there an R function to compute

Re: [R] left end or right end

2010-07-01 Thread Matt Shotwell
, or end1 == end2, or both? I can think of a bootstrap test for hypotheses like this, and this is relatively easy in R. -Matt On Thu, 2010-07-01 at 07:53 -0400, ravikumar sukumar wrote: Dear all, I am a biologist. I have two sets of distance P(start1, end1) and Q(start2, end2). The distance

Re: [R] left end or right end

2010-07-01 Thread Matt Shotwell
. ...And I'm still interested to hear what those are. :-) Of course, these are just my ideas, you really ought to visit a biostatistician for professional advice. -Matt On Thu, 2010-07-01 at 10:24 -0400, ravikumar sukumar wrote: There are three possibilities: Case1: Left end P

Re: [R] how to display the clock time in the loop

2010-07-01 Thread Matt Shotwell
Try to flush output after printing: cat(paste(Sys.time()),\n); flush(stdout()) On Thu, 2010-07-01 at 16:17 -0400, Jack Luo wrote: Hi, I am doing some computation which is pretty time consuming, I want R to display CPU time after each iteration using the command Sys.time(). However, I found

Re: [R] is there a way to do dense rank in R

2010-07-01 Thread Matt Shotwell
x - c(5,7,7,9) rank(unique(x))[match(x, unique(x))] [1] 1 2 2 3 On Thu, 2010-07-01 at 21:30 -0400, Suresh Singh wrote: I have not been able to find a way to do dense rank in R Here is an example of what I need rank() gives the following 5 rank 1 7 rank 2 7 rank 2 9 *rank 4* but

Re: [R] integration of two normal density

2010-06-28 Thread Matt Shotwell
Isn't it equally trivial to demonstrate that the product of two pdfs _may_ be a normalized pdf? For example, the uniform (0,1) pdf: f(x) = 1 for x in (0, 1), and 0 otherwise Hence, g(x) = f(x)*f(x) = 1 for x in (0, 1), and 0 otherwise _is_ a normalized pdf. But this is a little silly. Rather

Re: [R] advice on package devel with external libs

2010-06-28 Thread Matt Shotwell
to maintain code written by others. There are several JSON parsers with very liberal licenses (www.json.org), and some are tiny. -Matt On Mon, 2010-06-28 at 16:10 -0400, Murat Tasan wrote: hi all - i'm working on an R package that makes use of my own shared library written in C. but i also am

Re: [R] integration of two normal density

2010-06-26 Thread Matt Shotwell
integrals. Check out Monte Carlo integration, and Markov chain Monte Carlo methods. -Matt Also, is there any R function or package could do multivariate integration ? Thanks for any suggestions! Carrie [[alternative HTML version deleted

Re: [R] Handouts / Reports or just simply printing text to PDF?

2010-06-25 Thread Matt Shotwell
Check out the brew package, by Jeff Horner. Ralf B wrote: I assume R won't easily generate nice reports (unless one starts using Sweave and LaTeX) but perhaps somebody here knows a package that can create report like output for special cases? How can I simply plot output into PDF? Perhaps

Re: [R] Problem with writing a CSV file in UTF-8 formate

2010-06-22 Thread Matt Shotwell
notepad can't tell it's unicode, and uses ANSI (codepage?) to represent its best guess. Does your table contain non-ASCII characters? -Matt On Tue, 2010-06-22 at 10:42 -0400, Duncan Murdoch wrote: On 22/06/2010 10:39 AM, venkata kirankumar wrote: Hi Murdoch, first of all thanks allot

Re: [R] C interface

2010-06-18 Thread Matt Shotwell
) The value is 1.00[1] 1 Take a look at the code in the 'code' slot of test and testpp also. -Matt On Fri, 2010-06-18 at 10:18 -0400, michael meyer wrote: Greetings, I am trying to call simple C-code from R. I am on Windows XP with RTools installed. The C-function is #include R.h

Re: [R] Question

2010-06-16 Thread Matt Shotwell
) summary(texp) Matt Shotwell Graduate Student Div. Biostatistics and Epidemiology Medical University of South Carolina On Wed, 2010-06-16 at 11:11 -0400, Joris Meys wrote: Two possibilities : rescale your random vector, or resample to get numbers within the range. But neither of these solutions

Re: [R] Compiling R with multi-threaded BLAS math libraries - why not actually ?

2010-06-11 Thread Matt Shotwell
section on linking with enhanced BLAS and LAPACK libs, including the Intel MKL, if you are willing cough up $399, or swear not to use the library commercially or academically. Maybe a short tutorial using free software, such as ATLAS would be suitable content for an r-bloggers post :) ? Matt

[R] ordisurf (pkg vegan) gives implausible result

2010-06-08 Thread Matt Bakker
I'm having trouble with the ordisurf function in the vegan package. I have created an ordination plot (cmdscale) of 60 samples based on Bray-Curtis dissimilarities, and would like to overlay various soil edaphic characteristics as possible clues to the clustering I observe in my plot. However, I

Re: [R] regexpr mystery can not remove trailing spaces

2010-06-02 Thread Matt Shotwell
, the space character will not match. Try something that matches multiple white space, like sub('\\w+$', '', as.character(becva$V1[1])) or sub('[[:blank:]]+$', '', as.character(becva$V1[1])) Matt Shotwell Graduate Student Division of Biostatistics and Epidemiology Medical University of South

Re: [R] regexpr mystery can not remove trailing spaces

2010-06-02 Thread Matt Shotwell
On Wed, 2010-06-02 at 09:22 -0400, Petr PIKAL wrote: Hi dput(bbb) c(02.06.10 12:40 , 02.06.10 12:00 , 02.06.10 11:00 , 02.06.10 10:00 , 02.06.10 09:00 , 02.06.10 08:00 , 02.06.10 07:00 , 02.06.10 06:00 , 02.06.10 05:00 , 02.06.10 04:00 , 02.06.10 03:00 , 02.06.10

Re: [R] R linux install: FORTRAN compiling error

2010-06-02 Thread Matt Shotwell
does not depend on libmpc Matt Shotwell Graduate Student Division of Biostatistics and Epidemiology Medical University of South Carolina On Wed, 2010-06-02 at 17:07 -0400, vaneet wrote: Hello, I have basic familiarity with Unix but by most standards a novice. I am trying to install R

Re: [R] regexpr help (match.length=0)

2010-06-01 Thread Matt Shotwell
want + instead of *. Also see gregexpr. Also, regular expressions try to match as early as possible. That's why the match is at position one of length zero, and not at position four of length three. Matt Shotwell Graduate Student Division of Biostatistics and Epidemiology Medical University

Re: [R] Help - C Compiler

2010-06-01 Thread Matt Shotwell
Take a look at the R Installation and Administration manual http://cran.r-project.org/doc/manuals/R-admin.pdf, under the section with header The standalone Rmath library. Matt Shotwell Graduate Student Division of Biostatistics and Epidemiology Medical University of South Carolina On Tue, 2010

Re: [R] How to set parameters constraints in a function? (Matt Shotwell)

2010-05-24 Thread Matt Shotwell
the optimization routine not to search at values in ( kappa = alpha ). Also, you may find it helpful to pass the variable 'x' as part of the function call (i.e. mll - function(param, x). This may avoid some hard-to-diagnose errors. -Matt On Mon, 2010-05-24 at 22:31 +1000, Carol Gao wrote: Dear R list

[R] [R-pkgs] Bidirectional piping in windows

2010-05-17 Thread Matt Young
Lot of examples for one way pipes, but I need to create some named pipes from R to another process, especially SQLite. I am look at the R/SQLite packages for help. ANy pointers? ___ R-packages mailing list r-packa...@r-project.org

[R] sprintf funny behavior

2010-05-11 Thread Matt Young
sprintf(%d,4) [1] 4 for(i in 1:4) sprintf(%d,4) for(i in 1:4) print(4) [1] 4 [1] 4 [1] 4 [1] 4 Why doesn't sprintf like the for loop here __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

[R] What is happening with SQLite and R integration

2010-05-10 Thread Matt Young
Who is working on it, using it etc. I use both. -- View this message in context: http://r.789695.n4.nabble.com/What-is-happening-with-SQLite-and-R-integration-tp2173219p2173219.html Sent from the R help mailing list archive at Nabble.com. __

Re: [R] Running script with double-click

2010-03-05 Thread Matt Asher
Thanks Steve. This is working except for plots not showing up. I'll see if I can fix that. Do you know how to target the output to an R Console that will stay open (Rgui would be best)? Cheers, Matt Steve Taylor wrote: You can create a right-mouse menu command to run an R program

[R] Running script with double-click

2010-03-04 Thread Matt Asher
Hi, I need to be able to run an R script by double-clicking the file name in Windows. I've tried associating the .r extension with the different R .exe's in /bin but none seems to work. Some open R then close right away, and Rgui.exe gives the message ARGUMENT /my/file.r __ignored__ before

[R] Problem accessing sub-methods of functions stored in a vector

2010-02-26 Thread Matt Asher
Hi folks, I am having trouble accessing sub-functions when the main function is stored in an array. For example, the following test code works fine: fcns = c(abs, sqrt) fcns[[1]](-2) fcns[[2]](2) However, when I try to access sub-functions declared within list() in a function, this only

Re: [R] Problem accessing sub-methods of functions stored in a vector

2010-02-26 Thread Matt Asher
that can have instances and class vars, without having to use R's backwards (IMO) way of doing OOP. Cheers. On 26.02.2010 16:33, Matt Asher wrote: Hi folks, I am having trouble accessing sub-functions when the main function is stored in an array. For example, the following test code works fine

Re: [R] Avoiding singular fits in rlm

2009-12-03 Thread Matt Crawford
Thanks, that was right (factor levels with no data). I forgot or didn't know that when data gets changed, the factor levels don't get changed as well. I'm sorry about missing parts of the Posting Guide. Matt Crawford On Wed, Dec 2, 2009 at 10:45 PM, Prof Brian Ripley rip...@stats.ox.ac.uk wrote

[R] Avoiding singular fits in rlm

2009-12-02 Thread Matt Crawford
I keep coming back to this problem of singular fits in rlm (MASS library), but cannot figure out a good solution. I am fitting a linear model with a factor variable, like lm( Y ~ factorVar) and this works fine. lm knows to construct the contrast matrix the way I would expect, which puts the first

Re: [R] Using anova(f1, f2) to compare lmer models yields seemingly erroneous Chisq = 0, p = 1

2009-09-04 Thread Matt Killingsworth
is reflected in the AIC, BIC , and logLik values. Why might anova be giving me this curious output? How can I fix it? I am sure I am making a dumb error somewhere, but I cannot figure out what it is. Any help or suggestions would be greatly appreciated! -Matt f1 - (lmer(outcome

Re: [R] How should i change the SAS Codes into R Codes?

2009-07-27 Thread Matt Aldridge
singleSim - expand.grid(se = 0:100/100, sp = 0:100/100, DR = 0:100/100) singleSim - within(singleSim, { TR - (DR+sp-1)/(se+sp-1+1.0e-12) AdjustFactor - TR/(DR+1.0e-12) }) sampleData - subset(singleSim, DR == .02 sp == 1) write.csv(sampleData, output.csv) Hope this helps Matt

[R] ggplot2 and Date class

2009-06-01 Thread Matt Frost
something else, maybe in my default aesthetics? Thanks, Matt Frost __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal

<    1   2   3   >