Re: [R] Can DEoptim trace output be customized?

2013-05-09 Thread Katharine Mullen
://cran.r-project.org/doc/manuals/r-release/R-exts.html#Checking-and-building-packages ). On Thu, May 9, 2013 at 11:27 AM, David Reiner david.rei...@xrtrading.comwrote: I'm running DEoptim - it works great! (A HUGE THANK YOU to David Ardia, Katharine Mullen, Brian Peterson, and Joshua Ulrich

Re: [R] R crashes when loading rgl package before minqa package

2010-09-30 Thread Katharine Mullen
I also cannot reproduce the crash. sessionInfo() R version 2.11.1 (2010-05-31) x86_64-unknown-linux-gnu locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_US.UTF-8LC_COLLATE=en_US.UTF-8 [5] LC_MONETARY=C LC_MESSAGES=en_US.UTF-8 [7] LC_PAPER=en_US.UTF-8

[R] Registration deadline, useR! 2010

2010-06-13 Thread Katharine Mullen
by members of the program committee, including Dirk Eddelbuettel, John Fox, Virgilio Gomez-Rubio, Richard Heiberger, Torsten Hothorn, Aaron King, Jan de Leeuw, Nicholas Lewin-Koh, Andy Liaw, Uwe Ligges, Martin Maechler, Katharine Mullen, Heather Turner, Ravi Varadhan, H

[R] Calling R-tists

