2

这是我的数据框的样子;

                Zaman Operasyon             Paket
1 2013-01-18 21:39:00 installed linux-api-headers
2 2013-01-18 21:39:00 installed            tzdata
3 2013-01-18 21:39:00 installed             glibc
4 2013-01-18 21:39:00 installed           ncurses
5 2013-01-18 21:39:00 installed          readline
6 2013-01-18 21:39:00 installed              bash

Zaman 是一个 POSIXct,其他 2 个列是因子。我想计算每天分组的行数。我试过了,

> aggregate(data,by=list(data$Zaman),FUN=sum)
Error occured: Summary.POSIXct(c(1358537940, 1358537940, 1358537940, 1358537940,  : 
  'sum' not defined for "POSIXt" objects
> aggregate(data,by=list(data$Zaman),FUN=count)
Error occured: match.fun(FUN) : Couldn't find 'count' object

我怎样才能做到这一点?

的输出dput(data)

dput(data)
structure(list(Zaman = structure(c(1358537940, 1358537940, 1358537940, 
1358537940, 1358537940, 1358537940, 1358537940, 1358537940, 1358537940, 
1358537940, 1358537940, 1358537940, 1358537940, 1358537940, 1358537940, 
1358537940, 1358537940, 1358537940, 1358537940, 1358537940, 1358537940, 
1358537940, 1358537940, 1358537940, 1358537940, 1358537940, 1358537940, 
1358537940, 1358537940, 1358537940, 1358537940, 1358537940, 1358537940, 
1358537940, 1358537940, 1358537940, 1358537940, 1358537940, 1358537940, 
1358537940, 1358537940, 1358537940, 1358537940, 1358537940, 1358537940, 
1358537940, 1358537940, 1358537940, 1358537940, 1358537940, 1358537940, 
1358537940, 1358537940, 1358537940, 1358537940, 1358537940, 1358537940, 
1358537940, 1358537940, 1358537940, 1358537940, 1358537940, 1358537940, 
1358537940, 1358537940, 1358537940, 1358538000, 1358538000, 1358538000, 
1358538000, 1358538000, 1358538000, 1358538000, 1358538000, 1358538000, 
1358538000, 1358538000, 1358538000, 1358538000, 1358538000, 1358538000, 
1358538000, 1358538060, 1358538060, 1358538060, 1358538060, 1358538060, 
1358538060, 1358538060, 1358538060, 1358538060, 1358538060, 1358538060, 
1358538060, 1358538060, 1358538060, 1358538060, 1358538060, 1358538060, 
1358538060, 1358538060, 1358538060, 1358538060, 1358538060, 1358538060, 
1358538060, 1358538060, 1358538060, 1358538060, 1358538060, 1358538060, 
1358538060, 1358538060, 1358538060, 1358538060, 1358538060, 1358538060, 
1358538060, 1358538060, 1358538060, 1358538060, 1358538060, 1358538060, 
1358538060, 1358538060, 1358538060, 1358538060, 1358538060, 1358538060, 
1358538720, 1358549220, 1358549580, 1358549580, 1358550240, 1358550240, 
1358550240, 1358550240, 1358550240, 1358550240, 1358550240, 1358550240, 
1358550240, 1358550240, 1358550240, 1358550240, 1358550240, 1358550240, 
1358550240, 1358550240, 1358550240, 1358550240, 1358550240, 1358550240, 
1358550240, 1358550240, 1358550240, 1358550240, 1358550240, 1358550240, 
1358550240, 1358550240, 1358550240, 1358550240, 1358550240, 1358550240, 
1358550240, 1358550240, 1358550240, 1358550240, 1358550240, 1358550240, 
1358550240, 1358550240, 1358550240, 1358550240, 1358550240, 1358550240, 
1358550240, 1358550240, 1358550240, 1358550240, 1358550240, 1358550240, 
1358550240, 1358550240, 1358550240, 1358550240, 1358550240, 1358550240, 
1358550240, 1358550240, 1358550240, 1358550240, 1358550240, 1358550240, 
1358550240, 1358550240, 1358550240, 1358550240, 1358550240, 1358550240, 
1358550300, 1358550300, 1358550300, 1358550300, 1358550300, 1358550300, 
1358550300, 1358550300, 1358550300, 1358550360, 1358550360, 1358550360, 
1358550360, 1358550480, 1358550480, 1358550480, 1358550660, 1358550660, 
1358550660, 1358550660, 1358550660, 1358550660, 1358550660, 1358550660, 
1358550660, 1358550840, 1358551140, 1358551140, 1358551140, 1358551140, 
1358551140, 1358551140, 1358551140, 1358551140, 1358551140, 1358551140, 
1358551140, 1358551140, 1358551140, 1358551140, 1358551140, 1358551140, 
1358551140, 1358551140, 1358551140, 1358551140, 1358551140, 1358551140, 
1358551140, 1358551140, 1358551140, 1358551140, 1358551140, 1358551140, 
1358551140, 1358551140, 1358551140, 1358551140, 1358551140, 1358551140, 
1358551140, 1358551140, 1358551140, 1358551140, 1358551140, 1358551140, 
1358551140, 1358551140, 1358551140, 1358551140, 1358551140, 1358551140, 
1358551140, 1358551140, 1358551140, 1358551140, 1358551140, 1358551140, 
1358551140, 1358551140, 1358551140, 1358551140, 1358551140, 1358551140, 
1358551140, 1358551140, 1358551140, 1358551140, 1358551140, 1358551140, 
1358551140, 1358551140, 1358551140, 1358551140, 1358551140, 1358551140, 
1358551140, 1358551140, 1358551140, 1358551140, 1358551140, 1358551140, 
1358551140, 1358551140, 1358551140, 1358551140, 1358551140, 1358551140, 
1358551140, 1358551140, 1358551140, 1358551140, 1358551140, 1358551140, 
1358551140, 1358551200, 1358551200, 1358551200, 1358551200, 1358551200, 
1358551200, 1358551200, 1358551200, 1358551200, 1358551320, 1358551320, 
1358551320, 1358551320, 1358551320, 1358551320, 1358551800, 1358552580, 
1358552580, 1358553300, 1358553300, 1358553300, 1358553300, 1358553300, 
1358553720, 1358553720, 1358554320, 1358554320, 1358554320, 1358554320, 
1358554320, 1358554380, 1358554380, 1358555100, 1358555100, 1358555100, 
1358555280, 1358555280, 1358555280, 1358555460, 1358555460, 1358555460, 
1358555460, 1358555460, 1358555460, 1358555460, 1358555460, 1358555460, 
1358555520, 1358555520, 1358555520, 1358555520, 1358555520, 1358555520, 
1358555520, 1358555520, 1358555520, 1358555520, 1358555520, 1358555520, 
1358555520, 1358555520, 1358555640, 1358556240, 1358556240, 1358556240, 
1358556240, 1358556300, 1358556300, 1358556300, 1358557020, 1358557860, 
1358558280, 1358558280, 1358558280, 1358558280, 1358558280, 1358558280, 
1358558280, 1358558280, 1358558280, 1358558280, 1358558280, 1358558280, 
1358558280, 1358558280, 1358559660, 1358559660, 1358559900, 1358559900, 
1358559900, 1358559900, 1358560140, 1358613600, 1358614140, 1358614140, 
1358614140, 1358614140, 1358614140, 1358614140, 1358614140, 1358614140, 
1358614140, 1358614140, 1358614140, 1358614140, 1358614140, 1358614140, 
1358614140, 1358614200, 1358614200, 1358614200, 1358614200, 1358614200, 
1358614200, 1358614200, 1358614200, 1358614200, 1358614200, 1358614200, 
1358614200, 1358614200, 1358614200, 1358614200, 1358614200, 1358614200, 
1358614200, 1358614200, 1358614200, 1358614200, 1358614200, 1358614200, 
1358614200, 1358614200, 1358614200, 1358614200, 1358614200, 1358614200, 
1358614200, 1358614200, 1358614200, 1358614200, 1358614200, 1358614200, 
1358614200, 1358614200, 1358614200, 1358614200, 1358614200, 1358614200, 
1358614200, 1358614200, 1358614200, 1358614200, 1358614200, 1358614200, 
1358614200, 1358614200, 1358614200, 1358614200, 1358614200, 1358614200, 
1358614200, 1358614200, 1358614200, 1358614200, 1358614200, 1358614200, 
1358614200, 1358614200, 1358614200, 1358614200, 1358614200, 1358614200, 
1358614200, 1358614200, 1358614200, 1358614200, 1358614200, 1358614200, 
1358614200, 1358614200, 1358614200, 1358614200, 1358614200, 1358614200, 
1358614200, 1358614260, 1358614260, 1358614260, 1358614260, 1358614260, 
1358614260, 1358614260, 1358614320, 1358614320, 1358614320, 1358614320, 
1358614320, 1358614500, 1358614500, 1358614500, 1358614500, 1358616120, 
1358616120, 1358616120, 1358616120, 1358618280, 1358618280, 1358618280, 
1358618280, 1358618280, 1358618280, 1358618280, 1358618280, 1358618280, 
1358618280, 1358618280, 1358618280, 1358618280, 1358618280, 1358618280, 
1358618280, 1358618280, 1358618280, 1358620500, 1358620500, 1358620500, 
1358620500, 1358620500, 1358620500, 1358620500, 1358620500, 1358689500, 
1358689500, 1358689500, 1358689560, 1358691060, 1358708700, 1358708700, 
1358708700, 1358708700, 1358708700, 1358708700, 1358708700, 1358708700, 
1358708700, 1358708700, 1358708700, 1358708700, 1358708700, 1358708760, 
1358709600, 1358726940, 1358726940, 1358726940, 1358726940, 1358727000, 
1358727000, 1358768340, 1358768340, 1358856660, 1358856660, 1358856660, 
1358856660, 1358856660, 1358856660, 1358856720, 1358856720, 1358856720, 
1358857080, 1358857260, 1358857260, 1358857260, 1358857260, 1358857260, 
1358857260, 1358857260, 1358857260, 1358857260, 1358857260, 1358857260, 
1358857260, 1358857260, 1358857260, 1358857260, 1358857260, 1358857260, 
1358857260, 1358857260, 1358857260, 1358857260, 1358857260, 1358857260, 
1358857260, 1358857260, 1358857260, 1358857260, 1358857260, 1358857260, 
1358857260, 1358857260, 1358857260, 1358857260, 1358857380, 1358857380, 
1358857500, 1358858160, 1358858160, 1358858160, 1358858160, 1358858160, 
1358858160, 1358858160, 1358858160, 1358858160, 1358858160, 1358858160, 
1358858160, 1358858160, 1358858160, 1358858160, 1358858160, 1358858160, 
1358858460, 1358858520, 1358859780, 1358859840, 1358859840, 1358862600, 
1358862660, 1358863440, 1358863500, 1358896140, 1358896140, 1358896200, 
1358896200, 1358943900, 1358943900, 1358943900, 1358944020, 1358944020, 
1358944080, 1358949840, 1358949840, 1358949840, 1358949840, 1358949840, 
1358949900, 1358949900, 1358949900, 1358949900, 1358949960, 1358949960, 
1358949960, 1358949960, 1358949960, 1358949960, 1358949960, 1358949960, 
1358949960, 1358949960, 1358949960, 1358949960, 1358950020, 1358950020, 
1358950020, 1358950020, 1358966040, 1358966040, 1358966040, 1358966040, 
1358966040, 1358966100, 1358966520, 1358966520, 1358966640, 1358966640, 
1358967000, 1358967000, 1358967000, 1358967000, 1358967000, 1358967000, 
1358967000, 1358970720, 1358970720, 1358970720, 1358970720, 1358970720, 
1358970720, 1358970720, 1358970720, 1359120240, 1359120240, 1359120240, 
1359120240, 1359120240, 1359120240, 1359120240, 1359120240, 1359120240, 
1359120420, 1359194820, 1359194820, 1359194820, 1359194820, 1359223080, 
1359223080, 1359223080, 1359223080, 1359223080, 1359223080, 1359223080, 
1359224100), class = c("POSIXct", "POSIXt"), tzone = ""), Operasyon = structure(c(1L, 
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L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, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 3L, 1L, 
1L, 1L, 3L, 3L, 3L, 3L, 3L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
1L, 1L, 1L, 1L, 3L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
3L, 1L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 
3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 1L, 1L, 1L, 1L, 1L, 1L, 
1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 3L, 3L, 3L, 3L, 
3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 
3L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L), .Label = c("installed", 
"removed", "upgraded"), class = "factor"), Paket = structure(c(381L, 
563L, 126L, 406L, 506L, 23L, 31L, 108L, 56L, 654L, 50L, 257L, 
330L, 429L, 428L, 17L, 3L, 130L, 227L, 49L, 517L, 51L, 256L, 
250L, 530L, 573L, 77L, 179L, 86L, 57L, 437L, 247L, 125L, 204L, 
209L, 177L, 652L, 547L, 61L, 466L, 52L, 62L, 64L, 70L, 84L, 87L, 
104L, 116L, 143L, 170L, 111L, 438L, 420L, 315L, 271L, 207L, 210L, 
172L, 185L, 190L, 189L, 545L, 191L, 198L, 217L, 379L, 382L, 400L, 
218L, 399L, 380L, 383L, 388L, 554L, 144L, 291L, 391L, 392L, 394L, 
405L, 409L, 528L, 32L, 324L, 53L, 472L, 270L, 220L, 455L, 65L, 
135L, 139L, 427L, 8L, 426L, 435L, 436L, 285L, 336L, 288L, 469L, 
470L, 471L, 511L, 549L, 548L, 551L, 572L, 575L, 586L, 612L, 389L, 
20L, 21L, 24L, 25L, 80L, 91L, 402L, 282L, 193L, 40L, 468L, 106L, 
273L, 331L, 390L, 433L, 457L, 546L, 192L, 588L, 587L, 649L, 354L, 
97L, 248L, 94L, 359L, 289L, 237L, 456L, 348L, 592L, 350L, 205L, 
347L, 363L, 642L, 616L, 632L, 622L, 621L, 618L, 627L, 626L, 619L, 
620L, 93L, 623L, 629L, 404L, 599L, 628L, 598L, 355L, 261L, 320L, 
373L, 366L, 634L, 640L, 624L, 631L, 637L, 593L, 635L, 602L, 377L, 
638L, 639L, 512L, 369L, 503L, 368L, 644L, 187L, 361L, 615L, 362L, 
641L, 643L, 393L, 645L, 646L, 647L, 88L, 358L, 352L, 648L, 630L, 
55L, 353L, 253L, 251L, 188L, 576L, 375L, 376L, 601L, 397L, 508L, 
374L, 600L, 578L, 140L, 577L, 633L, 367L, 349L, 360L, 636L, 625L, 
591L, 337L, 650L, 561L, 14L, 293L, 34L, 234L, 326L, 181L, 142L, 
171L, 430L, 48L, 351L, 365L, 533L, 325L, 410L, 424L, 136L, 268L, 
328L, 233L, 22L, 232L, 112L, 159L, 160L, 173L, 357L, 58L, 610L, 
542L, 356L, 76L, 103L, 161L, 214L, 260L, 412L, 201L, 460L, 531L, 
541L, 47L, 13L, 59L, 12L, 162L, 163L, 60L, 246L, 286L, 555L, 
556L, 562L, 603L, 370L, 343L, 605L, 155L, 423L, 156L, 4L, 36L, 
340L, 287L, 341L, 327L, 157L, 333L, 604L, 458L, 459L, 482L, 292L, 
571L, 266L, 570L, 529L, 432L, 222L, 385L, 564L, 606L, 607L, 194L, 
364L, 450L, 451L, 180L, 133L, 132L, 158L, 608L, 582L, 581L, 609L, 
611L, 613L, 614L, 413L, 597L, 245L, 520L, 372L, 39L, 544L, 443L, 
120L, 63L, 89L, 321L, 314L, 6L, 401L, 90L, 577L, 378L, 516L, 
386L, 169L, 552L, 557L, 166L, 145L, 122L, 122L, 145L, 166L, 278L, 
500L, 501L, 534L, 496L, 480L, 485L, 478L, 495L, 371L, 67L, 68L, 
10L, 513L, 452L, 448L, 617L, 486L, 492L, 490L, 494L, 487L, 497L, 
121L, 203L, 85L, 568L, 653L, 425L, 9L, 566L, 408L, 590L, 102L, 
228L, 229L, 230L, 294L, 145L, 124L, 322L, 255L, 323L, 565L, 316L, 
168L, 544L, 479L, 481L, 243L, 66L, 215L, 419L, 596L, 95L, 311L, 
176L, 407L, 504L, 505L, 509L, 178L, 30L, 41L, 263L, 422L, 302L, 
175L, 300L, 384L, 301L, 303L, 304L, 305L, 75L, 543L, 16L, 567L, 
510L, 267L, 579L, 536L, 141L, 532L, 499L, 235L, 462L, 11L, 174L, 
72L, 119L, 96L, 128L, 196L, 182L, 416L, 1L, 239L, 236L, 521L, 
523L, 241L, 240L, 269L, 329L, 387L, 242L, 275L, 656L, 550L, 283L, 
221L, 202L, 295L, 147L, 211L, 249L, 208L, 244L, 338L, 342L, 415L, 
417L, 515L, 519L, 540L, 574L, 589L, 651L, 82L, 79L, 334L, 317L, 
274L, 284L, 279L, 507L, 71L, 98L, 219L, 594L, 580L, 454L, 298L, 
453L, 395L, 206L, 306L, 307L, 467L, 308L, 33L, 200L, 199L, 197L, 
309L, 310L, 345L, 346L, 312L, 262L, 184L, 118L, 81L, 280L, 259L, 
19L, 18L, 476L, 489L, 252L, 484L, 477L, 493L, 28L, 335L, 418L, 
272L, 183L, 414L, 461L, 553L, 537L, 225L, 411L, 27L, 166L, 483L, 
491L, 138L, 290L, 475L, 488L, 113L, 115L, 114L, 332L, 29L, 498L, 
105L, 146L, 319L, 127L, 35L, 431L, 15L, 164L, 167L, 213L, 464L, 
463L, 465L, 186L, 117L, 344L, 258L, 165L, 231L, 313L, 134L, 137L, 
516L, 131L, 74L, 73L, 34L, 204L, 380L, 501L, 601L, 595L, 110L, 
154L, 151L, 150L, 195L, 583L, 2L, 238L, 224L, 299L, 223L, 265L, 
152L, 129L, 297L, 296L, 559L, 46L, 42L, 43L, 44L, 398L, 38L, 
277L, 403L, 281L, 78L, 37L, 538L, 539L, 254L, 421L, 149L, 558L, 
318L, 153L, 148L, 441L, 444L, 440L, 439L, 449L, 525L, 527L, 535L, 
276L, 524L, 522L, 526L, 447L, 446L, 442L, 445L, 101L, 92L, 69L, 
123L, 100L, 99L, 396L, 92L, 655L, 54L, 26L, 212L, 502L, 107L, 
45L, 7L, 569L, 264L, 585L, 32L, 560L, 181L, 30L, 29L, 34L, 39L, 
171L, 183L, 186L, 302L, 300L, 301L, 303L, 304L, 305L, 306L, 307L, 
308L, 309L, 310L, 312L, 380L, 414L, 500L, 504L, 514L, 83L, 584L, 
518L, 473L, 109L, 5L, 474L, 226L, 434L, 474L, 473L, 5L, 83L, 
514L, 518L, 584L, 216L, 253L, 251L, 188L, 208L, 249L, 244L, 397L, 
32L, 135L, 139L, 332L, 443L, 452L, 629L, 628L, 648L, 502L, 43L, 
44L, 47L, 544L, 514L, 83L, 584L, 518L, 473L, 5L, 474L, 339L), .Label = c("a52dec", 
"aalib", "acl", "alsa-lib", "alsa-plugins", "alsa-utils", "apache-ant", 
"archlinux-keyring", "arj", "asciidoc", "aspell", "at-spi2-atk", 
"at-spi2-core", "atk", "atkmm", "attica", "attr", "audacious", 
"audacious-plugins", "autoconf", "automake", "avahi", "bash", 
"binutils", "bison", "blas", "blueman", "bluez", "boost", "boost-libs", 
"bzip2", "ca-certificates", "ca-certificates-java", "cairo", 
"cairomm", "cdparanoia", "celt", "chromaprint", "chromium", "cloog", 
"clucene", "clutter", "clutter-gst", "clutter-gtk", "cmake", 
"cogl", "colord", "compositeproto", "coreutils", "cracklib", 
"cronie", "cryptsetup", "curl", "curlpaste", "damageproto", "db", 
"dbus", "dbus-glib", "dconf", "desktop-file-utils", "device-mapper", 
"dhcpcd", "dialog", "diffutils", "dirmngr", "dnssec-anchors", 
"docbook-xml", "docbook-xsl", "doukutsu", "e2fsprogs", "enca", 
"enchant", "eog", "exempi", "exiv2", "exo", "expat", "faac", 
"faad2", "fakeroot", "feh", "ffmpeg", "fftw", "file", "file-roller", 
"filesystem", "findutils", "fixesproto", "flac", "flashplugin", 
"flex", "fltk", "fontconfig", "fontsproto", "foxitreader", "freeglut", 
"freetype2", "fribidi", "frogatto", "frogatto-data", "frozen-bubble", 
"fuse", "garcon", "gawk", "gc", "gcc", "gcc-fortran", "gcc-libs", 
"gconf", "gdb", "gdbm", "gdk-pixbuf2", "gedit", "geoip", "geoip-database", 
"gettext", "ghex", "giblib", "giflib", "git", "git-cola", "gitg", 
"glew", "glib-networking", "glib2", "glibc", "glibmm", "glu", 
"gmime", "gmp", "gnome-desktop", "gnome-icon-theme", "gnome-icon-theme-symbolic", 
"gnome-system-monitor", "gnupg", "gnutls", "go", "gobject-introspection", 
"gpgme", "gpm", "grantlee", "graphite", "grep", "groff", "gsettings-desktop-schemas", 
"gsl", "gsm", "gst-libav", "gst-plugins-bad", "gst-plugins-base", 
"gst-plugins-base-libs", "gst-plugins-good", "gst-plugins-ugly", 
"gstreamer", "gstreamer0.10", "gstreamer0.10-base", "gstreamer0.10-base-plugins", 
"gtk-engines", "gtk-update-icon-cache", "gtk2", "gtk2-xfce-engine", 
"gtk3", "gtk3-xfce-engine", "gtkmm", "gtkmm3", "gtksourceview3", 
"gtkspell", "gvfs", "gvim", "gzip", "harfbuzz", "heirloom-mailx", 
"hicolor-icon-theme", "hspell", "hsqldb-java", "hunspell", "hwids", 
"hyphen", "iana-etc", "icon-naming-utils", "icu", "ilmbase", 
"imagemagick", "imlib2", "inetutils", "inkscape", "inputproto", 
"intel-dri", "iproute2", "iptables", "iputils", "ipw2200-fw", 
"isl", "iso-codes", "jack", "jasper", "jdk7-openjdk", "jfsutils", 
"jre7-openjdk", "jre7-openjdk-headless", "js", "json-c", "json-glib", 
"kbd", "kbproto", "kdelibs", "keyutils", "khrplatform-devel", 
"kmod", "krb5", "lame", "lapack", "lcms", "lcms2", "ldns", "leafpad", 
"less", "libarchive", "libass", "libassuan", "libasyncns", "libatasmart", 
"libavc1394", "libcaca", "libcanberra", "libcanberra-pulse", 
"libcap", "libcddb", "libcdio", "libcdio-paranoia", "libcroco", 
"libcups", "libdaemon", "libdatrie", "libdbusmenu-qt", "libdca", 
"libdrm", "libdv", "libdvbpsi", "libdvdnav", "libdvdread", "libebml", 
"libedit", "libegl", "libevent", "libexif", "libffi", "libfontenc", 
"libgbm", "libgcrypt", "libgl", "libglade", "libglapi", "libgme", 
"libgnome-keyring", "libgpg-error", "libgssglue", "libgtop", 
"libguess", "libgusb", "libice", "libid3tag", "libidl2", "libidn", 
"libiec61883", "libimobiledevice", "libiodbc", "libjpeg-turbo", 
"libkate", "libksba", "libldap", "liblqr", "libltdl", "libmad", 
"libmatroska", "libmikmod", "libmms", "libmng", "libmodplug", 
"libmowgli", "libmp4v2", "libmpc", "libmpcdec", "libmpeg2", "libnl", 
"libnotify", "libogg", "libpcap", "libpciaccess", "libpeas", 
"libpipeline", "libplist", "libpng", "libproxy", "libpulse", 
"libquvi", "libquvi-scripts", "libqzeitgeist", "libraw1394", 
"libreoffice-base", "libreoffice-calc", "libreoffice-common", 
"libreoffice-draw", "libreoffice-gnome", "libreoffice-impress", 
"libreoffice-kde4", "libreoffice-math", "libreoffice-postgresql-connector", 
"libreoffice-sdk", "libreoffice-sdk-doc", "libreoffice-tr", "libreoffice-writer", 
"librsvg", "libsamplerate", "libsasl", "libsecret", "libshout", 
"libsidplay", "libsigc++", "libsm", "libsndfile", "libsoup", 
"libsoup-gnome", "libssh2", "libtasn1", "libthai", "libtheora", 
"libtiff", "libtiger", "libtirpc", "libtool", "libtorrent-rasterbar", 
"libunique", "libupnp", "libusb-compat", "libusbx", "libutempter", 
"libva", "libva-driver-intel-g45-h264", "libvisual", "libvorbis", 
"libvpx", "libwnck", "libwnck3", "libwpd", "libwps", "libx11", 
"libxau", "libxaw", "libxcb", "libxcomposite", "libxcursor", 
"libxdamage", "libxdmcp", "libxext", "libxfce4ui", "libxfce4util", 
"libxfixes", "libxfont", "libxft", "libxi", "libxinerama", "libxkbfile", 
"libxklavier", "libxml2", "libxmu", "libxpm", "libxrandr", "libxrender", 
"libxres", "libxslt", "libxss", "libxt", "libxtst", "libxv", 
"libxvmc", "libxxf86vm", "libyaml", "licenses", "linux", "linux-api-headers", 
"linux-firmware", "logrotate", "lpsolve", "lsof", "lua", "lua51", 
"lvm2", "m4", "make", "man-db", "man-pages", "mcpp", "mdadm", 
"media-player-info", "mercurial", "mesa", "mjpegtools", "mkinitcpio", 
"mkinitcpio-busybox", "mozilla-common", "mpfr", "mpg123", "mtdev", 
"nano", "ncurses", "neon", "net-tools", "netcfg", "nettle", "notification-daemon", 
"nspr", "nss", "obex-data-server", "opencore-amr", "openexr", 
"openjpeg", "openobex", "openssh", "openssl", "opus", "orbit2", 
"orc", "p11-kit", "p7zip", "pacman", "pacman-mirrorlist", "pam", 
"pambase", "pango", "pangomm", "parted", "patch", "pavucontrol", 
"pciutils", "pcmciautils", "pcre", "perl", "perl-alien-sdl", 
"perl-capture-tiny", "perl-class-inspector", "perl-compress-bzip2", 
"perl-error", "perl-file-sharedir", "perl-file-which", "perl-ipc-system-simple", 
"perl-sdl", "perl-test-pod", "perl-tie-simple", "perl-xml-parser", 
"perl-xml-simple", "perl-yaml-syck", "phonon", "phonon-vlc", 
"pinentry", "pixman", "pkg-config", "pm-quirks", "pm-utils", 
"polkit", "polkit-gnome", "polkit-qt", "poppler", "poppler-data", 
"poppler-glib", "popt", "postgresql-libs", "ppl", "ppp", "procps-ng", 
"psmisc", "pth", "pulseaudio", "pulseaudio-alsa", "pygobject-devel", 
"pygobject2-devel", "pygtk", "pyqt-common", "python", "python-dbus-common", 
"python-pyinotify", "python2", "python2-beaker", "python2-cairo", 
"python2-dbus", "python2-distribute", "python2-docutils", "python2-gobject", 
"python2-gobject2", "python2-jinja", "python2-mako", "python2-markupsafe", 
"python2-notify", "python2-pygments", "python2-pyqt", "python2-sip", 
"python2-sphinx", "qbittorrent", "qca", "qt", "qtwebkit", "r", 
"randrproto", "raptor", "rasqal", "readline", "recode", "recordproto", 
"redland", "redland-storage-virtuoso", "reiserfsprogs", "renderproto", 
"rsync", "rtkit", "rtmpdump", "ruby", "run-parts", "sbc", "schroedinger", 
"scrnsaverproto", "sdl", "sdl_gfx", "sdl_image", "sdl_mixer", 
"sdl_net", "sdl_pango", "sdl_ttf", "sed", "sg3_utils", "shadow", 
"shared-color-profiles", "shared-desktop-ontologies", "shared-mime-info", 
"sip", "smpeg", "soprano", "sound-theme-freedesktop", "soundtouch", 
"spandsp", "speex", "sqlite", "startup-notification", "strigi", 
"sudo", "sysfsutils", "syslinux", "systemd", "systemd-sysvcompat", 
"sysvinit-tools", "taglib", "tar", "tcl", "tdb", "texinfo", "thunar", 
"thunar-volman", "tk", "totem", "totem-plparser", "traceroute", 
"ttf-dejavu", "tumbler", "tzdata", "udisks", "udisks2", "unace", 
"unixodbc", "unrar", "unzip", "upower", "usbmuxd", "usbutils", 
"util-linux", "v4l-utils", "vi", "videoproto", "vim", "vim-runtime", 
"virtuoso-base", "vlc", "vte", "vte-common", "wavpack", "webrtc-audio-processing", 
"wget", "which", "wpa_actiond", "wpa_supplicant", "x264", "xampp", 
"xbitmaps", "xcb-proto", "xcb-util", "xcb-util-keysyms", "xchat", 
"xclip", "xdg-utils", "xextproto", "xf86-input-evdev", "xf86-input-synaptics", 
"xf86-video-intel", "xf86vidmodeproto", "xfce4-appfinder", "xfce4-mixer", 
"xfce4-panel", "xfce4-power-manager", "xfce4-session", "xfce4-settings", 
"xfce4-terminal", "xfconf", "xfdesktop", "xfsprogs", "xfwm4", 
"xfwm4-themes", "xineramaproto", "xkeyboard-config", "xmlto", 
"xorg-bdftopcf", "xorg-font-util", "xorg-font-utils", "xorg-fonts-alias", 
"xorg-fonts-encodings", "xorg-fonts-misc", "xorg-iceauth", "xorg-luit", 
"xorg-mkfontdir", "xorg-mkfontscale", "xorg-server", "xorg-server-common", 
"xorg-server-utils", "xorg-sessreg", "xorg-setxkbmap", "xorg-twm", 
"xorg-xauth", "xorg-xbacklight", "xorg-xclock", "xorg-xcmsdb", 
"xorg-xgamma", "xorg-xhost", "xorg-xinit", "xorg-xinput", "xorg-xkbcomp", 
"xorg-xmodmap", "xorg-xrandr", "xorg-xrdb", "xorg-xrefresh", 
"xorg-xset", "xorg-xsetroot", "xproto", "xterm", "xvidcore", 
"xz", "zip", "zlib", "zsh", "zvbi"), class = "factor")), .Names = c("Zaman", 
"Operasyon", "Paket"), row.names = c(NA, -730L), class = "data.frame")
4

5 回答 5

5

你必须表达你想要的日子;这应该可以解决问题:

table(factor(format(data$Zaman,"%D")))
于 2013-01-27T16:39:45.477 回答
3

Use cut,它具有对使用日期的内置支持:

attributes(data$Zaman)$tzone <- "GMT"
table(cut(data$Zaman, "1 day"))
#
# 2013-01-18 2013-01-19 2013-01-20 2013-01-21 2013-01-22 2013-01-23 2013-01-24 2013-01-25 2013-01-26 
#        339        209         20          8         76         56          0         10         12 

table(cut(data$Zaman, "2 days"))
#
# 2013-01-18 2013-01-20 2013-01-22 2013-01-24 2013-01-26 
#        548         28        132         10         12 
于 2013-01-27T16:50:42.013 回答
3

对于这些任务,我偏爱 data.table:

library(data.table)
dt <- as.data.table(df)
dt[,days:=format(Zaman,"%d.%m.%Y")]
dt[,.N,by=days]

         days   N
1: 18.01.2013 133
2: 19.01.2013 415
3: 20.01.2013  20
<snip>
于 2013-01-27T16:51:17.810 回答
1

由于没有名为 的函数,您会收到 count 错误count

但是你可以使用countpackage plyr

 count(dat, vars = 'Zaman')
                 Zaman freq
1  2013-01-18 20:39:00   66
2  2013-01-18 20:40:00   16
3  2013-01-18 20:41:00   47
4  2013-01-18 20:52:00    1
5  2013-01-18 23:47:00    1
6  2013-01-18 23:53:00    2
7  2013-01-19 00:04:00   68
8  2013-01-19 00:05:00    9
9  2013-01-19 00:06:00    4
10 2013-01-19 00:08:00    3
11 2013-01-19 00:11:00    9
12 2013-01-19 00:14:00    1
13 2013-01-19 00:19:00   89
14 2013-01-19 00:20:00    9
于 2013-01-27T16:44:48.987 回答
0

也许您只是在寻找length功能?

> aggregate(data,by=list(data$zaman),FUN=length)
              Group.1 zaman oper paket
1 2013-01-18 21:39:00     6    6     6
于 2013-01-27T16:45:13.603 回答