The R Project SVN R

Rev

Rev 72835 | Rev 74117 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 72835 Rev 73190
Line 1... Line 1...
1
/*
1
/*
2
 *  R : A Computer Language for Statistical Data Analysis
2
 *  R : A Computer Language for Statistical Data Analysis
3
 *  Copyright (C) 1995, 1996  Robert Gentleman and Ross Ihaka
-
 
4
 *  Copyright (C) 1998-2017   The R Core Team
3
 *  Copyright (C) 1998-2017   The R Core Team
5
 *  Copyright (C) 2002-2015   The R Foundation
4
 *  Copyright (C) 2002-2015   The R Foundation
-
 
5
 *  Copyright (C) 1995, 1996  Robert Gentleman and Ross Ihaka
6
 *
6
 *
7
 *  This program is free software; you can redistribute it and/or modify
7
 *  This program is free software; you can redistribute it and/or modify
8
 *  it under the terms of the GNU General Public License as published by
8
 *  it under the terms of the GNU General Public License as published by
9
 *  the Free Software Foundation; either version 2 of the License, or
9
 *  the Free Software Foundation; either version 2 of the License, or
10
 *  (at your option) any later version.
10
 *  (at your option) any later version.
Line 2100... Line 2100...
2100
	if (nans && lendat)
2100
	if (nans && lendat)
2101
	    xcopyRawWithRecycle(RAW(ans), RAW(vals), 0, nans, lendat);
2101
	    xcopyRawWithRecycle(RAW(ans), RAW(vals), 0, nans, lendat);
2102
	else
2102
	else
2103
	    for (i = 0; i < nans; i++) RAW(ans)[i] = 0;
2103
	    for (i = 0; i < nans; i++) RAW(ans)[i] = 0;
2104
	break;
2104
	break;
2105
    /* Rest are already initialized */
-
 
2106
    case STRSXP:
2105
    case STRSXP:
2107
	if (nans && lendat)
2106
	if (nans && lendat)
2108
	    xcopyStringWithRecycle(ans, vals, 0, nans, lendat);
2107
	    xcopyStringWithRecycle(ans, vals, 0, nans, lendat);
-
 
2108
	else
-
 
2109
	    for (i = 0; i < nans; i++) SET_STRING_ELT(ans, i, NA_STRING);
2109
	break;
2110
	break;
-
 
2111
    /* Rest are already initialized */
2110
    case VECSXP:
2112
    case VECSXP:
2111
    case EXPRSXP:
2113
    case EXPRSXP:
2112
#ifdef SWITCH_TO_REFCNT
2114
#ifdef SWITCH_TO_REFCNT
2113
	if (nans && lendat)
2115
	if (nans && lendat)
2114
	    xcopyVectorWithRecycle(ans, vals, 0, nans, lendat);
2116
	    xcopyVectorWithRecycle(ans, vals, 0, nans, lendat);