Skip to content

Commit

Permalink
Merge pull request #601 from MichaelChirico/typos
Browse files Browse the repository at this point in the history
Fix typos
  • Loading branch information
SebKrantz committed Jun 20, 2024
2 parents 0e4454b + d449521 commit a53242b
Show file tree
Hide file tree
Showing 26 changed files with 52 additions and 52 deletions.
2 changes: 1 addition & 1 deletion R/BY.R
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ BY.data.frame <- function(x, g, FUN, ..., use.g.names = TRUE, sort = .op[["sort"
if(length(res1) == g[[1L]]) rn <- GRPnames(g)
else if(matl) {
rn <- if(length(res1) == n && is.character(rownam) && rownam[1L] != "1" && (reorder || isTRUE(g$ordered[2L]))) rownam else NULL
} else { # Important to check lenth(rn) below (simply keeps ax[["row.names"]])
} else { # Important to check length(rn) below (simply keeps ax[["row.names"]])
rn <- if(length(res1) != n || !(reorder || isTRUE(g$ordered[2L]))) .set_row_names(length(res1)) else NULL
}
}
Expand Down
2 changes: 1 addition & 1 deletion R/fhdbetween_fhdwithin.R
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ getfl <- function(mf) {
if(lsf) fctdat <- mf[singlefct] # unattrib() -> wrap around at the end... Nah, better with names...
if(lff) fctdat <- c(fctdat, lapply(intterms[fctfct], finteract, TRUE, mf))

# Any heterogenous slopes
# Any heterogeneous slopes
if(lff != length(intterms)) {
intslope <- intterms[!fctfct]
slflag <- integer(lsf)
Expand Down
4 changes: 2 additions & 2 deletions R/fsubset_ftransform_fmutate.R
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ acr_get_funs <- function(.fnsexp, .fns, ...) {
names(.fns) <- .fns
.fns <- lapply(.fns, ...) # lapply(.fns, match.fun())
if(is.null(namfun)) namfun <- names(.fns)
} else stop(".fns must be a fucntion, list of functions or character vector of function names")
} else stop(".fns must be a function, list of functions or character vector of function names")

return(list(namfun = namfun, funs = .fns))
}
Expand Down Expand Up @@ -643,7 +643,7 @@ mutate_funi_grouped <- function(i, data, .data_, funs, aplvec, ce, ...) {
do_grouped_expr <- function(ei, nfun, .data, g, pe) {
v <- all.vars(ei) # unique = FALSE -> not needed anymore... can turn expressions into functions...
if(length(v) > 1L) {
# Could include global environemntal variables e.g. fmutate(data, new = mean(var) + q)
# Could include global environmental variables e.g. fmutate(data, new = mean(var) + q)
namd <- names(.data)
if(length(wv <- na_rm(match(v, namd))) > 1L) return(unlist(gsplit_multi_apply(.data[wv], g, ei, pe), FALSE, FALSE))
return(gsplit_single_apply(.data[[wv]], g, ei, namd[wv], pe))
Expand Down
6 changes: 3 additions & 3 deletions R/list_functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ list_extract_names <- function(l, nam, ret, keep.tree = FALSE, nkeep_class = TRU
if(nkeep_class && is.object(x)) oldClass(x) <- NULL
if(any(subl <- .Call(C_vtypes, x, ret))) {
matches <- names(x) %in% nam
wres <- which(matches) # match(nam, names(x), 0L) # better bcause gives integer(0) -> necessary as cannot do l[[0L]]
wres <- which(matches) # match(nam, names(x), 0L) # better because gives integer(0) -> necessary as cannot do l[[0L]]
wnressubl <- which(if(length(wres)) subl & !matches else subl) # fsetdiff(which(subl), wres) # old solution: faster but does not work well if parent list is unnamed ! (i.e. l = list(lm1, lm1))
if(length(wnressubl)) {
a <- lapply(x[wnressubl], regsearch)
Expand All @@ -282,7 +282,7 @@ list_extract_names <- function(l, nam, ret, keep.tree = FALSE, nkeep_class = TRU
} else if(keep.tree || length(wres) != 1L) return(x[wres]) else return(x[[wres]])
} else {
matches <- which(names(x) %in% nam)
if(keep.tree || length(matches) != 1L) return(x[matches]) else return(x[[matches]]) # needs to be !=, because interger(0) goes in first..
if(keep.tree || length(matches) != 1L) return(x[matches]) else return(x[[matches]]) # needs to be !=, because integer(0) goes in first..
}
}
}
Expand All @@ -303,7 +303,7 @@ list_extract_ind <- function(l, ind, is.subl, keep.tree = FALSE, nkeep_class = T
}

# Note: all functions currently remove empty list elements !
# keep.tree argument still issues wih xlevels
# keep.tree argument still issues with xlevels

get_elem <- function(l, elem, recursive = TRUE, DF.as.list = FALSE,
keep.tree = FALSE, keep.class = FALSE,
Expand Down
2 changes: 1 addition & 1 deletion R/recode_replace.R
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ replace_outliers <- function(X, limits, value = NA,
if(sl == 5L || sl == 7L) ignore.groups <- TRUE
} else sl <- 0L

if(sl > 3L) { # Outliers according to standard deviation or MAD threashold
if(sl > 3L) { # Outliers according to standard deviation or MAD threshold
if(is.list(X)) {
if(!ignore.groups && inherits(X, c("grouped_df", "pdata.frame"))) {
if(is.character(value)) stop("clipping is not yet supported with grouped/panel data and SDs/MADs thresholds.")
Expand Down
2 changes: 1 addition & 1 deletion R/unlist2d.R
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ unlist2d <- function(l, idcols = ".id", row.names = FALSE, recursive = TRUE, id.
x <- `names<-`(c(list(if(is.null(dn[[1L]])) seq_len(d[1L]) else dn[[1L]]), .Call(Cpp_mctl, x, FALSE, 0L)), c(row.names, dn[[2L]]))
} else x <- .Call(Cpp_mctl, x, TRUE, 0L)
} else x <- as.vector(x, "list")
if (is.null(names(x))) names(x) <- paste0("V", seq_along(x)) # it seems this is not yet working for all (i.e. model objects..), also perhaps not start at V1, depending on what other columsn there are.. i.e start at the right position ?
if (is.null(names(x))) names(x) <- paste0("V", seq_along(x)) # it seems this is not yet working for all (i.e. model objects..), also perhaps not start at V1, depending on what other columsn there are.. i.e. start at the right position ?
return(x)
}
ul2d <- function(y) {
Expand Down
2 changes: 1 addition & 1 deletion R/zzz.R
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ do_collapse_restore_exports <- function(clpns) {
.onLoad <- function(libname, pkgname) {

res <- .Call(C_collapse_init, "init.success")
if(!is.character(res) || res != "init.success") stop("collapse not succesfully loaded!")
if(!is.character(res) || res != "init.success") stop("collapse not successfully loaded!")

# https://stackoverflow.com/questions/12598242/global-variables-in-packages-in-r
# https://stackoverflow.com/questions/49056642/r-how-to-make-variable-available-to-namespace-at-loading-time?noredirect=1&lq=1
Expand Down
2 changes: 1 addition & 1 deletion src/ExportSymbols.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ void R_init_collapse(DllInfo *dll) {
recommend you contact me if you want to use a C function in a package. I am always happy to answer questions
regarding the arguments and use of certain C functions. */

// Funtions that fully operate on R vectors (SEXP) // Corresponding R function(s)
// Functions that fully operate on R vectors (SEXP) // Corresponding R function(s)
R_RegisterCCallable("collapse", "cp_TRA", (DL_FUNC) &TRAC); // TRA.default()
R_RegisterCCallable("collapse", "cp_setop", (DL_FUNC) &setop); // setop()
R_RegisterCCallable("collapse", "cp_range", (DL_FUNC) &frange); // frange()
Expand Down
2 changes: 1 addition & 1 deletion src/TRA.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ SEXP ret1(SEXP x, SEXP xAG, SEXP g, int set) {
// 1 - x is classed (factor, date, time series), xAG is not classed. i.e. vector of fnobs, fmean etc.
// -> Sallow replacing, removing class and levels attributes from x, discard attributes of xAG (if any)
// -> or (if type matches i.e. double for date or time series), copy attributes of x unless x is a factor
// 2 - x is not classed, xAG is classed (factor, date, time series). - an unusual situation should not occurr - copy attributes of xAG, discard attributes of x
// 2 - x is not classed, xAG is classed (factor, date, time series). - an unusual situation should not occur - copy attributes of xAG, discard attributes of x
// 3 - xAG and x are classed - same as above, keep attributes of xAG, discard attributes of x
// 4 - neither x nor xAG are classed - preserve attributes of x, discard attributes of xAG (if any)
//
Expand Down
4 changes: 2 additions & 2 deletions src/base_radixsort.c
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ static void icount(int *x, int *o, int n)
int napos = range; // NA's always counted in last bin
// static is IMPORTANT, counting sort is called repetitively.
static unsigned int counts[N_RANGE + 1] = { 0 };
/* counts are set back to 0 at the end efficiently. 1e5 = 0.4MB i.e
/* counts are set back to 0 at the end efficiently. 1e5 = 0.4MB i.e.
tiny. We'll only use the front part of it, as large as range. So it's
just reserving space, not using it. Have defined N_RANGE to be 100000.*/
if (range > N_RANGE)
Expand Down Expand Up @@ -1223,7 +1223,7 @@ static void csort(SEXP * x, int *o, int n)
}
// all i* push onto stack. Using their counts may be faster here
// than thrashing SEXP fetches over several passes as cgroup does
// (but cgroup needs that to keep orginal order, and cgroup saves
// (but cgroup needs that to keep original order, and cgroup saves
// the sort in csort_pre).
}

Expand Down
2 changes: 1 addition & 1 deletion src/data.table_rbindlist.c
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ SEXP rbindlist(SEXP l, SEXP usenamesArg, SEXP fillArg, SEXP idcolArg)
// ^^ #3915 and tests 2015.2-5
for (int r=0; r<thisnrow; ++r) targetd[ansloc+r] = val;
} else {
// length(thisCol)==thisnrow alreay checked before this truelength-clobber region
// length(thisCol)==thisnrow already checked before this truelength-clobber region
// If all i==truelength(i) then just do a memcpy since hop is identity. Otherwise hop via the integer map.
bool hop = false;
if (orderedFactor) {
Expand Down
6 changes: 3 additions & 3 deletions src/data.table_subset.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ static SEXP shallow(SEXP dt, SEXP cols, R_len_t n)
SEXP newdt = PROTECT(allocVector(VECSXP, n)); protecti++; // to do, use growVector here?
SET_ATTRIB(newdt, shallow_duplicate(ATTRIB(dt)));
SET_OBJECT(newdt, OBJECT(dt));
IS_S4_OBJECT(dt) ? SET_S4_OBJECT(newdt) : UNSET_S4_OBJECT(newdt); // To support S4 objects that incude data.table
IS_S4_OBJECT(dt) ? SET_S4_OBJECT(newdt) : UNSET_S4_OBJECT(newdt); // To support S4 objects that include data.table
//SHALLOW_DUPLICATE_ATTRIB(newdt, dt); // SHALLOW_DUPLICATE_ATTRIB would be a bit neater but is only available from R 3.3.0

// TO DO: keepattr() would be faster, but can't because shallow isn't merely a shallow copy. It
Expand Down Expand Up @@ -189,7 +189,7 @@ void subsetVectorRaw(SEXP ans, SEXP source, SEXP idx, const bool anyNA)
}
// For small n such as 2,3,4 etc we hope OpenMP will be sensible inside it and not create a team with each thread doing just one item. Otherwise,
// call overhead would be too high for highly iterated calls on very small subests. Timings were tested in #3175
// Futher, we desire (currently at least) to stress-test the threaded code (especially in latest R-devel) on small data to reduce chance that bugs
// Further, we desire (currently at least) to stress-test the threaded code (especially in latest R-devel) on small data to reduce chance that bugs
// arise only over a threshold of n.

switch(TYPEOF(source)) {
Expand Down Expand Up @@ -244,7 +244,7 @@ void subsetVectorRaw(SEXP ans, SEXP source, SEXP idx, const bool anyNA)

static const char *check_idx(SEXP idx, int max, bool *anyNA_out) // , bool *orderedSubset_out) Not needed
// set anyNA for branchless subsetVectorRaw
// error if any negatives, zeros or >max since they should have been dealt with by convertNegAndZeroIdx() called ealier at R level.
// error if any negatives, zeros or >max since they should have been dealt with by convertNegAndZeroIdx() called earlier at R level.
// single cache efficient sweep with prefetch, so very low priority to go parallel
{
if (!isInteger(idx)) error("Internal error. 'idx' is type '%s' not 'integer'", type2char(TYPEOF(idx))); // # nocov
Expand Down
2 changes: 1 addition & 1 deletion src/ffirst.c
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ SEXP ffirstlC(SEXP x, SEXP Rng, SEXP g, SEXP gst, SEXP Rnarm) {
int l = length(x), *pgl, ng = asInteger(Rng), narm = asLogical(Rnarm), nprotect = 1;
if(ng > 0 && !narm) {
if(length(gst) != ng) {
// Cant use integer array here because apparently it is removed by the garbage collector when passed to a new function
// Can't use integer array here because apparently it is removed by the garbage collector when passed to a new function
SEXP gl = PROTECT(allocVector(INTSXP, ng)); ++nprotect;
int *pg = INTEGER(g), lg = length(g); // gl[ng],
pgl = INTEGER(gl); // pgl = &gl[0];
Expand Down
6 changes: 3 additions & 3 deletions src/fmean.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ SEXP fmeanC(SEXP x, SEXP Rng, SEXP g, SEXP gs, SEXP w, SEXP Rnarm, SEXP Rnthread
} else {
if(l != length(w)) error("length(w) must match length(x)");
if(TYPEOF(w) != REALSXP) {
if(TYPEOF(w) != INTSXP && TYPEOF(w) != LGLSXP) error("weigths must be double or integer");
if(TYPEOF(w) != INTSXP && TYPEOF(w) != LGLSXP) error("weights must be double or integer");
w = PROTECT(coerceVector(w, REALSXP)); ++nprotect;
}
if(tx != REALSXP) {
Expand Down Expand Up @@ -350,7 +350,7 @@ SEXP fmeanmC(SEXP x, SEXP Rng, SEXP g, SEXP gs, SEXP w, SEXP Rnarm, SEXP Rdrop,
} else {
if(l != length(w)) error("length(w) must match nrow(x)");
if(TYPEOF(w) != REALSXP) {
if(TYPEOF(w) != INTSXP && TYPEOF(w) != LGLSXP) error("weigths must be double or integer");
if(TYPEOF(w) != INTSXP && TYPEOF(w) != LGLSXP) error("weights must be double or integer");
w = PROTECT(coerceVector(w, REALSXP)); ++nprotect;
}
if(tx != REALSXP) {
Expand Down Expand Up @@ -510,7 +510,7 @@ SEXP fmeanlC(SEXP x, SEXP Rng, SEXP g, SEXP gs, SEXP w, SEXP Rnarm, SEXP Rdrop,
if(!nwl) {
if(length(VECTOR_ELT(x, 0)) != length(w)) error("length(w) must match nrow(x)");
if(TYPEOF(w) != REALSXP) {
if(TYPEOF(w) != INTSXP && TYPEOF(w) != LGLSXP) error("weigths must be double or integer");
if(TYPEOF(w) != INTSXP && TYPEOF(w) != LGLSXP) error("weights must be double or integer");
w = PROTECT(coerceVector(w, REALSXP)); ++nprotect;
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/fnth_fmedian_fquantile.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ SEXP fquantileC(SEXP x, SEXP Rprobs, SEXP w, SEXP o, SEXP Rnarm, SEXP Rtype, SEX
unsigned int l = 0;

for(int i = 0; i < np; ++i) {
if(probs[i] < 0.0 || probs[i] > 1.0) error("probabilities need to be in in range [0, 1]");
if(probs[i] < 0.0 || probs[i] > 1.0) error("probabilities need to be in range [0, 1]");
if(i > 0 && probs[i] < probs[i-1]) error("probabilities need to be passed in ascending order");
}

Expand Down Expand Up @@ -1294,7 +1294,7 @@ if(isNull(ord)) {
/*
Function for atomic vectors: has extra arguments o and checko for passing external ordering vector.
This is meant to speed up computation of several (grouped) quantiles on the same data.
Note that for grouped execution the ordering vector needs to take into account the grouping e.g radixorder(GRPid(), myvar).
Note that for grouped execution the ordering vector needs to take into account the grouping e.g. radixorder(GRPid(), myvar).
*/
SEXP fnthC(SEXP x, SEXP p, SEXP g, SEXP w, SEXP Rnarm, SEXP Rret, SEXP Rnthreads, SEXP o, SEXP checko) {

Expand Down Expand Up @@ -1622,7 +1622,7 @@ SEXP fnthmC(SEXP x, SEXP p, SEXP g, SEXP w, SEXP Rnarm, SEXP Rdrop, SEXP Rret, S

if(l < 1 || (l == 1 && nullw)) {
if(TYPEOF(x) == REALSXP || TYPEOF(x) == INTSXP || TYPEOF(x) == LGLSXP) return x;
error("Unsopported SEXP type: '%s'", type2char(TYPEOF(x)));
error("Unsupported SEXP type: '%s'", type2char(TYPEOF(x)));
}

double *restrict pw = &Q, h = DBL_MIN;
Expand Down
4 changes: 2 additions & 2 deletions src/fprod.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ SEXP fprodC(SEXP x, SEXP Rng, SEXP g, SEXP w, SEXP Rnarm) {
SEXP xr, wr;
double *px, *pw;
if(tw != REALSXP) {
if(tw != INTSXP && tw != LGLSXP) error("weigths must be double or integer");
if(tw != INTSXP && tw != LGLSXP) error("weights must be double or integer");
wr = PROTECT(coerceVector(w, REALSXP));
pw = REAL(wr);
++nprotect;
Expand Down Expand Up @@ -196,7 +196,7 @@ SEXP fprodmC(SEXP x, SEXP Rng, SEXP g, SEXP w, SEXP Rnarm, SEXP Rdrop) {
SEXP xr, wr;
double *px, *pw;
if(tw != REALSXP) {
if(tw != INTSXP && tw != LGLSXP) error("weigths must be double or integer");
if(tw != INTSXP && tw != LGLSXP) error("weights must be double or integer");
wr = PROTECT(coerceVector(w, REALSXP));
pw = REAL(wr);
++nprotect;
Expand Down
2 changes: 1 addition & 1 deletion src/fscale.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ using namespace Rcpp;
// Notes:
// for mean there are 2 options: "overall.mean" = R_NegInf adds the overall mean. default is centering on 0, or centering on a mean provided, or FALSE = R_PosInf -> no centering, scaling preserves mean
// for sd there is "within.sd" = R_NegInf, scaling by the frequency weighted within-group sd, default is 1, or scaling by a sd provided.
// All other comments are in fvar.cpp (in C++ folder, not on Github)
// All other comments are in fvar.cpp (in C++ folder, not on GitHub)

// [[Rcpp::export]]
NumericVector fscaleCpp(const NumericVector& x, int ng = 0, const IntegerVector& g = 0, const SEXP& w = R_NilValue,
Expand Down
8 changes: 4 additions & 4 deletions src/fsum.c
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ SEXP fsumC(SEXP x, SEXP Rng, SEXP g, SEXP w, SEXP Rnarm, SEXP fill, SEXP Rnthrea
} else {
if(l != length(w)) error("length(w) must match length(x)");
if(TYPEOF(w) != REALSXP) {
if(TYPEOF(w) != INTSXP && TYPEOF(w) != LGLSXP) error("weigths must be double or integer");
if(TYPEOF(w) != INTSXP && TYPEOF(w) != LGLSXP) error("weights must be double or integer");
w = PROTECT(coerceVector(w, REALSXP)); ++nprotect;
}
if(tx != REALSXP) {
Expand Down Expand Up @@ -446,7 +446,7 @@ SEXP fsummC(SEXP x, SEXP Rng, SEXP g, SEXP w, SEXP Rnarm, SEXP fill, SEXP Rdrop,
} else {
if(l != length(w)) error("length(w) must match nrow(x)");
if(TYPEOF(w) != REALSXP) {
if(TYPEOF(w) != INTSXP && TYPEOF(w) != LGLSXP) error("weigths must be double or integer");
if(TYPEOF(w) != INTSXP && TYPEOF(w) != LGLSXP) error("weights must be double or integer");
w = PROTECT(coerceVector(w, REALSXP)); ++nprotect;
}
if(tx != REALSXP) {
Expand Down Expand Up @@ -627,7 +627,7 @@ SEXP fsumlC(SEXP x, SEXP Rng, SEXP g, SEXP w, SEXP Rnarm, SEXP fill, SEXP Rdrop,
if(!nwl) {
if(length(VECTOR_ELT(x, 0)) != length(w)) error("length(w) must match nrow(x)");
if(TYPEOF(w) != REALSXP) {
if(TYPEOF(w) != INTSXP && TYPEOF(w) != LGLSXP) error("weigths must be double or integer");
if(TYPEOF(w) != INTSXP && TYPEOF(w) != LGLSXP) error("weights must be double or integer");
w = PROTECT(coerceVector(w, REALSXP)); ++nprotect;
}
}
Expand Down Expand Up @@ -788,7 +788,7 @@ SEXP fsumlC(SEXP x, SEXP Rng, SEXP g, SEXP w, SEXP Rnarm, SEXP fill, SEXP Rdrop,
// SEXP xr, wr;
// double *px, *pw, *pout = REAL(out);
// if(tw != REALSXP) {
// if(tw != INTSXP && tw != LGLSXP) error("weigths must be double or integer");
// if(tw != INTSXP && tw != LGLSXP) error("weights must be double or integer");
// wr = PROTECT(coerceVector(w, REALSXP));
// pw = REAL(wr);
// ++nprotect;
Expand Down
2 changes: 1 addition & 1 deletion src/fvar_fsd.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include <Rcpp.h>
using namespace Rcpp;

// Note: More comments are in fvar.cpp (C++ folder, not on Github)
// Note: More comments are in fvar.cpp (C++ folder, not on GitHub)

// [[Rcpp::export]]
NumericVector fvarsdCpp(const NumericVector& x, int ng = 0, const IntegerVector& g = 0, const SEXP& gs = R_NilValue,
Expand Down
4 changes: 2 additions & 2 deletions src/handle_attributes.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ SEXP duplAttributes(SEXP x, SEXP y) { // also look at data.table's keepattribute
// 1 - x is classed (factor, date, time series), xAG is not classed. i.e. vector of fnobs, fmean etc.
// -> Sallow replacing, removing class and levels attributes from x, discard attributes of xAG (if any)
// -> or (if type matches i.e. double for date or time series), copy attributes of x unless x is a factor
// 2 - x is not classed, xAG is classed (factor, date, time series). - an unusual situation should not occurr - copy attributes of xAG, discard attributes of x
// 2 - x is not classed, xAG is classed (factor, date, time series). - an unusual situation should not occur - copy attributes of xAG, discard attributes of x
// 3 - xAG and x are classed - same as above, keep attributes of xAG, discard attributes of x
// 4 - neither x nor xAG are classed - preserve attributes of x, discard attributes of xAG (if any)
//
Expand Down Expand Up @@ -126,7 +126,7 @@ SEXP CcopyMostAttrib(SEXP to, SEXP from) {
// void duplattributes(SEXP x, SEXP y) {
// SHALLOW_DUPLICATE_ATTRIB(x, y); // SET_ATTRIB(x, ATTRIB(y));
// classgets(x, getAttrib(y, R_ClassSymbol)); // This solves the warning message !!
// just to return R_NilValue; and the SEXP... retrns NULL anyway
// just to return R_NilValue; and the SEXP... returns NULL anyway
// }

// No longer needed... using copyMostAttributes instead
Expand Down
Loading

0 comments on commit a53242b

Please sign in to comment.