Displaying 20 results from an estimated 20000 matches similar to: "how to add row index based a categorical column"
2012 Mar 16
5
How to Group Categorical data in R?
Hi,
I am newbie to R and working on result presentation? My Input table is in
following format
A B C D
X T C K
Z U Z M
E V Z R
Z U Z M
E V P R
I need to present my result in the
2012 Aug 05
2
how to put barchart and line chart in the same plot in ggplot2
dear userR:
I am trying to plot two dependent variables in the same plot in ggplot2.
because these two variables have very different magnitude, I have to use a
second Y axis. I hope one variable to be line and the other to be barchart.
The x axis is continuous. Yet since I have to make barchart, I guess I have
to treat it as discrete or categorical.
I have been google searching for the whole
2012 Oct 31
2
how can xyplot word when with for control flow
Hi everybody,
I recently used xyplot, but I found that for control flow can't work in the
xyplot. The program code and some of my data file are shown as follow.
Would someone please tell me where my code is wrong and how can make the
code right?
Thanks.
Best regards
Yuanzhen Lin
Code:
library("lattice")
plot.data$Fam<-as.numeric(plot.data$Fam)
#### xyplot can work if one
2012 Sep 02
3
Loading Chess Data
All,
What would be the most efficient way to load the data at the following
address into a dataframe?
http://ratings.fide.com/top.phtml?list=men
Thanks,
David
--
View this message in context: http://r.789695.n4.nabble.com/Loading-Chess-Data-tp4642006.html
Sent from the R help mailing list archive at Nabble.com.
2011 Jun 24
4
ggplot2 month and year boxplot x axis order problem
Hi
I am very new to R, I am attempting to produce a monthly boxplot with the
following fish thermal telemetry data:
ID Temp Date.Time Month.Year Month Week Shortdate
1 1734 4.4140 04/05/2010 11:56 05,2010 May 19 04/05/2010
2 1734 4.1002 04/05/2010 12:06 05,2010 May 19 04/05/2010
3 1734 3.9433 04/05/2010 12:09 05,2010 May 19 04/05/2010
4 1734 3.6295
2012 Jul 20
4
TukeyHSD not working
Dear r-help members.
I would like to compare species numbers of moths between eight different forests (each sampled for six nights). I would like to do a nested anova to compare species numbers between forests and nights.
For more site specific details I wanted to do a Tukey test (TukeyHSD). Unfortunately this test is not working (message: "nicht anwendbare Methode f?r 'TukeyHSD' auf
2016 Apr 22
1
Unique Ordering
Hi R-Help,
data at bottom
I've been struggling with a problem where I need to order based on 1) the
Frequency "Freq" and 2) keeping each group of 3 of the same type together
"Var2" but I want across all groups it to go "high to low" based on the
earn factor.
Thank you!
structure(list(Var1 = structure(c(1L, 3L, 2L, 1L, 2L, 3L, 1L,
3L, 2L, 3L, 1L, 2L, 3L, 1L,
2010 Apr 05
3
bootstrap confidence intervals, non iid
hello,
i need to calculate ci's for each of 4 groups within a dataset, to be able
to infere about differences in the variable "similarity". the problem is
that data within groups is dependent, as assigned by the blocking-factor
"site". my guess was to use a block bootstrap but samples within in these
blocks / sites are not of same length. i was not able to find a method to
2018 Apr 08
2
Syntax roccomp-using R
*Dear Bert, *
Thank you very much for your feedback and the useful link https://rseek.org/
and https://www.r-bloggers.com/calculating-auc-the-area-under-a-roc-curve/.
Actually, I want to know different performance between Stata and R, in
multilevel logistic regression. For this purposes, I replicate ".do" file
use Stata in
2012 Jul 14
2
Arrange two columns into a five variable dataframe
Hi,
I hope that folks can give me some simple approaches to taking the data set
below, which is accumulated in two columns called "long" and "group", then
arrange the data is the "long" column into a data frame containing five
variables: "Group 1", "Group 2", "Group 3", "Group 4", and "Group 5". I am
hoping for a few
2010 Apr 12
3
glmer with non integer weights
hello,
i'd appreciate help with my glmer.
i have a dependent which is an index (MH.index) ranging from 0-1. this index
can also be considered as a propability. as i have a fixed factor (stage)
and a nested random factor (site) i tried to model with glmer. i read that
it's possible to use a quasibinomial distribution, for this kind of data,
which i than actually did - but firstly
(1)
2008 Jul 06
2
lattice question
I'm creating a lattice barchart based off a pretty complicated data
structure. The barchart comes out quite nice ( thanks
to lattice ) but the problem is that the horizontal axis comes out all
scrunched because the barchart doesn't know that the intervals
of Var.1 are really "associated" with the conditioning variable Var.2.
Therefore, all the intervals of Var.1 are put on
2009 May 28
2
ggplot2 legend
Hi:
I need some help with the legend. I got 14 samples(Muestreo) and I
am trying to plot a smooth line for each sample. I am able to accomplish that but the problem is that the legend only displays every other sample. How can I force the legend to show all of my Muestreos? Thanks in advance.
fish_ByMuestreo <- structure(list(data = structure(list(SampleDate = structure(c(3L,
3L, 3L, 3L,
2009 May 15
1
data summary and some automated t.tests.
I would like to preform a t.test to each of the measured variables
(sand.silt etc.) with a mean and sd for each of the treatments (up or
down), and out put this as a table.... I am having a hard time
starting- maybe it is to close to lunch. Any suggestions would be
greatly appreciated.
Stephen Sefick
x <- (structure(list(sample. = structure(c(1L, 7L, 8L, 9L, 10L, 11L,
12L, 13L, 14L, 2L, 3L,
2010 Oct 29
2
wilcox.test; data type conversion?
I'm working on a quick tutorial for my students, and was planning on
using Mann-Whitney U as one of the tests.
I have the following (fake) data
grade <- c("MVG", "VG", "VG", "G", "MVG", "G", "VG", "G", "VG")
sex <- c( "male", "male", "female", "male",
2010 Jun 07
2
how to parse out string separated by special character
hi, everyone:
i have a data frame with one single character column as followings:
DS_xxx_yyy_24hr_zzz_1
DS_xxx_yyy_24hr_zzz_2
DS_xxx_yyy_24hr_zzz_3
DS_xxx_yyy_24hr_zzz_4
DS_xxx_yyy_24hr_zzz_1
DS_xxx_yyy_24hr_zzz_2
DS_xxx_yyy_24hr_zzz_3
DS_xxx_yyy_24hr_zzz_4
DS_xxx_yyy_24hr_zzz_1
i need to parse out the time part like the followings:
name time
DS_xxx_yyy_24hr_zzz_1
2013 Jan 31
2
glm poisson and quasipoisson
Hello,
I have a question about modelling via glm. I have a dataset (see dput)
that looks like as if it where poisson distributed (actually I would
appreciate that) but it isnt because mean unequals var.
> mean (x)
[1] 901.7827
> var (x)
[1] 132439.3
Anyway, I tried to model it via poisson and quasipoisson. Actually, just to
get an impression how glm works. But I dont know how to
2013 Mar 29
1
Create values based on a table of conditions
Hi R help forum,
I have a simple data frame of four columns - one of numbers (really a
categorical variable), one of dates and one
of data. I have over 500,000 data points to work with, spread over 40
files, each named after a different animal.
These are contact data recorded by proximity loggers over two years
between the animals of the file name and
collars being worn by other animals. The
2013 Jul 09
1
Kruskal.test
Hi,
?kruskal.test()
?a<- c(2,4,5,2,7)
?b<- c(2,2,6)
?c<- c(3,7,9,3)
?kruskal.test(list(a,b,c))
#
?#? Kruskal-Wallis rank sum test
#
#data:? list(a, b, c)
#Kruskal-Wallis chi-squared = 2.003, df = 2, p-value = 0.3673
A.K.
Hi
I need an expression in R to apply a kruskal.test to this data (for example).
a ? a ? a ? a ? ?a ? ?b ? b ? ?b ? ?c ? ?c ? c ? ?c
2 ?4 ? ?5 ? 2 ? ?7 ? ?2 ? 2 ?
2011 Feb 10
1
Conditional sampling
R experts,
I need to sample two rows without replacement from the following data frame such that
neither row contains the same 'DOW'. For example, I cannot select both a Monday morning
and a Monday afternoon. I am using STRATA_NUM as an index to randomly select rows from,
since this variable indexes all unique permutations of DOW, SITE, and TOD. I know how to
use the sample function