[R] [R-SIG-Finance] regarding bootstrapping... REVISITED

2006-10-10 Thread gyadav
hi Thomas/All, I went through the thread( https://stat.ethz.ch/pipermail/r-sig-finance/2006q1/000682.html which concerns with swaps). Yeah it is correct that i would like to quote both David and Krishna that the curve interpolation may vary considerably (for e.g. any polynomial/parametric fit

[R] Goodness of fit measures for model with autocorrelation?

2006-10-10 Thread Wilson, Andrew
I wonder if anyone can help me with this query? I am undertaking textual content analyses which result in time series data (i.e., relative frequency counts of word categories in successive segments of a larger text or in successive individual texts in a temporal order). In regard to the content

Re: [R] Problem building a DLL from Fortran 90 source under Windows (with solution)

2006-10-10 Thread Prof Brian Ripley
On Mon, 9 Oct 2006, Mstislav Elagin wrote: Hi, All, I have come across a problem building a DLL from .f90 source (R 2.3.1, Windows XP). When using the R CMD SHLIB procedure, the DLL itself was being built, but its export table was empty. Among the output from R CMD SHLIB the following

Re: [R] File Encoding Warnings during package installs

2006-10-10 Thread Prof Brian Ripley
On Fri, 29 Sep 2006, Sarosh Jamal wrote: I've been getting the following warning on each package update/install (Rv2.4 on SunOS9): Each? This only applies to a few packages, and is only a warning. Warning message: 'DESCRIPTION' file has 'Encoding' field and re-encoding is not possible.

Re: [R] Rank Function

2006-10-10 Thread David Barron
y-round(c(0.68,0.95,b,c,d),2) rank(y) [1] 3.5 5.0 1.0 2.0 3.5 On 10/10/06, Li Zhang [EMAIL PROTECTED] wrote: Does anyone know why the two rank functions gives different results? I need to use the rank function in a for loop, so the sequence to be ranked is given values in the form of part

Re: [R] Rank Function

2006-10-10 Thread Gabor Grothendieck
Because y[1] and y[5] are not the same in Part1 but are in Part2: # using y from Part1 y[5] - y[1] [1] 1.110223e-16 You could round your numbers to 2 digits, say: rank(round(100*y)) # y is from Part1 [1] 3.5 5.0 1.0 2.0 3.5 On 10/10/06, Li Zhang [EMAIL PROTECTED] wrote: Does anyone know

Re: [R] Rank Function

2006-10-10 Thread Roger Bivand
On Tue, 10 Oct 2006, Gabor Grothendieck wrote: Because y[1] and y[5] are not the same in Part1 but are in Part2: # using y from Part1 y[5] - y[1] [1] 1.110223e-16 Yes, this is FAQ 7.31: Why doesn't R think these numbers are equal? i-1.94 d-2.62-i print(0.68, digits=16) [1] 0.68

[R] compiling error R-2.4.0

2006-10-10 Thread David Ruau
Hi there, I am trying to install from the source R-2.4.0 on my mac (osx 10.4.8 G5 DP) The error imply Tcl/Tk. I install it by all the way I know: darwinport, the Tcl/Tk package from the dmg available from CRAN but without success. The PATH is correct. tclConfig.sh is localised in

[R] Haplo.Stats: error (recursive default argument reference)

2006-10-10 Thread M.J. Bos
Dear colleagues, I face a problem doing haplotype analyses with haplostats: when I use the haplo.em function, the programme gives an error message because of 'recursive default argument reference.' I am not able to figure out what this means. Could you perhaps help me? The full output is the

Re: [R] copula

2006-10-10 Thread Dominique Katshunga
Dear R-helper, Is there any thing that I am doing wrong in the following codes: norm.cop - normalCopula(0.5) persp(norm.cop, dcopula) The last command produces what follows Error in persp(x, y, z, xlim, ylim, zlim, theta, phi, r, d, scale, expand, : invalid 'x' argument In addition:

Re: [R] Rank Function

2006-10-10 Thread Jim Lemon
Li Zhang wrote: Does anyone know why the two rank functions gives different results? I need to use the rank function in a for loop, so the sequence to be ranked is given values in the form of part (1). How can I use assignment like in part (1) to get correct ranks as in part (2)? Thank

[R] Surfaceplot3D with wireframe

2006-10-10 Thread Gustaf Granath
Hi, I want to make a surface3D plot of a landscape. I have cordinates (x, y, z) recorded with a GPS. The datapoints are not evenly distributed within the rectangular area. To do a fast 3D plot I used following. library(grid) library(lattice) v - read.table(clipboard) names(v) - c(x, y, z)

[R] read.table() and scientific notation

2006-10-10 Thread January Weiner
Dear all, I am having troubles importing values written as scientific notation using read.table(). I'm sure this is a frequent problem, as many people in my lab have this problem as well, so I'm sure that I just have troubles googling for the right solution. The problem is, that, given a file

[R] r 2.4.0

2006-10-10 Thread Dominique Katshunga
Can someone help interprete the error message below? i was trying to load the package copula from the R command prompt. Error in loadNamespace(package, c(which.lib.loc, lib.loc), keep.source = keep.source) : in 'copula' methods specified for export, but none defined: show, summary, persp,

Re: [R] factor levels with umlauts

2006-10-10 Thread Prof Brian Ripley
On Fri, 6 Oct 2006, Christian Bieli wrote: Hi all I have to generate some test data for import in an sql database. The database is meant for web-based data entry in a study taking place in a german speaking region, so factor levels of the variables include umlauts. The variables in the

Re: [R] solaris 64 build?

2006-10-10 Thread Prof Brian Ripley
Which Solaris is this? I am not seeing any problems with our Solaris 8 systems. Was the compiler built on that exact system? What gcc options were used (-std=gnu99, as recommended, for instance)? It looks like a system header problem: __builtin_isnan ought to be built in, not an external

Re: [R] read.table() and scientific notation

2006-10-10 Thread Gabor Grothendieck
Your example does not exhibit that behavior when I try it (below). Can you provide a reproducible example following the style shown here: Lines - a 1 2e-4 + b 2 3e-8 DF - read.table(textConnection(Lines)) str(DF) 'data.frame': 2 obs. of 3 variables: $ V1: Factor w/ 2 levels a,b: 1 2 $

Re: [R] read.table() and scientific notation

2006-10-10 Thread Prof Brian Ripley
On FC5 Linux: gannet% cat foo.dat a 1 2e-4 b 2 3e-8 gannet% R ... read.table(foo.dat) V1 V2V3 1 a 1 2e-04 2 b 2 3e-08 sapply(read.table(foo.dat), class) V1V2V3 factor integer numeric so please tell us your environment and give a reproducible example.

Re: [R] factor levels with umlauts

2006-10-10 Thread Christian Bieli
Thanks for your answer. I went round the problem by directly connect to the sql-database instead of generating a .csv file and then upload it. This works perfectly with the RODBC package and is much more suitable, too. Kind regards Christian Prof Brian Ripley schrieb: On Fri, 6 Oct 2006,

Re: [R] r 2.4.0

2006-10-10 Thread Uwe Ligges
Dominique Katshunga wrote: Can someone help interprete the error message below? i was trying to load the package copula from the R command prompt. Error in loadNamespace(package, c(which.lib.loc, lib.loc), keep.source = keep.source) : in 'copula' methods specified for export, but none

Re: [R] read.table() and scientific notation

2006-10-10 Thread January Weiner
Oh, thanks, that was hint enough :-) I see it now. I turns that R does not understand e-10 ...which stands for 1e-10 and is produced by some of the bioinformatic applications that I use (notably BLAST). However, R instead of being verbose on that just assumes that the whole column is a string.

Re: [R] read.table() and scientific notation

2006-10-10 Thread Martin C. Martin
I think the colClasses argument to read.table() is what you need. Either that, or explicitly cast columns in the data.frame that's returned by read.table(). That's how you get data types that aren't directly supported by read.table(), like various date formats. - Martin January Weiner wrote:

Re: [R] read.table() and scientific notation

2006-10-10 Thread Prof Brian Ripley
On Tue, 10 Oct 2006, January Weiner wrote: Oh, thanks, that was hint enough :-) I see it now. I turns that R does not understand e-10 ...which stands for 1e-10 and is produced by some of the bioinformatic applications that I use (notably BLAST). And that is not standard C notation.

