[R] unexpected par('pin') behaviour

2005-07-13 Thread joerg van den hoff
hi everybody, I noticed the following: in one of my scripts 'layout' is used to generate a (approx. square) grid of variable dimensions (depending on no. of input files). if the no. of subplots (grid cells) becomes moderately large (say 9) I use a construct like ###layout grid

Re: [R] unexpected par('pin') behaviour

2005-07-14 Thread joerg van den hoff
Martin Maechler wrote: joerg == joerg van den hoff [EMAIL PROTECTED] on Wed, 13 Jul 2005 16:00:58 +0200 writes: joerg hi everybody, joerg I noticed the following: in one of my scripts 'layout' is used to joerg generate a (approx. square) grid of variable dimensions

Re: [R] Michaelis-menten equation

2005-07-19 Thread joerg van den hoff
Chun-Ying Lee wrote: Dear R users: I encountered difficulties in michaelis-menten equation. I found that when I use right model definiens, I got wrong Km vlaue, and I got right Km value when i use wrong model definiens. The value of Vd and Vmax are correct in these two models.

Re: [R] Michaelis-menten equation

2005-07-20 Thread joerg van den hoff
I believe the following is correct: 1. first of all, as peter daalgaard already pointed out, your data Cp(t) are following a straight line very closely, i.e. 0.-order kinetics 2. for your diff. eq. this means that you are permanently in the range cp Km so that dCp/dt = - Vm/Vd = const. =: -b and,

Re: [R] R graphics

2005-07-21 Thread joerg van den hoff
Sam Baxter wrote: Hi I am trying to set up 16 graphs on one graphics page in R. I have used the mfrow=c(4,4) command. However I get a lot of white space between each graph. Does anyone know how I can reduce this? Thanks Sam __

[R] problem with lapply(x, subset, ...) and variable select argument

2005-10-10 Thread joerg van den hoff
I need to extract identically named columns from several data frames in a list. the column name is a variable (i.e. not known in advance). the whole thing occurs within a function body. I'd like to use lapply with a variable 'select' argument. example: tt - function (n) { x -

Re: [R] problem with lapply(x, subset, ...) and variable select argument

2005-10-11 Thread joerg van den hoff
is the environment in tt. On 10/10/05, joerg van den hoff [EMAIL PROTECTED] wrote: I need to extract identically named columns from several data frames in a list. the column name is a variable (i.e. not known in advance). the whole thing occurs within a function body. I'd like to use lapply

Re: [R] nls convergence problem

