Displaying 20 results from an estimated 4000 matches similar to: "is match slow?"
2001 Aug 30
1
imagenrgb: Function to display RGB images in R
I've writen this function (imagenrgb)
to display a (m,n,3) array
as a RGB image with ngris^3 colors and,optionally,
stretching. If option ver=F, it does not
display but saves a pseudocolor version of the image
as a list (so that subsequent displays are faster).
I'd appreciate feedback and improvements
and hope that it's useful for others.
Example of use:
> dim(imatest)
[1] 100
2008 Jun 27
4
Recoding
Hi!
Given a vector (or a factor within a df),i.e. v1 <- c(1,1,1,2,3,4,1,10,3)
and a dictionary
cbind(c(1,2,3),c(1001,1002,1003))
is there a function (on the same line than recode() in car)
to get v2 as c(1001,1001,1001,1002,1003,4,1001,10,1003) ?
I'm using myself a function based on match() since
long ago (I think that thanks to advice by Prof. B. Ripley),
but would like to know if there
2008 Sep 12
1
match and incomparables
Hello,
I was playing around with the newly implemented 'incomparables' argument
in 'match' and realized the argument does not behave anything like I
expected. Can someone explain what is going on here? Sorry if I'm
misreading the documentation.
> match(1:3, 1:3, incomparables=1)
[1] NA 2 3 # This seems right, the 1 in 'x' is 'incomparable'
>
2009 Mar 30
1
duplicated fails to rise correct errors (PR#13632)
Full_Name: Wacek Kusnierczyk
Version: 2.8.0 and 2.10.0 r48242
OS: Ubuntu 8.04 Linux 32 bit
Submission from: (NULL) (129.241.110.161)
In the following code:
duplicated(data.frame(), incomparables=NA)
# Error in if (!is.logical(incomparables) || incomparables)
.NotYetUsed("incomparables != FALSE") :
# missing value where TRUE/FALSE needed
the raised error is clearly not the
2010 Jun 29
2
POSIXlt matching bug
I came across the below mis-feature/bug using match with POSIXlt objects
(from strptime) in R 2.11.1 (though this appears to be an old issue).
> x <- as.POSIXlt(Sys.Date())
> table <- as.POSIXlt(Sys.Date()+0:5)
> length(x)
[1] 1
> x %in% table # I expect TRUE
[1] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
> match(x, table) # I expect 1
[1] NA NA NA NA NA NA NA NA
2004 Apr 12
1
question on isoMDS
Hello everyone,
I have a question on isoMDS.
My data set (of vegetation) with 210 samples is in this way:
Rotfoehrenau Lavendelweidenau Silberweidenau ....
067_Breg.7 0 2 0 ....
071_Dona.4 0 2 6 ....
...
I want to do an isoMDS-analysis with the dissimilarity index
2015 Jan 23
1
:: and ::: as .Primitives?
Hi,
On 01/23/2015 07:01 AM, luke-tierney at uiowa.edu wrote:
> On Thu, 22 Jan 2015, Michael Lawrence wrote:
>
>> On Thu, Jan 22, 2015 at 11:44 AM, <luke-tierney at uiowa.edu> wrote:
>>>
>>> For default methods there ought to be a way to create those so the
>>> default method is computed at creation or load time and stored in an
>>>
2014 Apr 10
3
Unión de subconjuntos procedentes de bucles
Buenas tardes a todos los participantes del foro.
Me dirijo a vosotros porque estoy atascado con una duda de programación respecto al data frame:
> dd # Data frame de 5 variables, leído de un archivo txt
id sexo nacim origen final
1 1 0 02/09/1955 01/04/1985 01/02/2014
2 2 1 29/10/1951 15/08/1996 01/05/2009
3 3 0 30/10/1942 02/08/2000 01/02/2014
4 4 1
2000 Nov 20
2
precision, incorrect(?) tapply() NA's
Hi,
Summary:
I ran into some unexpected behavior in approx() and tapply()
that introduced NA's in "clean" data due to (?) numerical accuracy/round off.
The culprit seems to be in match() that coerces it's arguments to character,
loosing precision in the process.
[R development version 1.2.0, 08 Nov 2000, on Linux]
Example:
> r
> [1] 0.6931472 0.6931472 0.6931472
2000 Nov 20
2
precision, incorrect(?) tapply() NA's
Hi,
Summary:
I ran into some unexpected behavior in approx() and tapply()
that introduced NA's in "clean" data due to (?) numerical accuracy/round off.
The culprit seems to be in match() that coerces it's arguments to character,
loosing precision in the process.
[R development version 1.2.0, 08 Nov 2000, on Linux]
Example:
> r
> [1] 0.6931472 0.6931472 0.6931472
2001 Nov 26
2
summary() and range(): inconsistency?
I've found the following and I'm kind
of confused:
> summary(delme)
Min. 1st Qu. Median Mean 3rd Qu. Max.
1 2950 5699 5756 8572 11680
> range(delme)
[1] 1 11675
summary() and range() give different Max. value for the same
vector!
Agus
Dr. Agustin Lobo
Instituto de Ciencias de la Tierra (CSIC)
Lluis Sole Sabaris s/n
08028 Barcelona SPAIN
tel
2002 Mar 19
5
matrix with fix number columns but variable number rows
I have to store a number of vectors of the same length. I know the
length but I do not know the number of vectors.
How can I store them as they are created (they are created one by one)?
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or
2013 Jul 19
1
copiar directorio en r
Muchas gracias Miguel.
Os pongo mi solución por si alguien necesita llamar a distintos tipos de
sistema.
setwd("C:/Users/usuario/Desktop/Pruebas/")
x <- sessionInfo()
sistema <- substr(x$R.version$system,1, 3 )
origen <- "Carp"
destino <- "Carp235"
switch(sistema,
x86 =
system(paste(Sys.getenv("COMSPEC"),"/c
2004 Sep 13
1
Rd files with "%" (was: permuting dimensions)
Professor Ripley
thanks for this. Very much appreciated.
The original subject line reflected my late-night conviction
that the answer might involve passing a strange list to do.call().
Anyway, package magic is broken (only in R-devel, I might add) because I have
a function called "%eq%".
R-2.0.0 CMD check is stopping (I think) because it interprets the
"%" as a
2018 Jul 04
2
Operaciones con Arrays...creo.
Buenas,
Sigo aprobechando par aaprender en las vacaciones de alumnos y nuevamente
recurro a Uds. Sé que la perspectiva puede ser erronea, o sea que les pido
que entiendan lo que quiero decir, más que lo que digo.
Tengo una lista de matrices todas de idénticas dimensiones, y necesito
hacer operaciones entre ellas.
Ocurrencia: creí que podría hacer un array, de tal manera que , así como
puedo
2018 Jul 04
2
Operaciones con Arrays...creo.
Muchas gracias, Javier, por tu respuesta.
Me sobrevalorás. Mi última clase de matemática como tal fue en 4º de
secundaria, y era la matemática que nos daban a los de letras. Ni te cuento
hace cuántos años. No puedo seguir la mayoría de lo que comentás sin hacer
un trabajo forense. Así que agarré lo que entendí... y me parece que, o lo
que yo quiero hacer son matrices de tres dimensiones (si es que
2013 Jul 17
2
copiar directorio en r
Iba a proponeros una solución con switch, pero algo raro ocurre con el
comando system en windows no me hace caso
system("dir") por ejemplo no muestra nada en pantalla.
> sessionInfo()R version 2.15.2 (2012-10-26)
Platform: x86_64-w64-mingw32/x64 (64-bit)
locale:
[1] LC_COLLATE=Spanish_Spain.1252 LC_CTYPE=Spanish_Spain.1252
LC_MONETARY=Spanish_Spain.1252 LC_NUMERIC=C
[5]
2013 Jun 02
2
Conversión de objeto temporal (TS) a matriz (o data.frame)
Hola a todos:
La pregunta ha quedado clara en el asunto, pero: ¿existe alguna función
que convierta un objeto temporal (TS) a matriz o data.frame?
En algunos cálculos que estoy haciendo me viene bien convertir un objeto
temporal a matriz para poder hacer cálculos parciales por meses o años
(aplicando apply en la matriz) pero no he encontrado ninguna función que
haga la conversión.
He
2015 Apr 24
2
Codificación UTF-8 en un Mc
Hola, Emilio
Muchas gracias por la respuesta. El problema es que la otra persona no
sabe nada de R, e instalarle RStudio va a ser casi peor.
Además, parece que el origen es que tiene su Mac con configuración USA
por un tema de correos y fechas; así que creo que lo que necesitaría es
algo que cambie solo la configuración de la sesión de R a UTF-8 o algo
parecido.
Quizás no es posible ....
2015 Jan 22
5
:: and ::: as .Primitives?
On Thu, Jan 22, 2015 at 11:44 AM, <luke-tierney at uiowa.edu> wrote:
>
> For default methods there ought to be a way to create those so the
> default method is computed at creation or load time and stored in an
> environment.
We had considered that, but we thought the definition of the function
would be easier to interpret if it explicitly specified the namespace,
instead of