Re: [R] bimodal / trimodal

2006-10-10 Thread Ingmar Visser
Hi, If you want parametric modes you could fit mixtures with different numbers of components and select the best model with your favourite model-selection criterion. Various packages such as mclust and fitdistr may be helpful in doing this, the cluster task view has many more:

Re: [R] read.table() and scientific notation

2006-10-10 Thread Alex Brown
A cheeky solution by subverting the coerce mechanism and read.table: # install a coerce function which can fix the e+10 syntax for an imaginary class myDouble: setAs(character, myDouble, function(from)as.double(sub('^(-?) e','\\11e',from))) Warning message: in the method signature for

[R] Fwd: read.table() and scientific notation

2006-10-10 Thread Alex Brown
note: this e-mail is supposed to precede my coerce hack one. As an example of the other posters mentioning colClasses, with some debugging notes: # create a pretend file for this example Lines - scan(sep=\n, what=) a 1 3e-8 b 2 1e+10 c 3 e-10 d 4 e+3 file - textConnection(Lines) #

[R] Survival Sample Size package / function

2006-10-10 Thread Edison Iglesias de Oliveira Vidal
Hi, My name is Edison and this is the first time I write to this list. I have been trying without success to find a package or function in R that calculates sample sizes for multiple events survival models. Does anyone have an advice that could help me? best regards, edison

