Displaying 20 results from an estimated 1000 matches similar to: "Identyfing rows with specific conditions revisited"
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,
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
2011 Jul 01
2
Initiating in BNArray
Hi,
I'm trying to understand some details about an example maintened in [1].
According that link, I have total.data as a data set (am I right?).
But I don't understand how is built that table.
I saved the dataset in a file, with dput(), and had something like this:
structure(list(df.all = structure(list(V1 = structure(c(1L, 2L,
3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L,
2009 Aug 07
1
ggplot2-ddply question
Hi all:
I am trying to use the ddply function to estimate the mean of 'Total','Fry','Smolt' and 'Fry.Eq' columns without success. I have the dput of my dataset below. I wonder if someone can give me a hand with this function.
# dput(winter)
winter <-structure(list(IDDate = structure(c(37L, 48L, 59L, 62L, 63L,
64L, 65L, 66L, 67L, 38L, 39L, 40L, 41L, 42L, 43L,
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,
2012 Nov 14
2
aggrete data from combination
Dear R users,
A have a dataframe (matrix) with two collumns (plot, and diameter (d)). I
want all diameters values for different combination of plots.
For example I want all d values for all posible combination, 100C2 (all d
values for plot 1 with all d values in the plot 2.......with all d values
from plot 1 with all d values from plot 100, ...... with all d values from
plot 99 with all d values
2009 Oct 06
2
ggplot cumsum refined question (?)
OK, so maybe last night was a little too much at one throw, so I have
reduced the data to two stations- one that has precipitation and one
that does not. This is going to be in the context of a larger data
set. I would like to be able to issue a ggplot command and have cum
sum just act on the facets (factors) to apply this.
library(chron)
library(ggplot2)
DF <- structure(list(date_time =
2017 Nov 18
0
Complicated analysis for huge databases
The correct code is:
for (i in 1:length(SeparatedGroupsofmealsCombs)) { ...
I had mentioned that this is untested, but the error is so obvious ...
B.
> On Nov 18, 2017, at 4:40 PM, Allaisone 1 <allaisone1 at hotmail.com> wrote:
>
>
> The loop :
>
> AllMAFs <- list()
>
> for (i in length(SeparatedGroupsofmealsCombs) {
> AllMAFs[[i]] <-
2016 Apr 15
0
aggregate combination data
Hello,
I'm cc'ing R-Help.
Sorry but your question was asked 3.5 years ago, I really don't
remember it. Can you please post a question to R-Help, with a
reproducible example that describes your problem?
Rui Barradas
?
Citando catalin roibu <catalinroibu at gmail.com>:
> Dear Rui,
> ?
> I helped me some time ago with a code..... regarding aggregated data
>
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
2017 Nov 10
0
Calculating frequencies of multiple values in 200 colomns
Hi,
To clarify the default behavior that Boris is referencing below, note the definition of the 'bin' argument to the tabulate() function:
bin: a numeric vector ***(of positive integers)***, or a factor. Long vectors are supported.
I added the asterisks for emphasis.
This is also noted in the examples used for the function in ?tabulate at the bottom of the help page.
The second
2008 Sep 26
2
Date Time conversion
what am I doing wrong?
chron(as.character(f), format=c(dates="%m/%d/%y", times="%h:%m"))
f <- structure(c(51L, 60L, 66L, 87L, 90L, 115L, 23L, 35L, 37L, 6L,
12L, 55L, 84L, 96L, 109L, 17L, 29L, 41L, 3L, 74L, 94L, 102L,
30L, 8L, 46L, 69L, 107L, 15L, 25L, 39L, 1L, 71L, 95L, 19L, 56L,
62L, 76L, 85L, 99L, 111L, 42L, 4L, 52L, 61L, 67L, 91L, 13L, 24L,
36L, 38L, 7L, 81L, 82L, 57L,
2017 Nov 10
2
Calculating frequencies of multiple values in 200 colomns
|> x <- sample(0:2, 10, replace = TRUE)
|> x
[1] 1 0 2 1 0 2 2 0 2 1
|> tabulate(x)
[1] 3 4
|> table(x)
x
0 1 2
3 3 4
B.
> On Nov 10, 2017, at 4:32 AM, Allaisone 1 <allaisone1 at hotmail.com> wrote:
>
>
>
> Thank you for your effort Bert..,
>
>
> I knew what is the problem now, the values (1,2,3) were only an example. The values I have are
2017 Nov 10
0
Calculating frequencies of multiple values in 200 colomns
Thank you for your effort Bert..,
I knew what is the problem now, the values (1,2,3) were only an example. The values I have are 0 , 1, 2 . Tabulate () function seem to ignore calculating the frequency of 0 values and this is my exact problem as the frequency of 0 values should also be calculated for the maf to be calculated correctly.
________________________________
From: Bert Gunter
2017 Nov 18
0
Complicated analysis for huge databases
On 18/11/2017 4:40 PM, Allaisone 1 wrote:
>
> The loop :
>
>
> AllMAFs <- list()
>
> for (i in length(SeparatedGroupsofmealsCombs) {
> AllMAFs[[i]] <- apply( SeparatedGroupsofmealsCombs[[i]], 2, function(x)maf( tabulate( x+1) ))
> }
>
>
> gives these errors (I tried this many times and I'm sure I copied it entirely) :-
>
> Error in
2010 Feb 19
1
ggplot2 X axis levels
Hi all:
I've done this before with factors but can't figure how to do it with
a continuous variable. I am trying to reorder the sequence of my weeks
along the X axis. I want to start with week 27 to 52 and then 1 to 26.
I guess I could use levels along with seq() but doesn't seem to work for me.
Thanks for your help
winter <- structure(list(week = c(27L, 28L, 29L, 30L, 31L, 32L,
2017 Nov 19
1
Complicated analysis for huge databases
Thanks but a new error appeared with the loop :
Error in x + 1 : non-numeric argument to binary operator
I think this can be solved by converting columns (I,II,II,..600) into "numeric" instead of
the current "int" type as shown below in the structure of "33_55" dataframe .
$ 33_55:'data.frame': 256 obs. of 600 variables:
..$ MealsCombinations
2017 Nov 18
0
Complicated analysis for huge databases
Something like the following?
AllMAFs <- list()
for (i in length(SeparatedGroupsofmealsCombs) {
AllMAFs[[i]] <- apply(SeparatedGroupsofmealsCombs[[i]], 2, function(x)maf(tabulate(x+1)))
}
(untested, of course)
Also the solution is a bit generic since I don't know what the output of maf() looks like in your case, and I don't understand why you use tabulate because I would have
2017 Nov 18
0
Complicated analysis for huge databases
> On Nov 18, 2017, at 1:52 AM, Allaisone 1 <allaisone1 at hotmail.com> wrote:
>
> Although the loop seems to be formulated correctly I wonder why
> it gives me these errors :
>
> -object 'i' not found
> - unexpected '}' in "}"
You probably did not copy the entire code offered. But we cannot know since you did not "show your code",
2023 Jan 13
1
Customise Plot tick label on time series plot using date series
Hi,
I would like to customise my date series on the plot. I tried this:
dt_ts <- ts(dt)
autoplot(dt_ts[,2]) + ylab("Charge counts") + xlab("Daily")
but the label is not the date series.
Tqvm for any help given.
> dput(dt)
structure(list(time = c("1/1/2014", "2/1/2014", "3/1/2014", "4/1/2014",
"5/1/2014",