Displaying 20 results from an estimated 10000 matches similar to: "how to find index of maximum?"
1998 Sep 03
2
a nasty error
Dear R-developers
The basic function seq doesn't work properly:
> seq(1,6,by=3)
[1] 1 4 7
Looking at the source code of seq.default I found that strange fuzz thing
"+ 0.4". Taking that away the seq works fine.
My question is: Why has this fuzz thing been added?
If it was for some rounding problems I would suggest to replace "0.4" by
something much smaller.
Peter
1999 Feb 10
1
problems with read.table
Dear R users,
I have the following problem:
I have a table in ASCII-format, separated with commas. I can read it as
long as no field contains a comma itself. If one does, read.table doesn't
function even though that field is double-quoted.
Ex.:
File "test.csv":
Name,Strasse,PLZ
Jsaac,Gossauerstrassee 29,9100
Roth-Bernasconi,"20, ch. des Fauvettes",1212
adressen <-
2000 Sep 04
2
problems with R COMPILE in make
Dear R helpers
I have a problem with R COMPILE. While the Makefile consisting of the lines
SOURCES = imageio.c procbase.c readargs.c regSegs.c goodiesPH.c \
generalAnalysis.c edgeAggregation.c utilities.alga.c \
cs.parametrizing.c
tst.so: $(SOURCES)
R SHLIB -o $@ $(SOURCES)
works fine, the Makefile with the target replaced by
imageio.o: imageio.c
R COMPILE imageio.c
results in
2000 Sep 04
2
problems with R COMPILE in make
Dear R helpers
I have a problem with R COMPILE. While the Makefile consisting of the lines
SOURCES = imageio.c procbase.c readargs.c regSegs.c goodiesPH.c \
generalAnalysis.c edgeAggregation.c utilities.alga.c \
cs.parametrizing.c
tst.so: $(SOURCES)
R SHLIB -o $@ $(SOURCES)
works fine, the Makefile with the target replaced by
imageio.o: imageio.c
R COMPILE imageio.c
results in
2000 Jan 17
1
How to change several elements of an array simultaneously?
I have a matrix `m' and two vectors `rs' and `cs'. I want to change m at the
positions (rs[1], cs[1]), (rs[2], cs[2]), ... to 1. Obviously I can do that by
> m[rs + (cs-1) * dim(m)[1]] <- 1
but I would just be interested whether I am missing a more "intuitive" way
of doing that.
Thanks in advance, Peter
____________________________________________________________
2000 Mar 30
1
Efficiency of local functions
Dear R-users
In order to speed up the performance of my program I tried to make a
function f2 (that is only called from function f1) local to f1. In that way I
pass one argument less to f2, a huge matrix. (This matrix isn't changed
inside f2, so - afaik - it is passed by reference and size doesn't matter.)
Still I would have expected that f1 would be a little faster, but the
opposit
2000 Feb 11
1
Creating efficiently a subset of a matrix
Dear R-helpers
I have the following problem: given a m x n matrix A, I want to have just a
m x k submatrix B, with B[i,] = A[i, offset[i] + 1:k], e.g. from
> offset <- c(0, 0, 1)
> a <- matrix(1:9, 3)
> a
[,1] [,2] [,3]
[1,] 1 4 7
[2,] 2 5 8
[3,] 3 6 9
the submatrix b
1 4
2 5
6 9
I can do this with a for loop or with sapply
> b <-
2001 Mar 26
1
Problems with R CMD COMPILE within Makefile (PR#885)
Dear R-developpers
This concerns a problem I posted about half a year ago on the R-help list
and to which I got some answer by Duncan Temple Lang (see below), but the
basic problem still continues. Even though I managed a workaround which is
sufficient for me Martin Maechler asked me to send a toy example of the
problem to R-bugs. So that's what I try here.
The following Makefile will not
2000 Oct 02
4
Debugging dynloaded C-code with gdb
Dear R users
I have started to use gdb for debugging dynloaded C code as described in
`Writing R Extensions'. Unfortunately I have run into several problems that
I haven't been able to solve:
- using `n': how comes that the same line of code appears up to three times
(and inbetween the next line and maybe even the second next one?)
- using `print' resp. `display': How
1999 Jan 20
1
data frames with non-unique row.names
In R and S, the general idea is that data.frames
must have unique row.names (aka dimnames(.)[[1]]).
Several observations / problems (in R *and* S !).
[Example code at the end]
1)
Both in S and R,
data.frame(..)
(and e.g., also cbind(<data.frame>, ..) which dispatches to data.frame())
silently drops the whole row.names and replaces it by "1" "2" ...
2000 Jan 13
0
problems with understanding behaviour of glm
Dear R users,
I don't understand, what happens in glm in the following example (note that
in S-Plus this example finishes with an almost perfect fit, but also 49
warnings):
> fit.small <- glm(SKR.ein.aus ~ ., family = binomial, data = daten, maxit=100)
Error in (if (is.empty.model(mt)) glm.fit.null else glm.fit)(x = X, y = Y, : inner loop 2; can't correct step size
In addition:
1998 Sep 16
2
R-beta: (0+0i)^2
The following behaviour (in R 0.62.3) is disturbing:
> (0+0i)^2
[1] NaN+NaNi
Is it deliberate??
Laimonis Kavalieris
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To:
1998 Sep 16
2
R-beta: (0+0i)^2
The following behaviour (in R 0.62.3) is disturbing:
> (0+0i)^2
[1] NaN+NaNi
Is it deliberate??
Laimonis Kavalieris
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To:
1999 Jun 09
1
R on AIX (>4.2)
Hi,
I'm determined to get R compiling & running on a machine running AIX
4.2. I've seen previous emails in the archive about this topic. The
main obstacle is getting dynamic loading to work, but it works for Tcl
and hence is feasable.
Questions:
- is anybody _currently_ working with R on AIX?
- why have previous fixes to the sources not been introduced into
the released
1999 Jun 09
1
R on AIX (>4.2)
Hi,
I'm determined to get R compiling & running on a machine running AIX
4.2. I've seen previous emails in the archive about this topic. The
main obstacle is getting dynamic loading to work, but it works for Tcl
and hence is feasable.
Questions:
- is anybody _currently_ working with R on AIX?
- why have previous fixes to the sources not been introduced into
the released
1999 Jul 21
0
R-mailinglists will be "on hold" for a few hours on Saturday.
Our main server [www/ftp/mail] "stat.ethz.ch" (if you want to ping)
will be getting more RAM, new disks with new filesystems, etc.
This will start on Saturday July 24, 10:30 GMT+2 (=MEST) and last several
hours.
In case it would take more than 4 hours or so, you might get messages back
that you sent to the mailing lists R-help, R-devel, R-announce or R-core.
DO NOT REPOST THEM,
since
1999 Mar 18
0
Major Internet disruption to/from ETH Zurich...
The big Swiss University network provider has been having severe problems
for about 8 hours now
--- particularly the cross-atlantic connection seems broken ---
Many of you will get R-help or ESS-help E-mails very much delayed.
Hope things start working soon by themselves.
[for those that are disrupted: When you get this message, things should be
back to normal; otherwise you wouldn't have
1998 Jan 23
0
S-Plus graphs to LaTeX picture commands
Well, R ( http://lib.stat.cmu.edu/R/CRAN/ )
has a pictex(..) driver.
>>>>> "kjetil" == kjetil halvorsen <kjetil@caoba.entelnet.bo> writes:
kjetil> Is there any possibility to write code which ``translates''
kjetil> from splus graphics to latex picture commands? Or somebody has
kjetil> written something like that?
kjetil> I did
1998 May 06
1
min(numeric(0)) = ? -- proposal for "S incompatible change"
[Same question for max(.), cummin(.) and cummax(.)]
In S, S-plus and R, this currently gives NA.
I wonder if it wouldn't make more sense to follow common
mathematical/logical reasoning here:
min { empty set } = +Inf
max { empty set } = -Inf
(For integers, these would be INT_MAX and INT_MIN, respectively).
Maybe this is a real ``first time'':
I am proposing a change which
1998 Jun 02
0
"fgrep" for help \\ IBM PowerPC AIX
>>>>> "TL" == Thomas Lumley <thomas@biostat.washington.edu> writes:
TL> ......
TL> Currently "%*%" doesn't have any help but help
TL> requests get routed to Arith, because "%*%" as a regular expression
TL> matches "%%". I will add this to the special cases in help(), but
TL> should we use fgrep