[R] cokriging

2006-10-10 Thread ali bilgili
Hi, when using the script file for cokriging, is there any way to fit cross variogram other than linear, I mean what other options can I put in place of fit.lmc I ll be very appreciated if somebody who know the answer can response to me thanks

Re: [R] Block comments in R?

2006-10-10 Thread Duncan Murdoch
On 10/9/2006 10:06 AM, hadley wickham wrote: Current .Rd documentation has some obvious problems: - the parser strips comments out of examples when it runs them - there's no way to put images into the documentation - the keywords aren't much use - there's isn't a definition anywhere of what

[R] eps embedded fonts again

2006-10-10 Thread Yury Yuryev
Dear friends, I am sorry, I again rise that boring question about font embedding in EPS figure. I found some discussions on this topic but there were no strait solution. The publisher (AIP) demands submission of separate EPS file for each figure with all fonts embedded in it (even the standard

[R] generate random numbers that sum up to 1

2006-10-10 Thread sun
I am trying to generate a vector of random numbers with the constraint that they have to sum up to one with uniform distribution. eg. {0.1,0.7,0.2 } any function to do this? Thanks. __ R-help@stat.math.ethz.ch mailing list

Re: [R] generate random numbers that sum up to 1

2006-10-10 Thread Rolf Turner
As I have previously asked, in response to a similar question: Is this a homework problem? cheers, Rolf Turner [EMAIL PROTECTED] __ R-help@stat.math.ethz.ch

Re: [R] eps embedded fonts again

2006-10-10 Thread Prof Brian Ripley
On Tue, 10 Oct 2006, Yury Yuryev wrote: Dear friends, I am sorry, I again rise that boring question about font embedding in EPS figure. It gives us an opportunity to point you to the solution included in R 2.4.0. I found some discussions on this topic but there were no strait solution.

Re: [R] generate random numbers that sum up to 1

2006-10-10 Thread Peter Dalgaard
Rolf Turner [EMAIL PROTECTED] writes: As I have previously asked, in response to a similar question: Is this a homework problem? If so, he has a pretty nasty teacher... -- O__ Peter Dalgaard Ă˜ster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box

Re: [R] generate random numbers that sum up to 1

2006-10-10 Thread Peter Dalgaard
sun [EMAIL PROTECTED] writes: I am trying to generate a vector of random numbers with the constraint that they have to sum up to one with uniform distribution. eg. {0.1,0.7,0.2 } any function to do this? Thanks. Depending on what you mean by uniform, this may be a solution x-runif(3)

Re: [R] generate random numbers that sum up to 1

2006-10-10 Thread Ben Fairbank
The trick is in defining random in the face of the three apparently incompatible constraints that the numbers be random, that they sum to 1, and that they be uniformly distributed. Tell us more. Perhaps extend Peter D's solution by first deciding (at random) how many components each solution

[R] 2 linux/R environment questions

2006-10-10 Thread Leeds, Mark \(IED\)
I was working on windows xp for a while and now i am back to linux ( not sure which kind but I can find out if that helps ) and i just have two questions that are really environment R questions rather than R code questions. 1) i use emacs ( or xemacs if need be ) and i vaguely being able to cut

