Using column names where you used column numbers would work:
example <- data.frame(
check.names = FALSE,
Nuclei = c(133L, 96L, 62L, 60L),
`Positive Nuclei` = c(96L, 70L, 52L, 50L),
Slide = factor(c("A1", "A1", "A2", "A2"), levels = c("A1", "A2")))
aggregate(example["Nuclei"], by=ex
So that's how that works! Thanks.
On Fri, Jan 22, 2016 at 1:32 PM, Joe Ceradini wrote:
> Does this do what you want?
>
> aggregate(Nuclei ~ Slide, example, sum)
>
> On Fri, Jan 22, 2016 at 12:20 PM, Ed Siefker wrote:
>>
>> Aggregate does the right thing with column names when passing it
>> nume
Does this do what you want?
aggregate(Nuclei ~ Slide, example, sum)
On Fri, Jan 22, 2016 at 12:20 PM, Ed Siefker wrote:
> Aggregate does the right thing with column names when passing it
> numerical coordinates.
> Given a dataframe like this:
>
> Nuclei Positive Nuclei Slide
> 1133
On Fri, Jan 22, 2016 at 01:20:59PM -0600, Ed Siefker wrote:
> Aggregate does the right thing with column names when passing it
> numerical coordinates.
> Given a dataframe like this:
>
> Nuclei Positive Nuclei Slide
> 1133 96A1
> 2 96 70A1
> 3 62
Aggregate does the right thing with column names when passing it
numerical coordinates.
Given a dataframe like this:
Nuclei Positive Nuclei Slide
1133 96A1
2 96 70A1
3 62 52A2
4 60 50A2
I can call 'aggregate' li
5 matches
Mail list logo