View | Details | Raw Unified | Return to bug 17147
Collapse All | Expand All

(-)20161017/table.R (-1 / +1 lines)
Lines 52-58 Link Here
52
	stop("nothing to tabulate")
52
	stop("nothing to tabulate")
53
    if (length(args) == 1L && is.list(args[[1L]])) { ## e.g. a data.frame
53
    if (length(args) == 1L && is.list(args[[1L]])) { ## e.g. a data.frame
54
	args <- args[[1L]]
54
	args <- args[[1L]]
55
	if (length(dnn) != length(args))
55
	if (missing(dnn) || length(dnn) != length(args))
56
	    dnn <- if (!is.null(argn <- names(args))) argn
56
	    dnn <- if (!is.null(argn <- names(args))) argn
57
		   else paste(dnn[1L], seq_along(args), sep = ".")
57
		   else paste(dnn[1L], seq_along(args), sep = ".")
58
    }
58
    }
(-)20161017/xtabs.R (-2 / +2 lines)
Lines 1-7 Link Here
1
#  File src/library/stats/R/xtabs.R
1
#  File src/library/stats/R/xtabs.R
2
#  Part of the R package, https://www.R-project.org
2
#  Part of the R package, https://www.R-project.org
3
#
3
#
4
#  Copyright (C) 1995-2015 The R Core Team
4
#  Copyright (C) 1995-2016 The R Core Team
5
#
5
#
6
#  This program is free software; you can redistribute it and/or modify
6
#  This program is free software; you can redistribute it and/or modify
7
#  it under the terms of the GNU General Public License as published by
7
#  it under the terms of the GNU General Public License as published by
Lines 58-64 Link Here
58
    if(!sparse) {
58
    if(!sparse) {
59
	x <-
59
	x <-
60
	    if(is.null(y))
60
	    if(is.null(y))
61
		do.call("table", by)
61
		table(by)
62
	    else if(NCOL(y) == 1L)
62
	    else if(NCOL(y) == 1L)
63
		tapply(y, by, sum)
63
		tapply(y, by, sum)
64
	    else {
64
	    else {

Return to bug 17147