[R] find weighted group mean

2006-10-10 Thread Young Cho
HI, I am trying to figure out an efficient way to calculate group means and associate each entry with it. I made up an example: A = rep(rep(0:1,each=2),3) B = rep(rep(0:1,4),3) C = rep(rep(c(0,0,1,1),2),3) X =cbind(rnorm(24,0,1),runif(24,0,1),A,B,C)

Re: [R] 2 linux/R environment questions

2006-10-10 Thread Dirk Eddelbuettel
On 10 October 2006 at 10:51, Leeds, Mark \(IED\) wrote: | 1) i use emacs ( or xemacs if need be ) and i vaguely being able to cut | a line or a region in an emacs window and then paste it at my R prompt | so that it ran. Could I be mistaken | or is there an option I need to set in my

Re: [R] generate random numbers that sum up to 1

2006-10-10 Thread Duncan Murdoch
On 10/10/2006 9:53 AM, Peter Dalgaard wrote: sun [EMAIL PROTECTED] writes: I am trying to generate a vector of random numbers with the constraint that they have to sum up to one with uniform distribution. eg. {0.1,0.7,0.2 } any function to do this? Thanks. Depending on what you mean

Re: [R] find weighted group mean

2006-10-10 Thread Alex Brown
You can do it directly from the X matrix like so: by(X, as.list(as.data.frame(X[,3:5])), function(R)weighted.mean(R [1], R[2])) A: 0 B: 0 C: 0 [1] 0.4912458 A: 1 B: 0 C: 0 [1] NA

Re: [R] find weighted group mean

2006-10-10 Thread Gabor Grothendieck
Here are two ways: f1 - function(i) weighted.mean(X[i,1], X[i,2]) aggregate(list(wmean = 1:nrow(X)), as.data.frame(X[,3:5]), f1) f2 - function(x) data.frame(wmean = weighted.mean(x[,1], x[,2]), x[1, 3:5]) do.call(rbind, by(X, as.data.frame(X[,3:5]), f2)) Also you check out the na.rm= argument

[R] update.default evaluating in wrong environment?

2006-10-10 Thread Martin C. Martin
Hi all, update.default, which is the method used to update lm objects (among others), extracts the call element from it's first argument, updates it, then evaluates it in the parent.frame(). Shouldn't it be evaluated in environment(formula(object)), if that's non-NULL? I ask because I call lm

[R] .arch.uni in function call in arch test of vars package

2006-10-10 Thread Joe Byers
I have been reviewing the arch test of vars package that is based on Engle's paper. R-metrics has this as a wants/todo item. I need an arch test and thought I might accomplish two things at once or at least try. The arch test requires a varest object and I am trying to write one that will

Re: [R] Surfaceplot3D with wireframe

2006-10-10 Thread Deepayan Sarkar
On 10/10/06, Gustaf Granath [EMAIL PROTECTED] wrote: Hi, I want to make a surface3D plot of a landscape. I have cordinates (x, y, z) recorded with a GPS. The datapoints are not evenly distributed within the rectangular area. To do a fast 3D plot I used following. library(grid)

Re: [R] update.default evaluating in wrong environment?

2006-10-10 Thread Gabor Grothendieck
As a workaround use evaluate=FALSE argument to update and evaluate it yourself fetching the environment from the innards of the lm structure: f - function() { DF - data.frame(y = 1:12, x1 = gl(2, 1, 12), x2 = gl(2,6)) lm(y ~ x1, DF) } f.lm - f() e - attr(terms(f.lm), .Environment)

Re: [R] update.default evaluating in wrong environment?

