Weird change in behavior of summary() function
Follow-up: I have confirmed that it is something in my local R library such that when I remove /Users/hellyj/Library/R/4.0 the behavior of summary() returns to what I expect. J. > summary(PRISM) ??? DAUCO???????????? Longitude???????? Latitude Precipitation???????? Year????????? Month ?Length:538790????? Min.?? :-121.4?? Min.?? :41.54?? Min.?? : 0.00?? Min.?? :1895?? Min.?? : 1.000 ?Class :character?? 1st Qu.:-121.2?? 1st Qu.:41.71?? 1st Qu.: 10.65?? 1st Qu.:1926?? 1st Qu.: 3.000 ?Mode? :character?? Median :-121.0?? Median :41.79?? Median : 24.41?? Median :1957?? Median : 6.000 ??????????????????? Mean?? :-121.0?? Mean?? :41.79?? Mean?? : 31.09?? Mean?? :1957?? Mean?? : 6.488 ??????????????????? 3rd Qu.:-120.9?? 3rd Qu.:41.88?? 3rd Qu.: 43.73?? 3rd Qu.:1989?? 3rd Qu.: 9.000 ??????????????????? Max.?? :-120.6?? Max.?? :41.96?? Max. :265.08?? Max.?? :2020?? Max.?? :12.000
On 12/14/20 12:41, John Helly wrote:
Follow-up: I find that the problem does not occur on a Linux system, so it is either Mac-specific or some function of the libraries loaded on the problem machine. J. On 12/14/20 12:24, John Helly wrote:
Aloha.
I have been using the summary function (i.e., summary()) for years
and, in the last few weeks, suddenly find it behaving in an obviously
erroneous way.? I expect the DAUCO summary to be summary of the
character variable but it has these weird NULL:00125 values listed
for whatever the number of rows is.
It's not limited to this input data so I don't believe that it is
data-dependent at this point.
This just started happening a number of weeks ago.? I've done some
updates of the OS and apps since then and re-installed R from the Mac
*.dmg distro.
I have provided details below and my main questions are 1) has anyone
else seen this (I can't find any reports of it) and 2) how might I
debug this?
Thank you.
================ Input data sample (first few records from a flat
ASCII csv file) ================
DAUCO,Longitude,Latitude,Precipitation,Year,Month
00125,-121.416666667,41.9583333334,63.1469993591,1895,1
00125,-121.375,41.9583333334,63.6969985962,1895,1
00125,-121.333333333,41.9583333334,65.7460021973,1895,1
00125,-121.291666667,41.9583333334,69.4150009155,1895,1
00125,-121.25,41.9583333334,74.0780029297,1895,1
================ R commands and output
=============================================
PRISM??????? = read.table(PRISM_INPUT,header=TRUE, sep=',',
colClasses=c('character','numeric','numeric','numeric','numeric','numeric'))
summary(PRISM)
? DAUCO???????? Longitude???????? Latitude Precipitation Year????????? Month ?NULL:00125?? Min.?? :-121.4?? Min.?? :41.54?? Min.?? :? 0.00 Min.?? :1895?? Min.?? : 1.000 ?NULL:00125?? 1st Qu.:-121.2?? 1st Qu.:41.71?? 1st Qu.: 10.65 1st Qu.:1926?? 1st Qu.: 3.000 ?NULL:00125?? Median :-121.0?? Median :41.79?? Median : 24.41 Median :1957?? Median : 6.000 ?NULL:00125?? Mean?? :-121.0?? Mean?? :41.79?? Mean?? : 31.09 Mean?? :1957?? Mean?? : 6.488 ?NULL:00125?? 3rd Qu.:-120.9?? 3rd Qu.:41.88?? 3rd Qu.: 43.73 3rd Qu.:1989?? 3rd Qu.: 9.000 ?NULL:00125?? Max.?? :-120.6?? Max.?? :41.96?? Max.?? :265.08 Max.?? :2020?? Max.?? :12.000 ?NULL:00125 ?NULL:00125
dput(head(PRISM))
structure(list(DAUCO = c("00125", "00125", "00125", "00125",
"00125", "00125"), Longitude = c(-121.416666667, -121.375,
-121.333333333,
-121.291666667, -121.25, -121.208333333), Latitude = c(41.9583333334,
41.9583333334, 41.9583333334, 41.9583333334, 41.9583333334,
41.9583333334
), Precipitation = c(63.1469993591, 63.6969985962, 65.7460021973,
69.4150009155, 74.0780029297, 80.4290008545), Year = c(1895,
1895, 1895, 1895, 1895, 1895), Month = c(1, 1, 1, 1, 1, 1)),
row.names = c(NA,
6L), class = "data.frame")
sessionInfo()
R version 4.0.3 (2020-10-10) Platform: x86_64-apple-darwin17.0 (64-bit) Running under: macOS Catalina 10.15.7 Matrix products: default BLAS: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRblas.dylib LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1] stats???? graphics? grDevices utils???? datasets? methods base other attached packages: [1] reshape_0.8.8 plyr_1.8.6??? ggplot2_3.3.2 loaded via a namespace (and not attached): ?[1] Rcpp_1.0.4.6????????? pillar_1.4.4 DEoptimR_1.0-8 compiler_4.0.3??????? RColorBrewer_1.1-2 ?[6] iterators_1.0.12????? digest_0.6.25 lifecycle_0.2.0 tibble_3.0.1????????? gtable_0.3.0 [11] nlme_3.1-149????????? lattice_0.20-41 pkgconfig_2.0.3 rlang_0.4.6?????????? foreach_1.5.0 [16] Matrix_1.2-18???????? parallel_4.0.3 ergm_3.10.4 coda_0.19-3?????????? withr_2.2.0 [21] dplyr_1.0.0?????????? generics_0.0.2 vctrs_0.3.1 networkDynamic_0.10.1 trust_0.1-8 [26] grid_4.0.3??????????? tidyselect_1.1.0 deSolve_1.28 robustbase_0.93-6???? glue_1.4.1 [31] R6_2.4.1????????????? farver_2.0.3 purrr_0.3.4 magrittr_1.5????????? codetools_0.2-16 [36] scales_1.1.1????????? ellipsis_0.3.1 MASS_7.3-53 lpSolve_5.6.15??????? colorspace_1.4-1 [41] ape_5.4?????????????? labeling_0.3 network_1.16.0 lazyeval_0.2.2??????? doParallel_1.0.15 [46] EpiModel_1.8.0??????? munsell_0.5.0 tergm_3.6.1 statnet.common_4.3.0? crayon_1.3.4
John Helly, University of California, San Diego / San Diego Supercomputer Center / Scripps Institution of Oceanography / 760 840 8660 mobile / http://www.sdsc.edu/~hellyj ORCID ID: orcid.org/0000-0002-3779-0603