Displaying 20 results from an estimated 2000 matches similar to: "invert order"
2008 Jul 20
1
garbage collection, "preserved" variables, and different outcome depending on "--verbose" or not
Dear list,
While trying to identify the root of a problem I am having with
garbage collected variables,
I have come across the following oddity: depending on whether --verbose is set
or not, I obtain different results.
I have made a small standalone example to demonstrate it.
The example is very artificial, but I had a hard time reproducing
reliably the problem.
So when I do: (the content of
2009 Jun 26
1
bug in Rf_PrintValue ?
I'm very green with R, so maybe this is not a bug, but it looks like one to
me. The following program segfaults at the second call to Rf_PrintValue().
To failure depends on the value of the y-string. E.g., if I change it from
"coverage" to, say, "COVERAGE", the segfault does not occur.
/* bug.c */
#include <stdio.h>
#include <Rinternals.h>
#include
2012 Jan 19
2
POSIXct value display incorrect for some values
First, the reproducable example, showing how converting from character to
POSIXct to character changes the milliseconds in the first time stamp
though not in the second:
> as.POSIXct('2010-06-03 9:03:58.324')
[1] "2010-06-03 09:03:58.323 PDT"
> as.POSIXct('2010-06-03 9:03:58.325')
[1] "2010-06-03 09:03:58.325 PDT"
This seems to be due to truncation of
2008 Aug 28
1
Interaction between aggregate() and length()
Folks,
I've been running into an odd situation that occurs when I use length()
function with aggregate(), but not with either one separately. Together,
the results looks correct but is given an unexpected name. 'if
(stringsAsFactors) factor(x) else x' instead of just 'x'.
# Numbers work ok
tt <- data.frame(idx=c(1,1,1,1,1,1,2,2,2,2,2,2)
2013 Aug 27
1
Error in simulation. NAN
Hi all,
im triyng to implement a bayesian model with R and c++.
I have a strange problem. I can't reproduce the error with a small
script and then i post the original one.
The problem is after the line
for(MCMC_iter2=0;MCMC_iter2<thin;MCMC_iter2++)
For the first 34 iterations all work fine, after, all the simulations
of mu_acc_P return an "nan". If i delete the line
2009 Apr 02
1
Updating a data frame
Folks,
Updating values in a table is simple in SAS or SQL, but I've wracked my
brain looking for an elegant solution in R to no avail thus far. Certainly
this is a common need that's been solved in dozens of different ways.
Given an initial dataframe nn and a smaller dataframe of updates uu, I'd
like to replace the values in
nn <- expand.grid('a'=1:4, 'b'=1:3)
2020 Apr 17
3
Convertir lista de precios a dolares por gramo
Se ha borrado un adjunto en formato HTML...
URL: <https://stat.ethz.ch/pipermail/r-help-es/attachments/20200417/11369880/attachment.html>
2009 Feb 10
1
aggregate taking way too long to count.
Folks,
I'm checking the structure of a dataframe for duplicate parameters at a
site station (i.e depth should be measured once, not twice), using
aggregate to count each parameter within a site station. The fake data
below has only 26000 rows, and takes roughly 14 seconds. My real data has
750000 rows and I had to stop execution after about an hour. The by()
function is faster, but I
2012 Dec 04
6
leer .xlsm con read.xls
Buenas tardes usuarios de R.
Estoy tratando de leer un archivo excel con read.xls usando la siguiente
sentencia:
read.xls("resultados.xlsm",
colNames = TRUE,
sheet = 1,
type = "data.frame",
from = 1,
rowNames = NA,
colClasses = "character",
checkNames = TRUE,
dateTime = "numeric",
naStrings = NA,
stringsAsFactors = F)
Pero me da el siguiente error:
Error
2010 Dec 09
1
how to use diff() with different variables?
Hi,
I first should say I am new to R. I have searched without success the R-archives to see if I could find an answer to what I am about to ask you.
My dataset is like:
x fine
1 A 2010-12-09 07:57:33
2 B 2010-12-09 08:05:00
3 C 2010-12-08 20:42:00
...
that is:
'data.frame': 3 obs. of 2 variables:
$ x : Factor w/ 3 levels "A","B","C":
2011 Jul 13
3
Colors in R
HI everyone,
I''m trying to assign colors to multiple lines in a graph. Problem is I don''t want to type in as many colors as there are lines....is there a way around this? In brief, I''m plotting the logratio for up to 60 samples and want a different color for each sample. Here is the code I''m using now..
Any help is greatly appreciated..
Best
LT
data <-
2019 Mar 11
2
Problema codificación archivos
Gracias Javier. Voy a probar. Saludos, Sebastián.
Enviado desde Correo para Windows 10
De: Javier Marcuzzi
Enviado: domingo, 10 de marzo de 2019 14:53
Para: Sebastian Kruk
CC: Lista R
Asunto: Re: [R-es] Problema codificación archivos
Estimado Sebastian Kruk
Yo utilizo Microsoft R-open 3.5.1 y la r-project se encuentra en 3.5.3, ¿si intenta con cualquiera de estas dos?
Javier Rubén Marcuzzi
2008 Dec 11
3
Logical "in" test
OK, this should be trivial but I'm not finding it. I want to compress
the test,
if (i==7 | i==10 | i==30 | i==50) {}
into something like
if (i in c(7,10,30,50)) {}
so I can build a "excludes" vector
excludes <- c(7,10,30,50)
and test
if (i in excludes) {}
However, I'm not finding a clue on how to accomplish this, if it can
be done. Would someone with more R
2009 Feb 04
3
R command to compare two vectors?
By any chance is there an R command to compare two vectors?
For example,
a_tmp<-c("a", "b", "c", "d", "e", "f", "g", 'h')
b_tmp<-c("a", "c", "e", "g")
I would like to compare b_tmp against a_tmp to determine if the members of b_tmp are part of a_tmp.
I tried
2011 Apr 11
4
nndist R vs. ArcGIS
Can anyone tell me why I would get different average nearest neighbor values
for the same set of coordinates between ArcGIS 10 and R? Sometimes the
difference in distance is over 1.3 km.
Alexis
--
View this message in context: http://r.789695.n4.nabble.com/nndist-R-vs-ArcGIS-tp3442375p3442375.html
Sent from the R help mailing list archive at Nabble.com.
2010 Dec 10
3
Delete observations with a frequency < x
Hi,
I have two columns with data (both identifiers - it's an affiliation list)
and I would like to delete the rows in which the observations in the second
column have a frequency < 5 in the entire second column. Example:
1 a
1 b
1 c
2 a
2 b
2 d
Let's say, I would like to delete the rows in which the observation in the
second column has a frequency < 2 in
2009 Apr 22
2
R-User groups in North America (SF, LA, NYC, Ottawa)
Hi R folks,
I'd like to announce several new R users groups here in SF, LA, NYC,
and Ottawa - as well as their next scheduled event. The goal of these
user groups, besides gently explaining 'drop=TRUE' to the uninitiated,
is to exchange knowledge, promote best practices, and spur the
adoption of R for innovative applications. If I've missed any groups
here, please feel to add on
2010 Jul 07
9
problema con file
Hola. Tengo un archivo de texto con formato Ansi en Windows que lo
quiero convertir en una serie temporal pero cuando lo trato de hacer
con el siguiente comando:
out <- read.zoo(readLines(con <- file("log2.log",
encoding="UCS-2LE")),FUN = as.chron)
Me da los siguientes errores:
Error en file(file, "rt") : no se puede abrir la conexión
Además: Mensajes de
2013 Sep 26
2
ayuda con aggregate
Estimados:
Dentro del aggregate utilice un table, son cuatro los valores que puede
tomar la variable, ¿como puedo desarmar la lista y crear cuatro variables
nuevas donde le asigne 0 si no se da ese valor?
Saludos,
Sebastián.
El 25 de septiembre de 2013 10:41, Jorge I Velez
<jorgeivanvelez@gmail.com>escribió:
> Sebastián,
>
> Una forma es
>
> aggregate(cbind(X1,X2) ~ B +
2013 Feb 25
3
Achicar matriz de datos juntando varias variables en una
Estimados usuarios de R:
Tengo una matriz de datos que la quiero achicar. Por ejemplo las primeras
cuatro preguntas pueden tomar el valor "Sí" o "No". Entonces quiero crear
una nueva variable que toma el valor 1 si se respondió si a la primera
pregunta, 2, si fue Si a la segunda y así sucesivamente. Esto sucede con
varias variables.
¿Cuál seria la forma mas eficiente de