2006-10-10 Thread Martin C. Martin
Gabor Grothendieck wrote: As a workaround use evaluate=FALSE argument to update and evaluate it yourself fetching the environment from the innards of the lm structure: f - function() { DF - data.frame(y = 1:12, x1 = gl(2, 1, 12), x2 = gl(2,6)) lm(y ~ x1, DF) } f.lm - f() e -

Re: [R] 2 linux/R environment questions

2006-10-10 Thread Joe Byers
Mark, you could also try rkward a gui for R from http://rkward.sourceforge.net/ or JGR. I have experimented with both because like you I have been avoiding learning ESS, and emacs just confuses me. rkward seems fine with a few quirks that I need to report as problems, like the object browser

Re: [R] update.default evaluating in wrong environment?

2006-10-10 Thread Gabor Grothendieck
It does seem strange to me too. I guess what one could say is that from an oo viewpoint the internal environment within f is the object space and update needs to be a method of it which could be arranged by including update in your lm object: f - function() { DF - data.frame(y = 1:12, x1 =

[R] Interval pls

2006-10-10 Thread Dirk De Becker
Hey R-helpers, Does anybody know of an implementation of interval PLS in R? Thx, Dirk -- Dirk De Becker Work: Kasteelpark Arenberg 30 3001 Heverlee phone: ++32(0)16/32.14.44 fax: ++32(0)16/32.85.90 Home: Waversebaan 90 3001 Heverlee phone: ++32(0)16/23.36.65

Re: [R] update.default evaluating in wrong environment?

2006-10-10 Thread Thomas Lumley
On Tue, 10 Oct 2006, Martin C. Martin wrote: Thanks, or even just: e - environment(formula(f.lm)) But this was more of a bug report. Is update.default wrong? Should it be changed? I don't see how evaluating in update's parent environment would ever be better default behavior than the

Re: [R] update.default evaluating in wrong environment?

2006-10-10 Thread Martin C. Martin
Great; thanks for the detailed explanation! - Martin Thomas Lumley wrote: On Tue, 10 Oct 2006, Martin C. Martin wrote: Thanks, or even just: e - environment(formula(f.lm)) But this was more of a bug report. Is update.default wrong? Should it be changed? I don't see how evaluating in

[R] How to assign a rank to a range of values..

2006-10-10 Thread Thomas P. Colson
From the following: basin.map - readAsciiGrid(c:/temp/area.asc, colname=area) I have a SpatialGridDataFrame which has the x and y cordinate of a cell, and the drainage area of that cell. There are many cells with a low drainage area (in my case, 33000 with an area of 37.16) and one cell with

[R] Function that operates on functions: it's ok, but the display isn't

2006-10-10 Thread Alberto Monteiro
The following code works fine: # g is the function that returns the square of a number g - function(y) y^2 # f1 is a function that takes one function # as argument, and returns another function f1 - function(f) function(x) f(x+1) - f(x) # h(x) is g(x+1) - g(x) or 2x + 1 h - f1(g) # h(1) = 3 #

Re: [R] update.default evaluating in wrong environment?

2006-10-10 Thread Duncan Murdoch
On 10/10/2006 1:32 PM, Martin C. Martin wrote: Gabor Grothendieck wrote: As a workaround use evaluate=FALSE argument to update and evaluate it yourself fetching the environment from the innards of the lm structure: f - function() { DF - data.frame(y = 1:12, x1 = gl(2, 1, 12), x2 =

Re: [R] update.default evaluating in wrong environment?

2006-10-10 Thread Gabor Grothendieck
Perhaps the evaluate= argument could be extended to allow an environment or an object for which environment(object) yields an environment, e.g. update(y ~ x2, evaluate = formula(f.lm)) On 10/10/06, Duncan Murdoch [EMAIL PROTECTED] wrote: On 10/10/2006 1:32 PM, Martin C. Martin wrote: Gabor

Re: [R] Function that operates on functions: it's ok, but the display isn't

2006-10-10 Thread Duncan Murdoch
On 10/10/2006 3:53 PM, Alberto Monteiro wrote: The following code works fine: # g is the function that returns the square of a number g - function(y) y^2 # f1 is a function that takes one function # as argument, and returns another function f1 - function(f) function(x) f(x+1) - f(x) #

Re: [R] Function that operates on functions: it's ok, but the display isn't

2006-10-10 Thread Deepayan Sarkar
On 10/10/06, Alberto Monteiro [EMAIL PROTECTED] wrote: The following code works fine: # g is the function that returns the square of a number g - function(y) y^2 # f1 is a function that takes one function # as argument, and returns another function f1 - function(f) function(x) f(x+1) -

[R] Including time in a zoo

2006-10-10 Thread Horace Tso
dear list, I have these hourly price data over a 20 year period. Among other things, I want to plot them with time on the x-axis. The data is in a data frame, head(OWI.SE.all) Record_Number Name Condition Time_PeriodPrice 1312 WECC-OWI SouthEast All

[R] rarefy a matrix of counts

2006-10-10 Thread Brian Frappier
Hi all, I have a matrix of counts for objects (rows) by samples (columns). I aimed for about 500 counts in each sample (I have about 80 samples) and would now like to rarefy these down to 100 counts in each sample using simple random sampling without replacement. I plan on rarefying several

[R] Data manipulation in columns (with apply?)

2006-10-10 Thread Bret Collier
R Users, I have written a small simulation model in R which outputs a datafile consisting of ending population sizes for each simulation run (year). The data (see short data example below) is labeled by NUM (simulation run), sim (year) and N (yearly count). After searching the help files and

Re: [R] r 2.4.0

2006-10-10 Thread victor
Uwe Ligges wrote: Dominique Katshunga wrote: Can someone help interprete the error message below? i was trying to load the package copula from the R command prompt. Error in loadNamespace(package, c(which.lib.loc, lib.loc), keep.source = keep.source) : in 'copula' methods specified for

Re: [R] Including time in a zoo

2006-10-10 Thread Gabor Grothendieck
Its saying you are trying to pass a list to zoo (a data frame is a list); however, from ?zoo we see zoo takes a first argument of: a numeric vector, matrix or a factor. On 10/10/06, Horace Tso [EMAIL PROTECTED] wrote: dear list, I have these hourly price data over a 20 year period. Among other

Re: [R] Data manipulation in columns (with apply?)

2006-10-10 Thread jim holtman
Does this start to do what you want? x - NUM sim N + 1 1 466 + 1 2 450 + 1 3 473 + 1 4 531 + 1 5 515 + 1 6 502 + 1 7 471 + 1 8 460 + 1 9 458 + 1 10 434 + 2 1 289 + 2 2 356 + 2 3 387 + 2 4 440 + 2 5 457 + 2 6 466 + 2 7 467 + 2 8 449 + 2 9 387 + 2 10 394 + 3 1 367 + 3 2 400 + 3 3 476 +

[R] R 2.4.0 can not work in Chinese windows

2006-10-10 Thread liu, jcheng
Dear list, R 2.4.0 can not work in Chinese windows. it's a bug? Thanks! -- Sincerely yours, Liu, jcheng __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] Function that operates on functions: it's ok, but the display isn't

2006-10-10 Thread Alberto Vieira Ferreira Monteiro
Deepayan Sarkar wrote: # f1 is a function that takes one function # as argument, and returns another function f1 - function(f) function(x) f(x+1) - f(x) # h(x) is g(x+1) - g(x) or 2x + 1 h - f1(g) h function(x) f(x+1)-f(x) environment: 0264BE84 Presumably, 'f' takes the value 'g' in

[R] Accessing R from Java

2006-10-10 Thread fuad
Hello All, I am Fuad from Indonesia. I am doing a research using R. I need to access R from Java. Here are my computer specifications : 1. Windows XP 2. Java 1.4.0 3. R 2.2.1 4. rJava_0.4.3.zip ; I download the binary from CRAN 5. Rserve_0.4 ; I download

Re: [R] R 2.4.0 can not work in Chinese windows

2006-10-10 Thread Duncan Murdoch
On 10/10/2006 8:30 PM, liu, jcheng wrote: Dear list, R 2.4.0 can not work in Chinese windows. it's a bug? Yes, the translations were mislabelled. R-patched fixes it. Duncan Murdoch __ R-help@stat.math.ethz.ch mailing list

[R] Question about error of non-numeric argument to binary operator

2006-10-10 Thread Yulei Gong
Hi, I have the following data and there is no binary operator contained, however, I still receive the error message when running unitrootTest function, could someone give me a guidance on it?? readClipboard() [1] 245246261.5 275.5 307284.5 289313.5 323.75 334 312.5 325

Re: [R] Question about error of non-numeric argument to binary operator

2006-10-10 Thread Marc Schwartz
On Tue, 2006-10-10 at 22:35 -0400, Yulei Gong wrote: Hi, I have the following data and there is no binary operator contained, however, I still receive the error message when running unitrootTest function, could someone give me a guidance on it?? readClipboard() [1] 245246261.5

[R] during fitting of successive datasets, stall crashes iterations

2006-10-10 Thread Warren
Hi all, I am trying to do fitting of large sets of timeseries data, and error messages derail the process when I encounter a dataset that doesn't fit. I'd like to ignore those misfits and try another equation or move to the next dataset. Any ideas? (piece of code below) Thanks,

Re: [R] during fitting of successive datasets, stall crashes iterations

2006-10-10 Thread Gabor Grothendieck
See ?try or ?tryCatch. The basic idiom is given here: https://stat.ethz.ch/pipermail/r-help/2005-May/072035.html On 10/10/06, Warren [EMAIL PROTECTED] wrote: Hi all, I am trying to do fitting of large sets of timeseries data, and error messages derail the process when I encounter a dataset

[R] Using integrate() with vectors as boundaries rather than scalars

2006-10-10 Thread Tobias
Hi all my apologies if above title is misleading, but here is my problem anyways: I need to evaluate an integral n times. Since I can't get my head around vectorization as of yet, I have coded it up in a loop, i.e.: for (i in 1:n) { z[i] - integrate(dnorm,x[i],Inf) } Since n is

Re: [R] Accessing R from Java [Broadcast]

2006-10-10 Thread Wiener, Matthew
I've had good luck with Rserve. http://stats.math.uni-augsburg.de/Rserve/ Hope this helps, Matt -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of fuad Sent: Tuesday, October 10, 2006 9:58 PM To: R-help@stat.math.ethz.ch Subject: [R] Accessing R from Java

[R] for loop not working in function

2006-10-10 Thread Dale Steele
I'm trying to write a small function (below) to compute Box Cox transformations of x for arbitrary values of lambda. I'd like to specify a range of values for lamba (min,max,step) and am having trouble getting the for loop to work. Suggestions? Any pointers to resources for learning to

Re: [R] Using integrate() with vectors as boundaries rather than scalars

2006-10-10 Thread Tobias
I think I have figured it out myself, would however like to know the opinion of more experienced coders. Is this a good way of approaching this: cumdnorm1 - function(x) {integrate(dnorm,x,Inf)} evalvec - function(x) {lapply(x,cumdnorm1)} It does return the desired result. Tobias wrote:

[R] How to solve Different Correlation Results

2006-10-10 Thread Kum-Hoe Hwang
Howdy Gurus ! I have a different correlation result from the same data. The corridor1 string variable is expressed as a number like the corridor2 number variable. -- levels(corridor1) [1] A B C D E F

Re: [R] Using integrate() with vectors as boundaries rather than scalars

2006-10-10 Thread Gabor Grothendieck
Or just: lapply(x, integrate, f = dnorm, upper = Inf) On 10/11/06, Tobias [EMAIL PROTECTED] wrote: I think I have figured it out myself, would however like to know the opinion of more experienced coders. Is this a good way of approaching this: cumdnorm1 - function(x)

Re: [R] rarefy a matrix of counts

2006-10-10 Thread Petr Pikal
Hi I am not experienced in Matlab and from your explanation I do not understand what exactly do you want. It seems that you want randomly choose a sample of 100 rows from your martix, what can be achived by sample. DF-data.frame(rnorm(100), 1:100, 101:200, 201:300) DF[sample(1:100, 10),] If