Displaying 20 results from an estimated 90 matches similar to: "Ordenar matriz de datos"
2013 Jul 16
2
Ordenar data.frame
Buenas tardes:
¿Cómo puedo ordenar un dataframe sin utilizar sqldf?. Me gustaría ordenar por columnas, por ejemplo primero por col1 y después por col2.
Gracias.
Eva
[[alternative HTML version deleted]]
2013 Jul 16
0
Ordenar data.frame
Hola, ¿qué tal?
Echa un ojo a ?order
aquí un ilustrativo ejemplo
http://stackoverflow.com/questions/1296646/how-to-sort-a-dataframe-by-columns-in-r
Saludos,
--
Beatriz Martínez
@_bmartinez_ <https://twitter.com/_bmartinez_>
El 16 de julio de 2013 13:40, Eva Prieto Castro <evapcastro@yahoo.es>escribió:
>
>
> Buenas tardes:
>
> ¿Cómo puedo ordenar un dataframe sin
2017 Jun 30
2
Ordenar vector
Estimados Colegas, tengo una pregunta, supongamos el vector x que tiene los
siguientes elementos: x<-c(15,20,11,25,0,22,22,16,13,18,16,15,18)
# y luego pongo
y <- order(x)
y # entonces obtengo:
[1] 5 3 9 1 12 8 11 10 13 2 6 7 4
que indican la posición en el vector, pero quiero obtener:
25 22 22 20 18 18 16 16 15 15 13 11 0
¿Me pueden indicar el documento que debo
2013 Jul 16
1
Ordenar data.frame
Hola, Beatriz:
Buscando en ?order derivé en arrange, y al final es como resolví:
arrange(my.df, col1, desc(col2))
Con order no conseguía el orden descendente, pues me daba error al intentar hacer order(-my.df$col1)
Gracias.
Eva
________________________________
De: Beatriz Martínez <mtnezb@gmail.com>
CC: r-help-es <r-help-es@r-project.org>
Enviado: Martes 16 de julio de 2013
2011 Nov 21
2
ordenar de mayor a menor
Hola, tengo una tonteria que no me sale. Esta tablita esta ordenada de menor a mayor.
Como hago para invertir el orden (de mayor a menor) ?
Gracias
puerto visitas medias
3 Aldán-Hio 4.00
59 Tarifa 11.95
13 Camariñas 99.00
23 Cudillero 170.40
38 Mundaca 198.27
57 Suances 211.70
[[alternative HTML
2019 Feb 08
2
Ordenar eje en ggplot
Buenas tardes, supongo que será muy sencillo, pero estoy empezando en r y no acabo de dar con la tecla. Estoy intentando hacer un gráfico de líneas con ggplot pero el eje x me sale con los meses ordenados alfabéticamente (abril, agosto, diciembre?) en vez de su orden natural (enero, febrero, marzo?.). Agradezco cualquier pista.
Un saludo
Jesús
2010 Jan 12
6
Ordenar un factor
Hola a todos . ¿cómo puedo ordenar los niveles de un factor?
Ejemplo
> x<-c("0","0-9","10-49","50-99","100-199",">200")
> dosis<-factor(rep(x,10))
> dosis
[1] 0 0-9 10-49 50-99 100-199 >200 0 0-9 10-49
[10] 50-99 100-199 >200 0 0-9 10-49 50-99 100-199 >200
2012 Jun 20
2
reshape
Hello, helpeRs,
I am attempting to reshape (either base R or package reshape) multiple .csv
spreadsheets from a very unfortunate wide format to long format. ?Each spreadsheet
looks something like this, after being read in to R:
toy <- data.frame(year = rep(2007:2008,each = 20), month = rep(1:5,each = 4, length = 40),
day = rep(1:2,each = 2,length = 40), hhmm = rep(1100:1101,length = 40),
2011 May 30
2
Basic question about three factor Anova
Read the data using scan():
#
# a1 a2 a3 a4
# ------------- ------------- ------------- -------------
# b1 b2 b3 b1 b2 b3 b1 b2 b3 b1 b2 b3
# --- --- --- --- --- --- --- --- --- --- --- ---
#
# c1:
# 4.1 4.6 3.7 4.9 5.2 4.7 5.0 6.1 5.5 3.9 4.4 3.7
# 4.3 4.9
2013 Sep 10
2
Normalidad para datos multivariados
Hola! Estoy teniendo un problema para testar la normalidad y la homogeneidad de varianzas para mi modelo de manova
Es este mi modelo: m1<-manova(cbind(pred,fit,oniv)~tratamento/parcela+bloco,data.vegetacao)
Aparte de tener tres variables respuestas (predador, fitófago, omnívoro), también es un diseño anidado.
Alguien sabría responder esto? Gracias!
Carol
[[alternative HTML version
2010 Nov 30
1
Zooming in to a ggplot (a sort of ylim, but ylim won't do)
Dear Helpers,
I wonder whether you might be able to help me. I have a plot composed of
ggplot (and a follow on geom_smooth call). I would like to restrict the
display range of the y axis to a smaller range, a sort of zooming onto a
region. I attempted to use ylim, but it will effect the range (i.e. effect
the geom_smooth call). Is there any way that I can save the results up to
geom_smooth call
2004 Apr 28
1
simple repeated measures model: dumb user baffled!
I am in the process of transferring from an old version of S+ to using
R having used a variety of other packages in the past. I'm hugely
impressed with R but it has an excellent but depressing habit of exposing
that I'm not a professional statistician and has done so again.
Someone has run a nice little repeated measures design on my advice,
students randomised to four orders of a
2013 Mar 01
2
issue creating a subset
I'm performing item response theory with eRm packages
I am excluding the persons that doesn't fit in the infit/outfit persons.
for that I created a condition. then I have to create a new subset or
matrix but with the condition.
So:
ORIGINAL
matrix<-cbind(item1, item2, item3, item4)
IF I PERFORM A head(matrix)
item1 item2 item3 item4
3 2 3 1
3 1
2005 Aug 25
2
question sur R
bonjour
je suis elève à l'ENSAI Rennes et je suis actuellement en stage de fin
d'études
j'ai une question sur R
en fait lorsque le simule 2 lois normales qui sont mes 2 variables
explicatives continus
- une avec que des valeurs > 0 (ou que <0) X1
- l'autre peut prendre aussi bien des valeurs <0 ou >0 X2
et que je regresse le rating (facteur
2006 Jun 28
2
superimposing histograms con't
Earlier, I posted the following question:
I want to superimpose histograms from three populations onto the same graph,
changing the shading of the bars for each population. After consulting the
help files and the archives I cannot find out how to do this (seemly)
simple graph. To be clear, I want
- a single x axis (from -3 to 18)
- three groups of bars forming the histograms of each population
2008 Mar 29
1
Tabulating Sparse Contingency Table
I have a sparse contingency table (most cells are 0):
> xtabs(~.,data[,idx:(idx+4)])
, , x3 = 1, x4 = 1, x5 = 1
x2
x1 1 2 3
1 0 0 31
2 0 0 112
3 0 0 94
, , x3 = 2, x4 = 1, x5 = 1
x2
x1 1 2 3
1 0 0 0
2 0 0 0
3 0 0 0
, , x3 = 3, x4 = 1, x5 = 1
x2
x1 1 2 3
1 0 0 0
2 0 0 0
3 0 0 0
, , x3 = 1, x4
2011 Sep 19
3
Replace a for loop with a function
Hi all,
I would like to replace the for loop in the code below with a function
to improve the speed and to make the script more efficient.
The loop creates a vector of integers (x) with the probability of f for
each integer.
The length of f is variable, but sums to 1.
I tried to use a function with optional arguments which did not work.
Here is the code:
f <- data.matrix(c(0.5,0.15,0.35))
2006 Oct 31
0
6402576 Sometimes port_getn() never returns indicating that a socket has become writable
Author: praks
Repository: /hg/zfs-crypto/gate
Revision: 4a9dff71a42bacf7232dd2d8dbcec1db3e6c2ccc
Log message:
6402576 Sometimes port_getn() never returns indicating that a socket has become writable
Files:
update: usr/src/uts/common/fs/portfs/port_fd.c
2019 Mar 12
2
Reordenar una matriz con caracteres en cada celda
Hola,
tengo una matriz de especies donde cada celda tiene datos con caracteres
(son parentesis). Cómo la puedo reordenar considerando tanto filas como
columnas?
Ejemplo:
,Specie 1, Specie2, Specie3
Specie1, NA, 3(1-4), 8(6-9)
Specie2, 5(2-6),NA, 5(4-6)
Specie3, 2(1-3), 10(5-15), NA
Quiero:
,Specie 2, Specie3, Specie1
Specie2, NA, 5(4-6) , 5(2-6)
Specie3, 10(5-15) ,NA,
2006 Aug 04
2
plotting picture data
Hi R users
I have a dataset which represents points that are market by patients as the
source of pain.
Basically the patients indicates by a cross on a chest pictures where he/she
thinks is the
source of pain. The data was then digitalized by divinding the chest into
small squares and each
square was give value 1 if it was the center 2 if it was touched by the
markings and 3 if it was not