2006-08-16 Thread Joerg van den Hoff
Earl F. Glynn wrote: Berton Gunter [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Or, maybe there's something I don't understand about the algorithm being used. Indeed! So before making such comments, why don't you try to learn about it? Doug Bates is a pretty smart guy, and

Re: [R] Intro to Programming R Book

2006-08-24 Thread Joerg van den Hoff
Raphael Fraser wrote: I am new to R and am looking for a book that can help in learning to program in R. I have looked at the R website suggested books but I am still not sure which book best suite my needs. I am interesting in programming, data manipulation not statistics. Any suggestions?

Re: [R] extremely slow recursion in R?

2006-08-25 Thread Joerg van den Hoff
Thomas Lumley wrote: On Thu, 24 Aug 2006, Jason Liao wrote: I recently coded a recursion algorithm in R and ir ran a few days without returning any result. So I decided to try a simple case of computing binomial coefficient using recusrive relationship choose(n,k) = choose(n-1,

Re: [R] How to generate the random numbers uniformly distributed on the unit disc?

2006-10-09 Thread Joerg van den Hoff
S.Q. WEN wrote: Hi, I want to get random number which is uniformly distributed on the unit disc. How can I do that with R? Best wishes, WAN WAN [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list

[R] german umlaut problem under MacOS

2004-12-15 Thread joerg van den hoff
I did not find this in the archive (hope it isn't there...): the current release of R (2.0.1) for MacOS (10.3.6) seems not to handle german special characters like '' correctly: f - '' can be entered at the prompt, but echoing the variable yields [1] \303\274 (I think the unicode of the

Re: [R] R does not support UTF-8 (was german umlaut problem under MacOS)

2004-12-15 Thread joerg van den hoff
are not currently supported Solution: do not use an unsupported locale. On Wed, 15 Dec 2004, joerg van den hoff wrote: I did not find this in the archive (hope it isn't there...): the current release of R (2.0.1) for MacOS (10.3.6) seems not to handle german special characters like '' correctly: I get two

[R] background color for plotting symbols in 'matplot'

2005-01-18 Thread joerg van den hoff
something like matplot2(matrix(1:6,3,2),matrix(7:12,3,2),pch=21,bg=c(2,3),type='b') does not yield the expected (at least by me) result: only the points on the first line get (successively) background colors for the plotting symbols, the second line gets no background color at all for its

Re: [R] background color for plotting symbols in 'matplot'

2005-01-19 Thread joerg van den hoff
thanks for the response. Uwe Ligges wrote: joerg van den hoff wrote: something like matplot2(matrix(1:6,3,2),matrix(7:12,3,2),pch=21,bg=c(2,3),type='b') Where can we find matplot2? oops. that should have been 'matplot' (not 'matplot2'), of course. does not yield the expected (at least by me

Re: [R] more question

2005-01-25 Thread joerg van den hoff
Cuichang Zhao wrote: Hello, thank you very much for your help in last email. it is very helpful. right now, i have more questions about my project, 1. solve can i remove the NA from a vectors: for exmample, if my vector is: v - (NA, 1, 2, 3, 4, 5) which should read v - c(NA, 1, 2, 3, 4, 5):

Re: [R] plot function

2005-01-26 Thread joerg van den hoff
Cuichang Zhao wrote: Hello, how can use change the plot function to change the range of axises. I want my graph from a certain range [a, b], instead of from the min to max of of datas? if i want draw a line instead of dots, should i use both plot and lines function. for example: plot(x, y);

Re: [R] Installation problem MacOS X

2005-03-18 Thread joerg van den hoff
Hector L. Ayala-del-Rio wrote: R gurus I have tried to install the R 2.0.1 binary for OS X and although the installation was successful I can get the application going. When I double click the icon R tries to load (R window shows briefly) and it quits immediately. This behavior was

Re: [R] OS X proxy question

2005-03-22 Thread joerg van den hoff
Drew Balazs wrote: All, I'm currently using R 2.0.1 on a Powerbook G4 with OS X 10.3.8. So far the only way I've found to set my proxy is by doing Sys.putenv(http_proxy=insert proxy url:proxy port) everytime I start up R. This works fine, but I'd like to find a solution that doesnt require

[R] y-label on right hand side of plot

2005-03-31 Thread joerg van den hoff
Is there a better way than: par(mar=c(6,6,6,6)) plot(1:10,yaxt=n,ylab=) axis(4) text(12,5.5,'y-label',xpd=T,srt=90) to get the y-ticks _and_ the y-label to the rhs of the plot? I did not find anything in the 'par', 'plot', 'axis' and 'title' manpages to solve the problem. (the above is ugly,

[R] double backslashes in usage section of .Rd files

2005-04-04 Thread joerg van den hoff
I have written a package, where a function definition includes a regexp pattern including double backslashes, such as myfunction - function (pattern = .*\\.txt$) when I R CMD CHECK the corresponding .Rd file, I get warnings (code/documentation mismatch), if I enforce two backslashes in the

Re: [R] boxplot - labelling

2006-05-08 Thread Joerg van den Hoff
Sachin J wrote: Hi, How can I get the values of mean and median (not only points but values too) on the boxplot. I am using boxplot function from graphics package. Following is my data set df [1] 5 1 1 0 0 10 38 47 2 5 0 28 5 8 81 21 12 9 1 12 2 4 22 3

Re: [R] Can't there be a cd command?

2006-05-10 Thread Joerg van den Hoff
Issac Trotts wrote: On 5/9/06, Prof Brian Ripley [EMAIL PROTECTED] wrote: On Wed, 10 May 2006, Peter Dalgaard wrote: Issac Trotts [EMAIL PROTECTED] writes: I'm on Linux, so it didn't occur to me to look in the Windows FAQ until it came up in the Google search. Why should Windows users be

Re: [R] Can't there be a cd command?

2006-05-16 Thread Joerg van den Hoff
Manuel López-Ibáñez wrote: Jan T. Kim wrote: That's an idea I like very much too -- much better than the currently popular idea of protecting users from the unfriendliness of programming, anyway... It is just my opinion that the amount of mail in R-help speaks volumes about the current

Re: [R] Can't there be a cd command?

2006-05-17 Thread Joerg van den Hoff
Duncan Murdoch wrote: On 5/16/2006 5:46 AM, Joerg van den Hoff wrote: Manuel López-Ibáñez wrote: Jan T. Kim wrote: That's an idea I like very much too -- much better than the currently popular idea of protecting users from the unfriendliness of programming, anyway... It is just my opinion

Re: [R] help

2006-05-19 Thread Joerg van den Hoff
karim99.karim wrote: Dear Sir, I’am a frensh student and i’am a new user of the R software. After using the command (x-read.delim(“clipboard”) to read a spreadsheet of Excel, I want to run the bds test and calculate the Lyapunov exponent. I have charged the R software by the packages

Re: [R] problem with pdf() R 2.2.1, os 10.4.6

2006-05-20 Thread Joerg van den Hoff
Marc Schwartz wrote: On Fri, 2006-05-19 at 16:36 -0700, Betty Gilbert wrote: Hi, I'm trying to write a histogram to a pdf pdf() plot-hist(c, xlim=c( 0.69, 0.84), ylim=c(0,100)) when I try to open the pdf I can't open it, there is always some error . Is there something I should add to

Re: [R] nls fitting

2006-05-22 Thread Joerg van den Hoff
Lorenzo Isella wrote: Dear All, I may look ridiculous, but I am puzzled at the behavior of the nls with a fitting I am currently dealing with. My data are: x N 1 346.4102 145.428256 2 447.2136 169.530634 3 570.0877 144.081627 4 721.1103 106.363316 5 894.4272

Re: [R] Building packages in R - 'private' functions

2006-06-07 Thread Joerg van den Hoff
Dan Rabosky wrote: Hello. I am creating an R package that I'd like to submit to CRAN (OS Windows XP). How do I distinguish among 'public' functions, e.g., those that are intended to be called by users of the package and for which I am providing documentation examples, and 'private'

Re: [R] solving first-order differential equation

2006-06-12 Thread Joerg van den Hoff
ZhanWu Dai wrote: I am an initial user of R. Could you give me some explanations or examples on how to solve the first order differential equations by the first-order Runge-Kutta method? Thank you very much Kind regards

Re: [R] plot two graphs with different length of data

2006-06-13 Thread Joerg van den Hoff
Eric Hu wrote: Hi I am trying to plot two data set in the same picture window without overlapping with each other. I am using the format plot(x1,y1,x2,y2) but get the following error message: plot(as.numeric(r0[,4]),as.numeric(r0[,7]),as.numeric(r0[,4]),as.numeric(r0[,7][ind[,1]])) Error in

Re: [R] Access and assign list sub-elements using a string suchas l$a$b

2006-06-15 Thread Joerg van den Hoff
Petr Pikal wrote: Hi yes you are correct, I remembered there is something with eval from older posts but did not find a connection to parse from eval help page. Shouldn't there be a link? Or even an example? would be a good thing to do (there only is a link from parse to eval). after all

Re: [R] can I call user-created functions without source() ?

2006-06-19 Thread Joerg van den Hoff
Duncan Murdoch wrote: On 6/19/2006 6:25 AM, (Ted Harding) wrote: On 19-Jun-06 Rob Campbell wrote: Hi, I have to R fairly recently from Matlab, where I have been used to organising my own custom functions into directories which are adding to the Matlab search path. This enables me to call

Re: [R] can I call user-created functions without source() ?

2006-06-19 Thread Joerg van den Hoff
Duncan Murdoch wrote: Just a few comments below on alternative ways to do the same things: On 6/19/2006 8:19 AM, Joerg van den Hoff wrote: for short term usage of some specialized functions I have added some lines to the `.Rprofile' in my home(!) directory as follows (probably

Re: [R] can I call user-created functions without source() ?

2006-06-19 Thread Joerg van den Hoff
Duncan Murdoch wrote: On 6/19/2006 10:19 AM, Joerg van den Hoff wrote: Duncan Murdoch wrote: Just a few comments below on alternative ways to do the same things: On 6/19/2006 8:19 AM, Joerg van den Hoff wrote: for short term usage of some specialized functions I have added some lines

Re: [R] Function hints

2006-06-19 Thread Joerg van den Hoff
hadley wickham wrote: One of the recurring themes in the recent UserR conference was that many people find it difficult to find the functions they need for a particular task. Sandy Weisberg suggested a small idea he would like to see: a hints function that given an object, lists likely

Re: [R] Function hints

2006-06-20 Thread Joerg van den Hoff
Jonathan Baron wrote: On 06/19/06 13:13, Duncan Murdoch wrote: `help.search' does not allow full text search in the manpages (I can imagine why (1000 hits...), but without such a thing google, for instance, would probably not be half as useful as it is, right?) and there is no sorting by

Re: [R] Function hints

2006-06-20 Thread Joerg van den Hoff
hadley wickham wrote: what I really would love to see would be an improved help.search(): on r-devel I found a reference to the /concept tag in .Rd files and the fact that it is rarely used (again: I was not aware of this :-( ...), which might serve as keyword container suitable for improving

Re: [R] $

2006-06-20 Thread Joerg van den Hoff
Davis, Jacob B. wrote: If object is user defined is: object$df.residual the same thing as df.residual(object) This is my first time to encounter the $ sign in R, I'm new. I'm reviewing summary.glm and in most cases it looks as though the $ is used to extract

Re: [R] Basic package structure question

2006-06-23 Thread Joerg van den Hoff
directory 3.) transfer this archive to the Windows machine 4.) unzip directly into the desired library destination this procedure up to now always worked including properly installed manpages (text + html (and I hope this remains the case in the future...) joerg van den hoff

Re: [R] Basic package structure question

2006-06-23 Thread Joerg van den Hoff
Prof Brian Ripley wrote: On Fri, 23 Jun 2006, Joerg van den Hoff wrote: just to confirm duncan murdochs remark: our Windows machines lack proper development environments (mainly missing perl is the problem for pure R-code packages, I believe?) and we bypass this (for pure R-code packages

[R] problem with code/documentation mismatch

2006-06-23 Thread Joerg van den Hoff
' section in the Rd file reads =cut== \usage{ x/y } =cut== which, of course is the desired way to use the function. what am I doing wrong, i.e. how should I modify the Rd file? maybe obvious, but not to me. joerg van den

Re: [R] About filled.contour function

2006-06-26 Thread Joerg van den Hoff
Prodromos Zanis wrote: Dear R-projects users I would like like to ask if there is any way to produce a multipanel plot with the filled.contour function. In the help information of filled contour it is said that this function is restricted to a full page display. With kind regards

Re: [R] R on MAC OS X

2006-06-27 Thread Joerg van den Hoff
Sara Mouro wrote: Dear all, I have been usig R for some time, but now I have a MAC instead of a PC, am I am having problems in reading files... I have tried: Data-read.table(Users/SaraMM/PhD/Analises-LitterBags/Dados- Litter.txt,head=T) but it said: Error in file(file, r) : unable

Re: [R] Help needed understanding eval,quote,expression

2006-06-29 Thread Joerg van den Hoff
Prof Brian Ripley wrote: You are missing eval(parse(text=)). E.g. x - list(y=list(y1=hello,y2=world),z=list(z1=foo,z2=bar)) (what do you mean by the $ at the start of these lines?) eval(parse(text=x$y$y1)) [1] hello However, bear in mind fortune(parse) If the answer is parse() you

Re: [R] Optional variables in function?

2006-07-03 Thread Joerg van den Hoff
jim holtman wrote: ?missing On 7/2/06, Jonathan Greenberg [EMAIL PROTECTED] wrote: I'm a bit new to writing R functions and I was wondering what the best practice for having optional variables in a function is, and how to test for optional and non-optional variables? e.g. if I have the

Re: [R] simple question about variables....

2006-07-13 Thread Joerg van den Hoff
Stéphane Cruveiller wrote: Dear R users, I have a simple question on variable manipulation. Imagine I have an object OBJ that has toto as one of its variables. I would like to understand why if I do varname - toto OBJ$varname returns no results whereas

Re: [R] colors on graph

2006-07-14 Thread Joerg van den Hoff
Jim Lemon wrote: COMTE Guillaume wrote: Hy all, I need to draw something in 2 dimension that has 3 dimension, the choice has been made to use colors to display the third dimension into the graph. Has someone done something like that, i can't figure out how to parametize the

Re: [R] least square fit with non-negativity constraints for absorption spectra fitting

2006-07-14 Thread Joerg van den Hoff
Xu, Xiuli (NIH/NHLBI) [E] wrote: I would really appreciate it if someone can give suggestions on how to do spectra fitting in R using ordinary least square fitting and non-negativity constraints. The lm() function works well for ordinary least square fitting, but how to specify non-negativity

[R] bug in map('world') ?

2006-03-08 Thread Joerg van den Hoff
hi, did'nt see anything in the archive: map('world',pro='rectangular',para=0) yields a strange artifact (horizontal bar) extending over the whole map at a certain latitude range (approx 65 deg. north), whereas map('world',pro='rectangular',para=180) (which should be the same) does not show

[R] symbols plot

2006-03-29 Thread Joerg van den Hoff
before getting scolded for submitting a (non-)bug report: when using the 'symbols' function for plotting boxplot data (i.e. using 'boxplots' symbols), I noted that the x/y-position of the symbols is associated with the center of the box. while this is obviously natural for a usual plotting

Re: [R] Confidence intervals for predicted values in nls

2004-06-07 Thread joerg van den hoff
Cristina Silva wrote: Dear all I have tried to estimate the confidence intervals for predicted values of a nonlinear model fitted with nls. The function predict gives the predicted values and the lower and upper limits of the prediction, when the class of the object is lm or glm. When the object

[R] scoping rules

2004-06-08 Thread joerg van den hoff
is there a good way to get the following fragment to work when calling it as wrapper(1) ? # cut here== wrapper - function (choose=0) { x - seq(0,2*pi,len=100) y - sin(1.5*x); y - rnorm(y,y,.1*max(y)) if (choose==0) { rm(fifu,pos=1) fifu - function(w,x)

Re: [R] Is there an R-version of rayplot

2004-06-09 Thread joerg van den hoff
maybe this qd try helps? #=cut herer= vectorplot - function (field) { #input is a (N x 4 array) of N vectors: # field[,1:2] - x/y position of vectors # field[,3:4] - x/y componnent of vectors # plotted are the 2-D vectors attached to the specified

[R] nls and R scoping rules

2004-06-10 Thread joerg van den hoff
I apologize for posting this in essence the second time (no light at the end of the tunnel yet..): is there a way to enforce that nls takes both, the data *and* the model definition from the parent environment? the following fragment shows the problem. # cut here== wrapper -

Re: [R] nls and R scoping rules

2004-06-10 Thread joerg van den hoff
Prof Brian Ripley wrote: On Thu, 10 Jun 2004, Prof Brian Ripley wrote: Around R 1.2.x the notion was introduced that variables should be looked for in the environment of a formula. Functions using model.frame got converted to do that, but nls did not. I guess that the best way forward is

Re: [R] Modifying Code in .rda based packages (e.g. lme4)

2004-06-14 Thread joerg van den hoff
Prof Brian Ripley wrote: No standard R package is supplied as a .rda, including not lme4. You must be looking at a binary installation, and you would do best to reinstall from the sources. You could use R --vanilla load(/all.rda) fix(GLMM) save(ls(all=T), file=/all.rda, compress = TRUE)

Re: [R] How to break an axis?

2005-05-24 Thread joerg van den hoff
Bo Peng wrote: Dear list, I need to plot four almost horizontal lines with y-values around 1,3,4, 400. If I plot them directly, the first three lines will be indiscernible so I am thinking of breaking y-axis into two parts, one with range (0,5), another (395,400). Is there an easy way to do

Re: [R] values of bars in barplot

2005-05-30 Thread joerg van den hoff
luc tardieu wrote: Hi, I couldn't find how to have the values written on the top of each bar in a barplot. When using hist(), it is possible to use labels=T, but this option does not seem to exist for barplot(). Is there a trick I could use to do that ? Thanks to all Luc

[R] X11() and pseudo color

2005-05-31 Thread joerg van den hoff
we are running R under Solaris with SunRay Terminals, which are set to 8 bit color to comply with some other software. In this configuration, X11() opens with colortype=true, i.e., it is not recognized that actually the display is only 8 bit. This leads to error messages (advising to use

[R] x11 and pseudo-color

2005-06-01 Thread joerg van den hoff
for some reason the following message seems not to have reached the list in the first try, at least I can't find it. my apologies if this is my fault: we are running R under Solaris with SunRay Terminals, which are set to 8 bit color to comply with some other software. In this configuration,

[R] nls(() and trace

2005-06-01 Thread joerg van den hoff
hi everybody, is there a canonical way to get hold of the trace=TRUE output from nls, i.e. to copy it to a R variable (or at least to an external log file)? I have only found the possibility to fix(nlsModel) (and than the correct copy of that: namespace function ...) within the R-session by

[R] nls and weighting

2005-11-30 Thread Joerg van den Hoff
I posted this a week ago on r-devel but to no avail and hope this not considered cross-posting: ===cut=== hi everybody, which each release I hope that the section weights: an optional numeric vector of (fixed) weights. When present,

[R] inconsistent behaviour of ifelse and if ... else

2005-12-21 Thread Joerg van den Hoff
is the behaviour val - ifelse(TRUE, numeric(0), 123) val #NA intended or is it a bug, i.e. should an empty object be returned as might be expected(also in comparsion to what an explicit val - {if(TRUE) numeric(0) else 123} yields)? thanks, joerg

[R] sapply problem

2006-12-14 Thread Joerg van den Hoff
I have encountered the following problem: I need to extract from a list of lists equally named compenents who happen to be 'one row' data frames. a trivial example would be: a - list(list( df = data.frame(A = 1, B = 2, C = 3)), list(df = data.frame(A = 4,B = 5,C = 6))) I want the extracted

Re: [R] Delete all dimnames

2006-12-14 Thread Joerg van den Hoff
Serguei Kaniovski wrote: Hello, how can I get rid of all dimnames so that: $amat Var3 Var2 Var1 8 1111 1 1 1 1 0 0 0 0 0 0 0 7 1110 1 0 0 0 1 0 0 0 0 0 0 6 1101 0 1 0 0 0 1 0 0 0 0 0 5 1100 0 0 0 0 0 0 1 0 0 0 0 4 1011 0 0 1

Re: [R] Better way to change the name of a column in a dataframe?

2006-12-14 Thread Joerg van den Hoff
Ben Fairbank wrote: Hello R users -- If I have a dataframe such as the following, named frame with the columns intended to be named col1 through col6, frame col1 col2 cmlo3 col4 col5 col6 [1,]3 10 2657 [2,]68 4 1071

Re: [R] sapply problem

2006-12-15 Thread Joerg van den Hoff
Sundar Dorai-Raj wrote: Joerg van den Hoff said the following on 12/14/2006 7:30 AM: I have encountered the following problem: I need to extract from a list of lists equally named compenents who happen to be 'one row' data frames. a trivial example would be: a - list(list( df

Re: [R] [[ gotcha

2007-01-16 Thread Joerg van den Hoff
Robin Hankin wrote: The following gotcha caught me off-guard just now. I have two matrices, a and b: a - matrix(1,3,3) b - matrix(1,1,1) (note that both a and b are matrices). I want them in a list: B - NULL B[[1]] - a B[[2]] - b B [[1]] [,1] [,2] [,3] [1,]

Re: [R] Confindence interval for Levenberg-Marquardt fit

2007-02-21 Thread joerg van den hoff
On Wed, Feb 21, 2007 at 11:09:52AM +, Prof Brian Ripley wrote: Well, the algorithm used does not affect the confidence interval (provided it works correctly), but what is nls.ml (presumably in some package you have not mentioned) and why would I want to use an old-fashioned algorithm?

Re: [R] Confindence interval for Levenberg-Marquardt fit

2007-02-21 Thread Joerg van den Hoff
On Wed, Feb 21, 2007 at 09:41:29AM -0600, Douglas Bates wrote: On 2/21/07, joerg van den hoff [EMAIL PROTECTED] wrote: On Wed, Feb 21, 2007 at 11:09:52AM +, Prof Brian Ripley wrote: Well, the algorithm used does not affect the confidence interval (provided it works correctly), but what

[R] R CMD CHECK question

2007-02-22 Thread Joerg van den Hoff
hi, I have two private packages, the first (`pkc') depending on the second one (`roiutils'). The source code and DESCRIPTION files describes the dependency as it should be ('Imports', `require'), at least I think so. now, running R CMD CHECK pkc yields the following output in which I have

Re: [R] pdf with an exact size

2007-02-23 Thread Joerg van den Hoff
On Fri, Feb 23, 2007 at 04:24:54PM -0200, Alberto Monteiro wrote: Is it possible to create a pdf output file with an (as nearly as possible) exact size? For example, if I want to draw in an A4 paper (210 x 297 mm) a square of 100 x 100 mm, how can I do it? FWIW, about 6 months ago I

Re: [R] str() to extract components

2007-02-27 Thread Joerg van den Hoff
On Tue, Feb 27, 2007 at 03:52:54PM -, Simon Pickett wrote: Hi, I have been dabbling with str() to extract values from outputs such as lmer etc and have found it very helpful sometimes. but only seem to manage to extract the values when the output is one simple table, any more

Re: [R] Double-banger function names: preferences and suggestions

2007-03-02 Thread Joerg van den Hoff
On Thu, Mar 01, 2007 at 10:31:08AM -0700, Jason Barnhart wrote: Definitely not #2. Prefer #1 but #3 is ok as well. Definitely not #1. Prefer #2 but #3 is ok as well. there is nothing like unanimous agreement :-) but in earnest: I don't think #1 is good on the already mentioned

Re: [R] from function to its name?

2007-03-02 Thread Joerg van den Hoff
On Fri, Mar 02, 2007 at 03:42:46PM +0100, Ido M. Tamir wrote: Hi, I can get from a string to a function with this name: f1 - function(x){ mean(x) } do.call(f1,list{1:4}) get(f1) etc... But how do I get from a function to its name? funcVec - c(f1,median) funcVec [[1]]

[R] R CMD CHECK question

2007-03-05 Thread Joerg van den Hoff
hi, second try... I ran into problems when checking one of my packages with R CMD CHECK: I have two packages, the first (named `pkc') depending on the second one (named `roiutils'). The source code and DESCRIPTION files describes the dependency as it should be, I think ('Imports', `require').

Re: [R] Some problems with X11

2007-03-08 Thread Joerg van den Hoff
On Wed, Mar 07, 2007 at 05:21:52PM -0700, Rafael Rosolem wrote: Hi, I am really new with R, so I don't know anything about it. I have written a script (attached) which tries to do really basic stuff (such as computing basic statistics and basic plots). When I try to plot a histogram and

Re: [R] reading a text file with a stray carriage return

2007-03-08 Thread Joerg van den Hoff
On Thu, Mar 08, 2007 at 10:11:06AM -, Ted Harding wrote: On 08-Mar-07 jim holtman wrote: How do you define a carriage return in the middle of a line if a carriage return is also used to delimit a line? One of the things you can do is to use 'count.fields' to determine the number of

Re: [R] Deconvolution of a spectrum

2007-03-09 Thread Joerg van den Hoff
On Fri, Mar 09, 2007 at 01:25:24PM +0100, Lukasz Komsta wrote: Dear useRs, I have a curve which is a mixture of Gaussian curves (for example UV emission or absorption spectrum). Do you have any suggestions how to implement searching for optimal set of Gaussian peaks to fit the curve? I

Re: [R] replacing all NA's in a dataframe with zeros...

2007-03-15 Thread Joerg van den Hoff
On Thu, Mar 15, 2007 at 10:21:22AM +0100, Peter Dalgaard wrote: Gavin Simpson wrote: On Wed, 2007-03-14 at 20:16 -0700, Steven McKinney wrote: Since you can index a matrix or dataframe with a matrix of logicals, you can use is.na() to index all the NA locations and replace them all

Re: [R] nls.control( ) has no influence on nls( ) !

2007-04-16 Thread Joerg van den Hoff
On Mon, Apr 16, 2007 at 09:03:27AM +0200, Martin Maechler wrote: Yuchen == Yuchen Luo [EMAIL PROTECTED] on Sun, 15 Apr 2007 12:18:23 -0700 writes: Yuchen Dear Friends. Yuchen I tried to use nls.control() to change the 'minFactor' in nls( ), but it Yuchen does not seem to

[R] code/documentation mismatch with backslashes in argument list

2007-05-04 Thread Joerg van den Hoff
I have a function definition such as f - function (pattern = .*\\.txt) {} in the manpage this has to be documented as f - function (pattern = .*.txt) in order to get the correct display (with double backslash) in the R console when issuing `?f', but this causes complains from `R CMD

Re: [R] save intermediate result

2007-05-04 Thread Joerg van den Hoff
On Fri, May 04, 2007 at 03:45:10PM -0400, Weiwei Shi wrote: hi, is there a way to save a R object into workspace instead of into a file during a running of function? if I understand the question correctly you want the 'super-assignment' operator `-' as in -cut--- R

Re: [R] save intermediate result

2007-05-05 Thread Joerg van den Hoff
(-)'). if some codes as followed have bugs, my f1 function cannot return anything, which means I have to re-run the time-consuming line again. you probably should debug it using some dummy data instead of the f2() call... thanks, Weiwei On 5/4/07, Joerg van den Hoff [EMAIL PROTECTED

Re: [R] Reducing the size of pdf graphics files produced with R

2007-05-22 Thread Joerg van den Hoff
On Tue, May 22, 2007 at 01:06:06PM -0400, Chabot Denis wrote: Thank you Prof. Ripley. Believe me, I do not have the skills to contribute such a thing as a stream compressor and I DO appreciate the work and usefulness of the pdf device as it is. I do most of my plots with pdf device, the

Re: [R] Reducing the size of pdf graphics files produced with R

2007-05-23 Thread Joerg van den Hoff
On Wed, May 23, 2007 at 07:24:04AM -0700, Waichler, Scott R wrote: as you are using MacOS X, you'll have ghostscript installed anyway. so try in R `dev2bitmap' with `type =pdfwrite'. I believe `gs' _does_ include compression. a quick test showed at least a reduction by about a factor of 2

Re: [R] Reducing the size of pdf graphics files produced with R

2007-05-24 Thread Joerg van den Hoff
://hydrology.pnl.gov --- -Original Message- From: Joerg van den Hoff [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 23, 2007 9:25 AM To: Waichler, Scott R Cc: r-help@stat.math.ethz.ch; [EMAIL PROTECTED

Re: [R] How to store the parameter estimated by nls( ) to a variable?

2007-08-13 Thread Joerg van den Hoff
On Sun, Aug 12, 2007 at 10:50:59AM -0700, Yuchen Luo wrote: Dear Professor Murdoch. Thank you so much Best Wishes Yuchen Luo On 8/12/07, Duncan Murdoch [EMAIL PROTECTED] wrote: Yuchen Luo wrote: Dear Colleagues. I believe this should be a problem encountered by many:

[R] weighted nls and confidence intervals

2007-08-23 Thread Joerg van den Hoff
for unweighted fits using `nls' I compute confidence intervals for the fitted model function by using: #--- se.fit - sqrt(apply(rr$m$gradient(), 1, function(x) sum(vcov(rr)*outer(x,x luconf - yfit + outer(se.fit, qnorm(c(probex, 1 - probex))) #--- where `rr'

[R] non-linear fitting (nls) and confidence limits

2007-09-01 Thread Joerg van den Hoff
dear list members, I apologize in advance for posting a second time, but probably after one week chances are, the first try went down the sink.. my question concerns computation of confidence intervals in nonlinear fits with `nls' when weigthing the fit. the seemingly correct procedure does not

Re: [R] 'singular gradient matrix? when using nls() and how to make the program skip nls( ) and run on

2007-09-07 Thread Joerg van den Hoff
On Wed, Sep 05, 2007 at 04:43:19PM -0700, Yuchen Luo wrote: Dear friends. I use nls() and encounter the following puzzling problem: I have a function f(a,b,c,x), I have a data vector of x and a vectory y of realized value of f. Case1 I tried to estimate c with (a=0.3,