Displaying 20 results from an estimated 5000 matches similar to: "Command-line history not working..."
2002 Jan 06
1
How to get setGeneric() to work?
Dear all, I can't see how setGeneric() works. I know perfectly well how to
define
library(methods);
setClass("Square", representation(side="numeric"));
# Will become the default method.
getArea <- function(object) {
stop(paste("Method getArea() is not defined for this class:",
data.class(object)));
}
setMethod("getArea",
2002 Mar 07
2
Is it possible to open a specific file in the HTML browser like help(htmlhelp=TRUE) does?
Dear all/anyone, after generating a HTML file "result.html" from within [R],
I would like to open the default HTML browser (like help.start() does) to
show the file. Is it possible to do this (without trying to do a system
dependent search for possible browsers)? I browsed the source of package
'base' (R v1.4.1 WinMe) and I found the following in help():
2002 Jan 09
0
methods: Extending classes
Hi (again), let's say I want to create a class Matrix that extends the class
matrix, but I can't get it to work. I define the class as
> setClass("Matrix", "matrix")
> getClass("Matrix")
No Slots, prototype of class "matrix"
Extends:
Class "matrix" directly.
Class "structure" by class "matrix".
2002 Jun 27
2
Fastest way to find the last index k such that x[k] < y in a sorted vector x?
Hi, I am trying to find the fastest way to
"find the last index k such that x[k] < y in a *sorted* vector x"
These are my two alternatives:
x <- sort(rnorm(1e4))
y <- 0.2
# Alt 1
k <- max(1, sum(x < y))
# Alt 2 "divide and conquer"
lastIndexLessThan <- function(x, y) {
k0 <- 1; k1 <- length(x)
while ((dk <- (k1 - k0)) >
2002 Feb 26
1
abs() on data frames?!
I might be wrong, but didn't the following work before R v1.4.x?
R --vanilla
> df <- data.frame(-10:10)
> abs(df)
Error in abs(df) : non-numeric argument to function
I have tried this on both Rv1.4.1 on WinMe and Rv1.4.0 on Solaris 8. I
regexp searched bugs.r-project.org on "abs" but I found nothing about this.
I can't see why abs(df) shouldn't work when sqrt(df),
2002 Feb 26
1
abs() on data frames?!
I might be wrong, but didn't the following work before R v1.4.x?
R --vanilla
> df <- data.frame(-10:10)
> abs(df)
Error in abs(df) : non-numeric argument to function
I have tried this on both Rv1.4.1 on WinMe and Rv1.4.0 on Solaris 8. I
regexp searched bugs.r-project.org on "abs" but I found nothing about this.
I can't see why abs(df) shouldn't work when sqrt(df),
2001 Nov 16
0
Best/safest way to use UseMethod()?
I raised the questions below a couple of months ago by sending it to the developers mailing list, but I don't know if it got through since no one replied to it.
Looking at the [R] distribution, the UseMethod() is used in the following way:
alias <- function(object, ...) UseMethod("alias")
or
barplot <- function(height, ...) UseMethod("barplot")
What I
2002 Jan 24
3
Best way to check/assert a certain version of or a package
When loading a package with library(APkg) or require(APkg) I would like to
make sure that (1) the correct version of [R] is installed. If not an
informative error message should be given. I would also like to make sure
that (2) another required package which is loaded from within the APkg
package (by require(OtherPkg)) is of a certain version or later.
First of all, I believe that the check
2002 May 21
4
setClass() and packages
Where should the setClass() ('methods' package) calls be placed in a
package? I try to follow a one-class-one-file principe, but since
setClass("ClassA", "ClassB") has to come a after setClass("ClassB", [snip])
it is not possible to fully follow this rule. So the best I can do now is to
put all setClass() calls in a file named "000.R" (I know this
2002 Mar 06
3
Loading tcltk package fails on WinMe/Cygwin but works with Rgui
I am investigating how well R/tcltk is supported on different system and I
ran into the same problem as Christian Schulz reported on February 7, 2002.
I am using [R] v1.4.1 on WinMe and ActiveTcl 8.3.2. Loading tcltk within
Rgui works just fine and both demo(tkdensity) and demo(tkttest) works as
expected. However, when I start R from my Cygwin terminal dyn.load() fails
to load the library:
% R
2002 Feb 20
2
How to get the penalized log likelihood from smooth.spline()?
I use smooth.spline(x, y) in package modreg and I would like to get
value of penalized log likelihood and preferable also its two parts. To
make clear what I am asking for (and make sure that I am asking for the
right thing) I clarify my problem trying to use the same notation as in
help(smooth.spline):
I want to find the natural cubic spline f(x) such that
L(f) = \sum_{k=1}{n} w[k](y[k] -
2001 Sep 15
1
Solution to (well known) problem with Rdconv.pm on Sun Solaris (PR#1093)
Full_Name: Henrik Bengtsson
Version: 1.3.1
OS: Sun Solaris 8
Submission from: (NULL) (130.235.3.49)
I have been trying to install [R] v1.3.1 locally on a Sun Solaris 8 machine and
I ran into the (already known) perl problems that express theselves as:
Bare word found where operator expected at
/usr/matcent/hb/R/R-1.3.1/share/perl/R/Rdconv.pm line 1390, near "$txtout
mywrap"
2001 Sep 10
3
Offline change detection methods?
Dear [R] people, I am looking for a method to test if there are any
changes (jump points) in a time series data set or not. If there are, I
would like to identify the jump points. All the data is available from the
beginning so an offline method could be used.
The current data set that I have could be seen as a time series with
five almost equally sized segments that stands out to have different
2002 Jan 23
1
Question about substitute (and eval, parse and deparse)
I would like to define a function at run-time, but I just can't make it
work (please don't question why I want to do this, because that would be
too much to explain). For example, I want to define the the following
function
foo <- function(x) {
cat("Function", "foo", "was called with argument", x, ".\n")
}
However, I would like to
2002 Feb 06
4
Weighted median
Is there a weighted median function out there similar to weighted.mean()
but for medians? If not, I'll try implement or port it myself.
The need for a weighted median came from the following optimization
problem:
x* = arg_x min (a|x| + sum_{k=1}^n |x - b_k|)
where
a : is a *positive* real scalar
x : is a real scalar
n : is an integer
b_k: are negative and positive scalars
2007 Mar 14
6
ipp2p problems
Hello list,
I''m newbie in this list. Well, i''m going crazy with ipp2p.
Googling i find a mini-howto but i''ve got problems.
1) Download:
* iptables-dev (apt-get)
* kernel-headers-2.x.x (your kernel, "uname -r")
* src of your iptables (iptables -V and apt-get source)
* ipp2p-0.8.0.tar.gz (stable)
2) untar ipp2p and cd ipp2p
3) Edit Makefile, if it''s
2007 Sep 18
2
cups 1.3 on Centos5?
Hello,
Does anyone have cups v1.3.1 running on Centos5? If so, i'd like to roll
my own srpm and install it. I'm currently running 1.2.x and want to update
to 1.3.1 as it has a bug fix that i need.
Any help appreciated.
Thanks.
Dave.
2002 Jan 18
2
easier way to update packages i'm developing?
I'm frightfully new at developing r packages. I'm developing an econometrics
package, and each time I update my beta package, I close R, delete the
package dir in the library dir, rebuild the zip file, rerun R, reinstall the
package and run the functions. Is there a more efficient way?
Jeff.
Jeff D. Hamann
Hamann, Donald & Associates, Inc.
PO Box 1421
Corvallis, Oregon USA 97339-1421
2002 Mar 24
2
readline?
We've recently "upgraded" a server to solaris 8, and in reinstalling R
I've encountered a problem in getting it to recognize the readline library.
I have installed readline in what I believe to be the "usual" place:
/usr/local/lib with include files in /usr/local/include/readline.
But ./configure produces:
ragnar.econ.uiuc.edu# grep readline hout
checking for
2007 May 23
2
installing problems
hi every body.
Im new in this program. Im traying to install R in linux suse10.0 in
two following form:
a) with the file R-2.5.0.tar.gz
b) and the rpm file : R-base-2.5.0-2.1.i586.rpm
****** In the first case a) when i uncompressed and type:
linux:/opt/R/R-2.5.0 # ./configure
the followind message is showed
linux:/opt/R/R-2.5.0 # ./configure
checking build system type...