2010-05-19 Thread Katharine Mullen
Participants in the R User Conference, useR! 2010, July 21-23, (http://R-project.org/useR-2010) will each receive a t-shirt, thanks to the sponsorship of Mango Solutions (http://www.mango-solutions.com/). This email is a call for designs for the front of the t-shirt. The design should be made

[R] useR!, regular registration deadline today

2010-05-19 Thread Katharine Mullen
This is a reminder that the regular registration deadline for the useR! 2010 conference, July 21-23 (http://www.R-project.org/useR-2010) is today. After today, late registration will be possible until June 20th. The link to submit registration information is:

[R] useR! 2010, Submission/early registration deadline: March 1

2010-02-22 Thread Katharine Mullen
, Torsten Hothorn, Aaron King, Jan de Leeuw, Nicholas Lewin-Koh, Andy Liaw, Uwe Ligges, Martin Maechler, Katharine Mullen, Heather Turner, Ravi Varadhan, H. D. Vinod, John Verzani, Alan Zaslavsky, Achim Zeileis. The program will cover topics such as * Applied

Re: [R] nls.lm AIC

2010-02-16 Thread Katharine Mullen
I will consider putting methods for AIC and logLik into the next version of minpack.lm (contributions welcome). For now, the following should work for logLik, where 'object' is the return value of nls.lm. logLik.nls.lm - function(object, REML = FALSE, ...) { res - object$fvec N -

[R] Abstract submission deadline, useR! 2010

2010-02-02 Thread Katharine Mullen
The abstract submission deadline for the R Users Conference, useR! 2010, is just one month away. Submission deadline: 2010-03-01 Early registration will also close on 2010-03-01. Now is the perfect time to prepare an abstract presenting innovations or exciting applications of R. The call

Re: [R] non-linear regression

2009-12-11 Thread Katharine Mullen
=list(A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,K=0)) HP matplot(cbind(log(fitted(HP)), log(tx.br)),type=l) - Original Message - From: Katharine Mullen k...@few.vu.nl To: AneSR citb...@terra.com.br Cc: r-help@r-project.org Sent: Thursday, December 10, 2009 9:55 PM Subject: Re: [R] non-linear

Re: [R] non-linear regression

2009-12-10 Thread Katharine Mullen
You did not provide the data or a way of generating it. I would guess that Excel finds the same solution (the same residual sum-of squares) as nls but that it uses a weak convergence criterion and/or does not give you information regarding why it terminates. Regarding the step size: you can set

Re: [R] Starting estimates for nls Exponential Fit

2009-12-02 Thread Katharine Mullen
You used starting values: pa - c(1,2,3) but both algorithms (port and Gauss-Newton) fail if you use the slightly different values: pa - c(1,2,3.5) Scaling does not fix the underlying sensitivity to starting values. pa[3] in particular cannot be above ~3.15 for GN and ~3.3 for port; both

Re: [R] Starting estimates for nls Exponential Fit

2009-12-01 Thread Katharine Mullen
If you could reformulate your model as alpha * (y0 + E^t) then you could use nls with alg=plinear (alpha then would be eliminated from the nonlinear param and treated as conditionally linear) and this would help with convergence. Else you can try package DEoptim to get the starting values; the

[R] useR! 2010: submission registration started!

2009-10-19 Thread Katharine Mullen
/ ** We hope to meet you in Gaithersburg! The organizing committee, Kevin Coakley, Nathan Dodder, David Gil, William Guthrie, Walter Liggett, John Lu, Katharine Mullen, Jonathon Phillips, Antonio Possolo, Ravi Varadhan. ___ r

[R] [R-pkgs] DEoptim 2.0-0

2009-10-05 Thread Katharine Mullen
to plot the intermediate populations if provided. o The package maintainer has been changed to Katharine Mullen, katharine.mul...@nist.gov. o A NAMESPACE has been added. o Argument FUN for DEoptim is now called fn for compatibility with optim. o demo file has been removed

Re: [R] curve fitting

2009-05-12 Thread Katharine Mullen
or use nls.lm as in install.packages(minpack.lm) library(minpack.lm) x - c(2, 8, 14, 20, 26, 32, 38, 44, 50, 56, 62, 68, 74) y - c(100, 99, 99, 98, 97, 94, 82, 66, 48, 38, 22, 10, 1) res - function(p, x, y) y - ff(p,x) ff - function(p, x) 100*exp(p[1]*(1-exp(p[2]*x))/p[2]) aa -

Re: [R] Biexponential Fit

2009-04-09 Thread Katharine Mullen
Using algorithm=plinear as shown by example below makes sum-of-exponentials fitting problems better conditioned. A1 - 1 A2 - 2 k1 - -.5 k2 - -2 x - seq(1,10,length=200) y - A1*exp(k1*x) + A2*exp(k2*x) + .001*rnorm(200) aa - nls(y~cbind(exp(k1*x), exp(k2*x)), algorithm=plinear,

Re: [R] Gradient function for optim.

2009-02-25 Thread Katharine Mullen
see the fmingr function in src/main/optim.c (https://svn.r-project.org/R/trunk/src/main/optim.c) On Wed, 25 Feb 2009 rkevinbur...@charter.net wrote: I have read that when the gradient function is not supplied (is null) then first order differencing is used to find the differential. I was

Re: [R] Chromatogram deconvolution and peak matching

2009-02-17 Thread Katharine Mullen
Hoi Bart, I think you're right that ALS should be applicable to this problem. Unfortunately in writing I see that there is a bug when the spectra are NOT constrained to nonnegative values (the package has been used to my knowledge only in fitting multiway mass spectra thus far, where this

[R] Task View for Chemometrics and Computational Physics

2008-09-21 Thread Katharine Mullen
are welcome. If you think a new category, package or function should be added, please mail. best regards, Kate Mullen Katharine Mullen mail: Department of Physics and Astronomy, Faculty of Sciences Vrije Universiteit Amsterdam, de Boelelaan 1081 1081 HV Amsterdam, The Netherlands room: T.1.06

Re: [R] writing text and output to file with flexibility

2008-08-30 Thread Katharine Mullen
you can combine write and write.table, using append=TRUE. e.g., write1 - function(txt, mat, filename) { for(i in 1:length(txt)) { write(txt[i], file=filename, append=i!=1) write.table(mat[[i]], file=filename, append=TRUE,sep =\t) } } t - c(text1, text2, text3) m -

Re: [R] Optim stripping attributes from relistable objects

2008-08-17 Thread Katharine Mullen
The following code is inspired by the help file for the relist() function (see?relist), which explicitly details how you can use a The example is in the 'Details' section and, indeed, it looks like it no longer works. relistable object in conjunction with optim to pass and reconstruct

Re: [R] Port package

2008-07-09 Thread Katharine Mullen
It is not an R package, but rather a collection of Fortran functions that R uses from netlib: http://www.netlib.org/port/ On Wed, 9 Jul 2008, Jos Kaefer wrote: Hi When I type: ?nls I come across this section: algorithm: character string specifying the algorithm to use. The

Re: [R] bug in nls?

2008-06-26 Thread Katharine Mullen
Dear Petr, I think it's a feature. the formula interface also won't let you specify the slots of S4 objects in the model spec. How about coef(nls(y~a*x^b, data=list(x=DF[,1], y=DF[,2]), start=list(a=3, b=.7))) ? On Thu, 26 Jun 2008, Petr PIKAL wrote: Dear all Nobody responded to my

Re: [R] YAPMQ - Yet Another PlotMath Question

2008-06-19 Thread Katharine Mullen
by example: slope - 45 plot(1:10) text(2, 7, labels = expression(45~degree)) ; text(2, 5, labels = substitute(paste(slope * degree), list(slope=45))) text(2, 3, labels = substitute(paste(lambda * = * mt * (nm)), list(mt = 33))) On Thu, 19 Jun 2008, Thompson, David (MNR) wrote: Hello,

Re: [R] adding custom axis to image.plot() and strange clipping behavior

2008-06-13 Thread Katharine Mullen
I also noticed that adding a custom axis with image.plot was a problem; you can also do: library(fields) m - matrix(1:15,ncol=3) par(mar=c(5,5,5,7)) image(m, axes=FALSE) # add axis axis(1,axTicks(1),lab=letters[1:length(axTicks(1))]) box() ## add legend image.plot(m, legend.only=TRUE)

Re: [R] optim, constrOptim: setting some parameters equal to each other

2008-06-08 Thread Katharine Mullen
Here is an example w/optim where you have an objective function F(x) where you have (possibly a few) constraints of form x_i=x_j, and you can specify the constraints flexibly, which is what I _think_ you want. An example from you would have been nice. ## objective function that depends on all

Re: [R] optim, constrOptim: setting some parameters equal to each other

2008-06-08 Thread Katharine Mullen
. ## for constraint a=b xx - optim(par=list(b=-4, c=-.1), fn=fr, eqspec=list(a=b), dd=dd, obfun=obfun) ## for constraint b=a x1 - optim(par=list(a=-3, c=-.1), fn=fr, eqspec=list(b=a), dd=dd, obfun=obfun) On Sun, 8 Jun 2008, Katharine Mullen wrote: Here is an example w/optim where

Re: [R] How can I display a characters table ?

2008-06-06 Thread Katharine Mullen
Dear Maura, try the function textplot from the package gplots. you can say textplot(yourmatrix) and get a plot of a character matrix. On Fri, 6 Jun 2008, Maura E Monville wrote: I would like to generate a graphics text. I have a 67x2 table with 5-character string in col 1 and 2-character

Re: [R] nls() newbie convergence problem

2008-06-04 Thread Katharine Mullen
dydata x1 x2 y 1 9 27 248 2 9 22 213 3 4 23 190 4 11 16 183 5 -6 25 144 6 11 14 169 7 -4 13 72 8 2 8 73 9 10 13 156 10 8 30 263 11 12 10 147 12 -7 5 -2 13 0 10 75 14 12 0 77 15 9 8 115 16 12 24 245 17 34 23 370 18 12 1 84 19 10 37 324 20 26 30 371 weight -

Re: [R] optim error - repost

2008-06-01 Thread Katharine Mullen
try: vol - rep(c(0.03, 0.5, 2, 4, 8, 16, 32), 3) time - rep(c(2,4,8),each=7) p.mated - c(0.47, 0.48, 0.43, 0.43, 0.26, 0.23, NA, 0.68, 0.62, 0.64, 0.58, 0.53, 0.47, 0.24, 0.8, 0.79, 0.71, 0.56, 0.74, 0.8, 0.47) eury - data.frame(vol=vol, time=time, p.mated=p.mated) eury - na.omit(eury) p0 -

Re: [R] nls diagnostics?

2008-05-25 Thread Katharine Mullen
Dear Spencer, I just saw your post. If the singular gradient happens during or after iteration one (that is, not at the initial estimates), then calling summary on the nls output would give standard error estimates on the parameters useful for diagnostics. You could also call

Re: [R] function in nls argument -- robust estimation

2008-05-10 Thread Katharine Mullen
it for nlrob(); if you find a way to you it for nls() , then the same should work for nlrob(). I'm CCing this to the specialists for Robust Stats with R mailing list, R-SIG-robust. Best regards, Martin Maechler ETH Zurich KateM == Katharine Mullen [EMAIL PROTECTED] on Fri, 9 May 2008 15

Re: [R] function in nls argument

2008-05-09 Thread Katharine Mullen
Thanks for the details - it sounds like a bug. You can either send me the data in an email off-list or make it available on-line somewhere, so that I and other people can download it. On Fri, 9 May 2008, elnano wrote: Thank you Katharine. I am certain nprint is affecting my solution. Let me

Re: [R] function in nls argument

2008-05-09 Thread Katharine Mullen
://ftp.bgc-jena.mpg.de/pub/outgoing/fmoyano Katharine Mullen wrote: Thanks for the details - it sounds like a bug. You can either send me the data in an email off-list or make it available on-line somewhere, so that I and other people can download

Re: [R] function in nls argument

2008-05-09 Thread Katharine Mullen
the argument par is a list, calling summary on the output of nls.lm was not working. I'll submit the new version to CRAN soon. This disscusion has been fruitful - thanks for it. On Fri, 9 May 2008, Katharine Mullen wrote: You indeed found a bug. I can reproduce it (which I should have tried

Re: [R] function in nls argument

2008-05-08 Thread Katharine Mullen
(depending on the dataset) gives me completely wrong parameter estimates resulting in negative predicted values. Maybe someone has a suggestion here. Fernando Katharine Mullen wrote: The error message means that the gradient (first derivative of residual vector with respect to the parameter

Re: [R] NLS plinear question

2008-05-06 Thread Katharine Mullen
recall that 0 ^{-.2} = 1/0^{.2}, and that dividing by 0 gives Inf. so when 0 is in trl, part of your model for RT is Inf: trl - 0:14 p - -.2 cbind(1,trl, trl^p) trl [1,] 1 0 Inf [2,] 1 1 1.000 [3,] 1 2 0.8705506 [4,] 1 3 0.8027416 [5,] 1 4 0.7578583 [6,] 1 5

Re: [R] rzinb (VGAM) and dnbinom in optim - Solved.

2008-04-19 Thread Katharine Mullen
[EMAIL PROTECTED] 4/18/2008 6:02 PM Hi, using something like lower=c(1e-5,1e-5,1e-5),upper=c(1-1e-5,Inf,Inf) is even more safer since it sometime evaluates the function slightly outside the lower and upper limits. cheers Thomas Katharine Mullen wrote: I'm not going to look

Re: [R] rzinb (VGAM) and dnbinom in optim

2008-04-18 Thread Katharine Mullen
I'm not going to look into what's happening in-depth but it looks like the bounds for your parameters need to be set with care; the below (with slight re-def. of your residual function) gives results that seem to match vglm approximately, with 1e-10 standing in for a bound of 0 and 1-e-10 standing

Re: [R] using rbind() on multiple objects at once

2008-04-18 Thread Katharine Mullen
do.call(rbind, list.foo) On Fri, 18 Apr 2008, Andrew Yee wrote: Is there an efficient way to use rbind() with the five dataframes described in the following example: a - c(1:5) list.foo - lapply(a, function(x) data.frame(beta=a*rnorm(10), deta=a*rnorm(10))) big.data.frame -

Re: [R] Suggestions: Terminology Pkgs for following spectra over time

2008-04-17 Thread Katharine Mullen
Dear Bryan, For work in that general direction, look at the R News that was on 'R in chemistry' (Volume 6/3, August 2006, http://www.r-project.org/doc/Rnews/Rnews_2006-3.pdf) and the special vol. of the Journal of Statistical Software on 'Spectroscopy and Chemometrics in R' (vol 18,

Re: [R] replace NULL with NA in matrix

2008-04-17 Thread Katharine Mullen
if your matrix is stored in a text file then xx - read.table(x, na.strings=NULL) where x is the name of the text file. On Thu, 17 Apr 2008, Tim Smith wrote: Hi, I had a matrix with NULL values, which I wanted to replace with NA. Is there an efficient way to do this? Small sample input

Re: [R] Singular Gradient in nls

2008-03-29 Thread Katharine Mullen
you look at the number of observations, and the number of parameters, and take the smaller of the two. if the estimated rank of the weighted gradient is small than this number, you stop. On Fri, 28 Mar 2008, Katharine Mullen wrote: A QR decomposition is done on the weighted gradient matrix

Re: [R] Singular Gradient in nls

2008-03-28 Thread Katharine Mullen
A QR decomposition is done on the weighted gradient matrix; if the estimate of the rank that results is less than the number of columns in the gradient (the number of nonlinear parameters), or less than the number of rows (the number of observations), nls stops. You can see the calls in the

[R] [R-pkgs] new version of minpack.lm

2008-03-13 Thread Katharine Mullen
The package minpack.lm allows nonlinear regression problems to be addressed with a modification of the Levenberg-Marquardt algorithm based on the implementation of 'lmder' and 'lmdif' in MINPACK. Version 1.0-8 of the package is now available on CRAN. Changes in version 1.0-8 include: o

Re: [R] question

2008-03-08 Thread Katharine Mullen
It is in the VR bundle (collection of packages), which is 'recommended', so it is included in all binary distributions of R; if you have the source code you find VR in R-2.6.2/src/library/Recommended On Sat, 8 Mar 2008, Svyatkovskiy Alexey wrote: Hello, Tell me please, can I get a sourcse

Re: [R] [OT] normal (as in Guassian)

2008-03-02 Thread Katharine Mullen
There is some information and references regarding the name 'normal' in the internet article 'Earliest Known Uses of Some of the Words of Mathematics (N)', http://members.aol.com/jeff570/n.html, by John Aldrich. It contains the comment, Galton does not explain why he uses the term normal but the

Re: [R] install ncdf package on a 64-bit machine

2008-01-22 Thread Katharine Mullen
I am running 64-bit Ubuntu 7.10 and unfortunately remember seeing that error message but not how I got it to go away. I would first try compiling netcdf-3.6.2 from source, without changing the default directories for installation. Looking at the error message it seems like the 3 shared

Re: [R] Non linear regression with 2 explanatory variables

2008-01-16 Thread Katharine Mullen
Dear Rolf, One thing that sometimes makes nls easier to apply is using the 'formula' argument like you would use the 'fn' argument of optim. That is, if you have a residual function that has arguments x, y, a, b and you need to optimize a and b, you would make a call like

[R] [R-pkgs] new package 'bvls', update of 'nnls'

2007-12-03 Thread Katharine Mullen
', 'deviance' and 'residuals' o The function 'nnnpls::nnnpls' allows each element of x to be constrained to either a non-positive or a non-negative value Katharine Mullen mail: Department of Physics and Astronomy, Faculty of Sciences Vrije Universiteit Amsterdam, de Boelelaan 1081

Re: [R] Organising tick-marks in plot()

2007-11-30 Thread Katharine Mullen
something like this sounds like what you want: labs-NA x-200 for(i in 1:5){ labs-append(labs, c(rep(NA,3),x)); x-x+200 } plot(1:900, xaxt=n, xlim=c(0, 1000)) axis(side = 1, at = seq(0,1000,by=50), labels=labs) On Fri, 30 Nov 2007 [EMAIL PROTECTED] wrote: Hi Folks, I'm advising someone who's

Re: [R] How is the Gauss-Newton method compared to Levenberg-Marquardt for curve-fitting?

2007-11-20 Thread Katharine Mullen
Almost every problem I have seen in the context of fitting mixtures of exponentials/Gaussians has near-equal performance under LM or GN in terms of iterations/evaluations to convergence and the SSE of the solution found. (However, very recently I have encountered a problem with a large number of

Re: [R] specifying decimal places

2007-11-12 Thread Katharine Mullen
Your calculations are done with a precision that depends on your machine. I guess that you want to know how to _print_ more decimal digits. See how many digits you print now with getOption(digits) Change this with, e.g., options(digits=12) On Mon, 12 Nov 2007, raymond chiruka wrote: hie

Re: [R] strange `nls' behaviour

2007-11-12 Thread Katharine Mullen
I can confirm this behavior on R-2.6.0 but don't have time to look into it further at the moment. On Mon, 12 Nov 2007, Joerg van den Hoff wrote: I initially thought, this should better be posted to r-devel but alas! no response. so I try it here. sory for the lengthy explanation but

Re: [R] strange `nls' behaviour

2007-11-12 Thread Katharine Mullen
On about line 547 in nls.R there is mf$formula - # replace by one-sided linear model formula as.formula(paste(~, paste(varNames[varIndex], collapse = +)), env = environment(formula)) If this is replaced with mf$formula - # replace by one-sided linear model

Re: [R] help needed: taking a function out of a package and it can not find some funtions

2007-11-06 Thread Katharine Mullen
bw.SJ calls C code from the file /usr/local/bin/R-2.6.0/src/library/stats/src/bandwidths.c You have to make this code available. You can do the following: 1. copy bandwidths.c and the definition of bw.SJ (the latter renamed) to a directory 2. compile bandwidths.c into a shared library with the

Re: [R] help needed: taking a function out of a package and it can not find some funtions

2007-11-06 Thread Katharine Mullen
. of bw.SJ; add the argument PACKAGE=stats. On Tue, 6 Nov 2007, Katharine Mullen wrote: bw.SJ calls C code from the file /usr/local/bin/R-2.6.0/src/library/stats/src/bandwidths.c You have to make this code available. You can do the following: 1. copy bandwidths.c and the definition of bw.SJ

Re: [R] correct wording and notation for R stuff in LaTex

2007-11-02 Thread Katharine Mullen
If you are free to format your references to packages and functions as you please, you might follow the convention used by the Journal of Statistical Software. you can do this by adding the following to your latex file: \newcommand{\pkg}[1]{{\normalfont\fontseries{b}\selectfont #1}}

Re: [R] Find A, given B where B=A'A

2007-10-31 Thread Katharine Mullen
B is symmetric by definition; if it's also real positive-definite then A is the upper triangular factor of the Choleski decomposition, and you can use chol(B) to get A. On Wed, 31 Oct 2007, Michael Gormley wrote: Given a matrix B, where B=A'A, how can I find A? In other words, if I have a

Re: [R] How to make own function load automatically on startup

2007-10-27 Thread Katharine Mullen
Regarding your first issue: you could make a package to contain your function (see ?package.skeleton and the manual Writing R extensions) - then you could use library(yourpackagename). Or you could save the definition of your function(s) in a text file, and use source(textfilename) to load the

Re: [R] flipping vector and matrix

2007-10-23 Thread Katharine Mullen
sorry, just do rev on the columns (no t()): x [,1] [,2] [,3] [1,]123 [2,]456 [3,]789 apply(x,2,rev) [,1] [,2] [,3] [1,]789 [2,]456 [3,]123 On Tue, 23 Oct 2007, Katharine Mullen wrote: One way: x-1:9 rev(x

Re: [R] export R-data to VisIt

2007-10-19 Thread Katharine Mullen
Below is an example R - netCDF - R for rows of a dataframe that are numeric vectors --note however that your dataframe includes character vectors. I can't look into that case at the moment - maybe it's easy to solve, or maybe you have to do some hashing. ## begin ex. library(ncdf) dat -

Re: [R] Problems with paste and blank

2007-10-17 Thread Katharine Mullen
use sep=, e.g., paste(Laufwerk,Stadtwerksname,.csv,sep=) On Wed, 17 Oct 2007 [EMAIL PROTECTED] wrote: Hi there, I've got the following problem under Windows XP, R 2.5.1: When I'm pasting some objects: Stadtwerksname-Mannheim Laufwerk-C:\\ paste(Laufwerk,Stadtwerksname,.csv) I get

[R] [R-pkgs] new package 'nnls'

2007-10-15 Thread Katharine Mullen
. On request, I can modify this behavior. I would be interested in suggestions, bug reports, and other comments. Kate Mullen Katharine Mullen mail: Department of Physics and Astronomy, Faculty of Sciences Vrije Universiteit Amsterdam, de Boelelaan 1081 1081 HV Amsterdam, The Netherlands room: T.1.06

Re: [R] the use of the .C function

2007-10-13 Thread Katharine Mullen
Let me also comment that you are trying to interface to a function ported to C++ from the Cephes library, which is in C. You have not explained why you are trying to interface to the function (is this an exercise, or do you suspect a problem with digamma()?), but if you just want access to it as

Re: [R] Anybody has ever met the problem to add a legend to a figure generated by image()

2007-10-12 Thread Katharine Mullen
have you tried the function image.plot in the package fields? On Fri, 12 Oct 2007, zhijie zhang wrote: Dear friends, Anybody has ever met the problem to add a legend to a figure generated by image()? I have three variables,x,y and z. x and y are the coordinates, and z is the third values.

Re: [R] psi using .C with R

2007-10-10 Thread Katharine Mullen
in case you are not aware: the function psi is available without a port; see help(digamma). On Wed, 10 Oct 2007, Bernardo Lagos Alvarez wrote: Hi All, Anybody know as run the function psi on http://www.alglib.net/translator/dl/specialfunctions.psi.csharp.zip or

Re: [R] convert a tar.gz to a Windows zip

2007-10-02 Thread Katharine Mullen
Uwe Ligges seems to be providing a simple way to make the conversion (though I have not used it): http://win-builder.r-project.org/ On Mon, 1 Oct 2007, Edna Bell wrote: Dear R Gurus; Is there a simple way to convert a Linux produced tar.gz file (a package) to a Windows binary zip package,

Re: [R] R routines vs. MATLAB/SPSS Routines

2007-10-02 Thread Katharine Mullen
I would stress the advantages of the free and open source nature of R over the proprietary programs you mention. Because R is free (as in beer), your student will have access to it even when they are free of the university that I presume buys a MATLAB/SPSS license for them. And because R is open

Re: [R] Creating nice looking lists: how?

2007-09-28 Thread Katharine Mullen
The source code for print.summary.lm and summary.lm is in the file /src/library/stats/R/lm.R of the R source code, which you can download from CRAN if you don't have it already. The file lm.R is also at https://svn.r-project.org/R/trunk/src/library/stats/R/lm.R On Fri, 28 Sep 2007, Sergey

Re: [R] extracting data using strings as delimiters

2007-09-25 Thread Katharine Mullen
have you seen help(strsplit)? On Tue, 25 Sep 2007, lucy b wrote: Dear List, I have an ascii text file with data I'd like to extract. Example: Year Built: 1873 Gross Building Area: 578 sq ft Total Rooms: 6 Living Area: 578 sq ft There is a lot of data I'd like to ignore in each

Re: [R] nls fits by groups

2007-09-23 Thread Katharine Mullen
It is not clear from your post what changes per-group. If only the starting values change (but the data and the model structure are the same), then you can just store the starting values you want to use for each group in a list, and then index into this list in your call to nls. e.g., modifying

Re: [R] Smooth line in graph

2007-09-19 Thread Katharine Mullen
how about: require(splines) x-1:5 y - c(0.31, 0.45, 0.84, 0.43, 0.25) yy -predict(interpSpline(x, y)) plot(x, y) lines(yy) Katharine Mullen mail: Department of Physics and Astronomy, Faculty of Sciences Vrije Universiteit Amsterdam, de Boelelaan 1081 1081 HV Amsterdam, The Netherlands room

Re: [R] help with unit indication when plotting

2007-09-13 Thread Katharine Mullen
see ?plotmath you want to use mu for micro, as in plot(1:10, ylab = expression(paste(mu, M))) On Thu, 13 Sep 2007, Zheng Lu wrote: Dear all: Is there any one could tell me how I can represent Micro-molar as an unit of concentration when I plot with R(S-plus), I don't want write 'uM' from