similar to: Error message in as.brob Usage

Displaying 20 results from an estimated 1000 matches similar to: "Error message in as.brob Usage"

2006 Oct 31
1
setReplaceMethod
Hi If x <- 1:10 then x[5] <- 1i will promote x to be a complex vector. Suppose I have an S4 class "brob", and have functions is.brob(), as.brob(), as.numeric() and so forth (minimal self-contained code below). If x is numeric (1:10, say) and y is a brob, what is the best way to make x[5] <- y promote x to a brob in the same way as the complex example? Or is
2006 Sep 15
1
setMethod() woes
Hello everybody R version 2.4.0 alpha (2006-09-15 r39323), MacOSX 10.4.7 Next S4 problem. I have "brob" objects that are large real numbers, and now I want "glub" numbers that are to be a pair of glubs that represent complex numbers. I want to define binary operator "+" so that if either the left or right argument are glubs, it uses .ArithGlub. If either
2006 Aug 30
1
setMethod() and log()
Hi I am having difficulty with setMethod(). I have a "brob" class of objects whose representation has two slots: "x" and "positive". Slot "x" (double) holds the log of a number and slot "positive" (logical) its sign. The idea is that large numbers can be handled. I'm trying to implement a log() method using an analogue of the
2006 Sep 04
1
setMethod("Summary")
Hi everyone and thanks for being patient. I've used "!.foo"() et seq pro tem. Next problem: how to define "Summary" methods for brobs. ?max says 'max' and 'min' are generic functions: methods can be defined for them individually or via the 'Summary' group generic. For this to work properly, the arguments '...' should be
2008 May 28
1
indexing lists, using brobdingnagian
Dear R-Gurus, I have ended up with a calculation problem where I need to use brobs. I have to work my way through a vector with a for loop to act on each element in a calculation (refering to the previous value in the new vector of results -- so as far as I know I can't use "apply") -- this produces a list of brobs. My problem is, how do I act on, plot this list, or do vector
2006 Sep 01
1
setMethod("Logic", ...)
Hi In V&R the "polynomial" class is explicitly specified to have no logical operators: setMethod("Logic", signature(e1="polynomial"), function(e1,e2){stop ("...")}) I too have a class of objects for which I want to specify that Logic operators do not work, but executing setClass("brob", representation = representation
2007 Aug 30
7
Behaviour of very large numbers
Dear all, I am struggling to understand this. What happens when you raise a negative value to a power and the result is a very large number? B [1] 47.73092 > -51^B [1] -3.190824e+81 # seems fine # now this: > x <- seq(-51,-49,length=100) > x^B [1] NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN <snip> > is.numeric(x^B) [1] TRUE > is.real(x^B) [1]
2007 Nov 21
1
equivalent of Matlab robustfit?
Hi, I've been using the Matlab robustfit function for linear regressions where I suspect some data points are outliers. Is there an equivalent function in R? Take care, Darren PS, This is the Matlab help on robustfit: >> help robustfit ROBUSTFIT Robust linear regression B = ROBUSTFIT(X,Y) returns the vector B of regression coefficients, obtained by performing robust
2006 Sep 12
1
package.skeleton() in R-2.4.1
Hi R version 2.4.0 alpha (2006-09-06 r39158) MacOSX 10.4.7 There was a thread some time ago as to whether the structure created by package.skeleton() would pass R CMD check. I have an example where package.skeleton() gives an R file that gives an error when sourced. If I type setClass("brob", representation = representation
2004 Jul 13
1
MLE, precision
Hi, everyone I am trying to estimate 3 parameters for my survival function. It's very complicated. The negative loglikelihood function is: l<- function(m1,m2,b) -sum( d*( log(m1) + log(m2) + log(1- exp(-(b + m2)*t)) ) + (m1/b - d)*log(m2 + b*exp(-(b + m2)*t) ) + m1*t - m1/b*log(b+m2) ) here d and t are given, "sum" means sum over these two vairables. the parameters
2012 Feb 02
9
sqldf for Very Large Tab Delimited Files
Hi All, I have a very (very) large tab-delimited text file without headers. There are only 8 columns and millions of rows. I want to make numerous pieces of this file by sub-setting it for individual stations. Station is given as in the first column. I am trying to learn and use sqldf package for this but am stuck in a couple of places. To simulate my requirement, I have taken iris dataset as an
2003 Aug 25
1
Re: R 1.7.x and inaccurate log1p() on OpenBSD 3.2 and NetBSD 1.6 (PR#3979)
>> I have come across your reported log1p error (#2837) on a NetBSD (1.6W) >> system. I've just made further experiments on the deficient log1p() function on OpenBSD 3.2 and NetBSD 1.6 with this test program: % cat bug-log1p.c #include <stdio.h> #include <stdlib.h> #include <math.h> int main(int argc, char* argv[]) { int k; double x; for (k = 0; k
2013 Nov 07
1
R interface to C API Rf_logspace_{add,sub}?
Is there an R-language interface to the R API C-language functions Rf_logspace_add() and Rf_logspace_sub()? I don't see one but I may not looking under the right name. Various packages have functions which do that same sort of thing (log(exp(x)+exp(y)) and log(exp(x)-exp(y)) without unnecessary floating point errors). They have names like matrixStats::logSumExp(lx, na.rm=FALSE, ...)
2002 Feb 28
4
pexp.c (PR#1335)
Full_Name: M Welinder Version: 1.4 OS: (src) Submission from: (NULL) (192.5.35.38) It seems to me that pexp can be improved in the lower_tail=TRUE and log_p=FALSE case by using expm1. Something like -expm1 (-x / scale); I think. -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send
2002 Jan 25
4
How to add error bars to plot(x,y)in R?
Dear R Experts, Is there a way in R to add an error bar (say in the y direction) for each data point? Thanks Ming Chow -- __________________________________________________________________ -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help",
2002 Jan 25
4
How to add error bars to plot(x,y)in R?
Dear R Experts, Is there a way in R to add an error bar (say in the y direction) for each data point? Thanks Ming Chow -- __________________________________________________________________ -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help",
2009 May 17
2
Chow test(1960)/Structural change test
Hi,   A question on something which normally should be easy !   I perform a linear regression using lm function:   > reg1 <- lm (a b+c+d, data = database1)   Then I try to perform the Chow (1960) test (structural change test) on my regression. I know the breakpoint date. I try the following code like it is described in the “Examples” section of the “strucchange” package :   > sctest(reg1,
2017 Feb 17
4
Wish List: Extensions to the derivatives table
The derivative table resides in the function D. In S+ that table is extensible because it is written in the S language. R is faster but less flexible, since that table is programmed in C. It would be useful if R provided a mechanism for extending the derivative table, or barring that, provided a broader table. Currently unsupported mathematical functions of one argument include expm1, log1p,
2002 Jul 25
4
src/nmath/pgeom.c (PR#1834)
Full_Name: Morten Welinder Version: 1.5.1 OS: Solaris/Linux Submission from: (NULL) (192.5.35.38) The line return log(1 - p) * (x + 1); looks like it has problems for p near 1. I would suggest rewriting it to return log1p (-p) * (x + 1); -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read
2004 Jun 21
2
Cross build Makefile
Hello, I am trying to use Yan and Rossini's Makefile for cross building Windows versions of R packages in Linux with R 1.9.0. When compiling R with the mingw tools I get an error about expm1 being undeclared when first found at src/main/arithmetic.c:1019 If I fiddle a bit with it later on I also get errors about log1p bein undeclared. Any idea what should I look for? I am using R 1.9.0 in