The duplicated() function gives TRUE if an item in a vector (or row in a
matrix, etc.) is a duplicate of an earlier item. But what I would like
to know is which item does it duplicate?
For example,
v <- c("a", "b", "b", "a")
duplicated(v)
returns
[1] FALSE FALSE TRUE TRUE
What I want is
Hi,
On 11/12/18 17:08, Duncan Murdoch wrote:
> The duplicated() function gives TRUE if an item in a vector (or row in
> a matrix, etc.) is a duplicate of an earlier item. But what I would
> like to know is which item does it duplicate?
>
> For example,
>
> v <- c("a", "b", "b", "a")
>
thanks for the replies.
i don't believe the data is the problem. here you see how i used 3 variables
and it fails,
but when i use any combination of 2 variables, it does work
> head(df)
V1 V2 V3 V4 V5 V6 V7
1 200 16 16 3 64 5.584092e+13 1.616745e+12
2 200 16 16 3 64
With two variables there are no combinations with less than 2 observations.
Here's the part of the data you provided:
> df <- structure(list(V1 = c(200, 200, 200, 200, 200, 200, 200, 200,
200, 200, 200, 200, 200, 200, 200, 500, 500, 500, 500, 500, 500,
500, 500, 500, 500, 350, 350, 350, 350,
You wrote:
## On Windows 3.4.2
> x <- airquality
> saveRDS(x, file = "x.rds")
> saveRDS(x, file = "y.rds")
>
Files x.rds and y.rds are identical in size but utterly different in
content.
Wow! Can you show us the results of
x <- datasets::airquality
saveRDS(x, file="x.rds")
what about as.integer(factor(v, levels = unique(v)))
I recall very clearly when I realized the power of this feature of
factor(), but I've not seen it discussed much.
Cheers, Mike.
On Tue, 13 Nov 2018 at 12:08 Duncan Murdoch
wrote:
> The duplicated() function gives TRUE if an item in a
> match(v, unique(v))
[1] 1 2 2 1
Bert Gunter
"The trouble with having an open mind is that people keep coming along and
sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
On Mon, Nov 12, 2018 at 5:08 PM Duncan Murdoch
wrote:
> The duplicated()
On 11/12/18 12:37 PM, Yectli Huerta via R-help wrote:
> Hello,
>
> I was wondering if there are other packages like MANOVA.RM that could be used
> to analysis non normal distributions. I have to analyze data with more than 2
> predictor variables and a similar number of response variables.
On 2018-11-13 12:55, William Dunlap wrote:
You wrote:
## On Windows 3.4.2
x <- airquality
saveRDS(x, file = "x.rds")
saveRDS(x, file = "y.rds")
Files x.rds and y.rds are identical in size but utterly different in
content.
Wow! Can you show us the results of
x <- datasets::airquality
It is not clear to what you want for the general case. Perhaps:
> v <- letters[c(2,2,1,2,1,1)]
> wh <- tapply(seq_along(v),factor(v), '[',1)
> w <- wh[match(v,v[wh])]
> w
b b a b a a
1 1 3 1 3 3
> ## and if you want NA's for the first occurences of unique values
> ## of course:
> w[wh] <- NA
> w
"I'd like to see a cleverer solution that vectorizes..."
and Herve provided it.
Bert Gunter
"The trouble with having an open mind is that people keep coming along and
sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
On Mon, Nov 12, 2018 at 9:43 PM
The solution was very simple. Don't use the same name for the rds
file as used for the R object, viz a vie:
saveRDS(x, file = "x.rds")
and
x <- readRDS(file = "x.rds")
will not work; however
saveRDS(x, file = "y.rds")
and
x <- readRDS(file = "y.rds")
will work.
An undocumented feature?
Dear Frodo (or Jedi)
The results seems to confirm your assumption that 3 systems are different. How
you should present results probably depends on how it is usual to report such
results in your environment.
BTW. It seems to me like homework and this list has no homework policy (Sorry,
if I am
Hi R users,
I have a question about manipulating data. For example, I have DF1 as the
following, how to transform it to a gridded dataset DF2? In DF2, each value
Precip is an attribute of the corresponding grid cell. So DF2 is like a
spatial surface, and can be imported to ArcGIS. Thanks for your
Dear Petr,
thank you very much for your feedback.
Can anyone in the list advise me if the way I report the results is correct?
Kind regards
FJ
On Mon, Nov 12, 2018 at 1:02 PM PIKAL Petr wrote:
> Hi Frodo
>
>
>
> I do not consider myself as an arbiter in statistical results and their
>
Yes, only one of the pairwise comparisons (B vs. C) is right. Also, the overall
test has 3 degrees of freedom whereas a comparison of 3 groups should have 2.
You (meaning Frodo) are testing that _all 3_ regression coefficients are zero,
intercept included. That would imply that all three
Dear Jedi,
please use the source carefully. A and C are not statistically different
at the 5% level, which can be inferred from glm output. Your last two
wald.tests don't test what you want to, since your model contains an
intercept term. You specified contrasts which tests A vs B-A, ie A-
Hi Frodo
I do not consider myself as an arbiter in statistical results and their
presentation. Again your text seems to as good as any other.
You should keep responses to mailing list as others could have another opinion.
Cheers
Petr
From: Frodo Jedi
Sent: Monday, November 12, 2018 1:48 PM
Dear Peter and Eik,
I am very grateful to you for your replies.
My current understanding is that from the GLM analysis I can indeed
conclude that the response predicted by System A is significantly different
from that of System B, while the pairwise comparison A vs C leads to non
significance. Now
Generally speaking, this list is about questions on R programming, not
statistical issues. However, I grant you that your queries are in something
of a gray area intersecting both.
Nevertheless, based on your admitted confusion, I would recommend that you
find a local statistical expert with whom
Dear Bert,
I understand and thanks for your recommendation. Unfortunately I do not
have any possibility to contact a statistical expert at the moment. So this
forum experts' recommendation would be crucial to me to understand how R
works in relation to my question.
I hope that someone could reply
The error message does not say anything about having more than two predictor
variables. It says that one of the combinations of the predictor variables has
less than 2 observations (i.e. 1 or 0 observations). That is probably an issue
of your sample size. You may need to consider combining some
You have asked what I believe is an incoherent question, and thus are
unlikely to receive any useful replies (of course, I may be wrong about
this...).
Please read and follow the posting guide linked below to to ask a question
that can be answered.
Bert Gunter
"The trouble with having an open
I could not find the word "censor" in the documentation for the missRanger
package, so I think additional explanation is needed.
Also, I would expect information about censoring to be included in data
provided to a function in a package -- inserting censoring into a package
doesn't make sense.
Hi,
does anybody know where I need to insert the censoring in the missRanger
package?
Regards,
Rebecca
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
Hello,
I was wondering if there are other packages like MANOVA.RM that could be used
to analysis non normal distributions. I have to analyze data with more than 2
predictor variables and a similar number of response variables. When I try the
function MANOVA.wide with more than 2 predictor
On 2018-11-12 22:49, peter dalgaard wrote:
Er, where, what, how? I can't reproduce that, at least not on 3.5.1 on
MacOS:
x <- airquality
saveRDS(x, file = "x.rds")
x <- NULL
x <- readRDS(file = "x.rds")
x
Ozone Solar.R Wind Temp Month Day
1 41 190 7.4 67 5 1
2 36
Hola.
Por si es de vuestro interés, os informo de que ya están disponibles las
presentaciones y los videos de la Jornada de usuarios de Galicia, que tuvo
lugar el 25 de Octubre en Santiago de Compostela.
https://www.r-users.gal/pagina/programa-2018
Un Saludo,
--
Miguel Ángel Rodríguez
Mil gracias.
El lun., 12 nov. 2018 a las 4:58,
escribió:
> Hola.
>
> Por si es de vuestro interés, os informo de que ya están disponibles las
> presentaciones y los videos de la Jornada de usuarios de Galicia, que tuvo
> lugar el 25 de Octubre en Santiago de Compostela.
>
>
Gracias a vosotros, Carlos.
Que los del grupo de Madrid sois hiperactivos y, gracias a eso, tenemos un
mont�n de materiales.
:-)
Buen trabajo
(y seguid as�, porfa!)
De: Carlos Ortega
Enviado: lunes, 12 de noviembre de 2018 14:25
Para: Rodr�guez
Hola David.
Creo que te confundes de destinatario.
Esta es la lista R-help-es (R en castellano) y no organiza cursos.
Seguramente te has anotado a algún curso (Coursera, quizás?) y han referenciado
esta lista pero no tiene nada que ver con la organización del curso.
Un saludo.
Buenas tardes:
No puedo pagar curso, he hecho ejercicios y he visto todos los videos, anularme
si quereis si sacais otra vez curso cuando trabaje si me gustaria pagar y
sacarme el titulo, gracias.
Atentamente David Montes Navarro.
Good day:
I can not pay for the course, but you can also watch
Gracias Miguel Angel
El lun., 12 nov. 2018 a las 12:08, ceveve () escribió:
> Mil gracias.
>
> El lun., 12 nov. 2018 a las 4:58, >
> escribió:
>
> > Hola.
> >
> > Por si es de vuestro interés, os informo de que ya están disponibles las
> > presentaciones y los videos de la Jornada de usuarios
Gracias Miguel Ángel!.
El lun., 12 nov. 2018 a las 11:58,
escribió:
> Hola.
>
> Por si es de vuestro interés, os informo de que ya están disponibles las
> presentaciones y los videos de la Jornada de usuarios de Galicia, que tuvo
> lugar el 25 de Octubre en Santiago de Compostela.
>
>
Gracias!.
Parece que hemos cogido un nuevo impulso si cabe al cambiar de sitio a uno
más céntrico..a ver si se confirma el buen momento... Tuvimos entre 50-60
personas en la última reunión, veremos este miércoles...
No creo que pueda pasarme a las Jornadas en Murcia, pero si el año que
viene son
Buenas a todos,
Para los que estéis en Madrid el próximo miércoles tendremos la siguiente
reunión del Grupo de R de Madrid.
https://www.meetup.com/es-ES/Grupo-de-Usuarios-de-R-de-Madrid/events/256121363/
Y para los que no puedan pasarse, el material: presentaciones y videos,
estarán disponibles
36 matches
Mail list logo