1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 6224 6225 6226 6227 6228 6229 6230 6231 6232 6233 6234 6235 6236 6237 6238 6239 6240 6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 6275 6276 6277 6278 6279 6280 6281 6282 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6298 6299 6300 6301 6302 6303 6304 6305 6306 6307 6308 6309 6310 6311 6312 6313 6314 6315 6316 6317 6318 6319 6320 6321 6322 6323 6324 6325 6326 6327 6328 6329 6330 6331 6332 6333 6334 6335 6336 6337 6338 6339 6340 6341 6342 6343 6344 6345 6346 6347 6348 6349 6350 6351 6352 6353 6354 6355 6356 6357 6358 6359 6360 6361 6362 6363 6364 6365 6366 6367 6368 6369 6370 6371 6372 6373 6374 6375 6376 6377 6378 6379 6380 6381 6382 6383 6384 6385 6386 6387 6388 6389 6390 6391 6392 6393 6394 6395 6396 6397 6398 6399 6400 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410 6411 6412 6413 6414 6415 6416 6417 6418 6419 6420 6421 6422 6423 6424 6425 6426 6427 6428 6429 6430 6431 6432 6433 6434 6435 6436 6437 6438 6439 6440 6441 6442 6443 6444 6445 6446 6447 6448 6449 6450 6451 6452 6453 6454 6455 6456 6457 6458 6459 6460 6461 6462 6463 6464 6465 6466 6467 6468 6469 6470 6471 6472 6473 6474 6475 6476 6477 6478 6479 6480 6481 6482 6483 6484 6485 6486 6487 6488 6489 6490 6491 6492 6493 6494 6495 6496 6497 6498 6499 6500 6501 6502 6503 6504 6505 6506 6507 6508 6509 6510 6511 6512 6513 6514 6515 6516 6517 6518 6519 6520 6521 6522 6523 6524 6525 6526 6527 6528 6529 6530 6531 6532 6533 6534 6535 6536 6537 6538 6539 6540 6541 6542 6543 6544 6545 6546 6547 6548 6549 6550 6551 6552 6553 6554 6555 6556 6557 6558 6559 6560 6561 6562 6563 6564 6565 6566 6567 6568 6569 6570 6571 6572 6573 6574 6575 6576 6577 6578 6579 6580 6581 6582 6583 6584 6585 6586 6587 6588 6589 6590 6591 6592 6593 6594 6595 6596 6597 6598 6599 6600 6601 6602 6603 6604 6605 6606 6607 6608 6609 6610 6611 6612 6613 6614 6615 6616 6617 6618 6619 6620 6621 6622 6623 6624 6625 6626 6627 6628 6629 6630 6631 6632 6633 6634 6635 6636 6637 6638 6639 6640 6641 6642 6643 6644 6645 6646 6647 6648 6649 6650 6651 6652 6653 6654 6655 6656 6657 6658 6659 6660 6661 6662 6663 6664 6665 6666 6667 6668 6669 6670 6671 6672 6673 6674 6675 6676 6677 6678 6679 6680 6681 6682 6683 6684 6685 6686 6687 6688 6689 6690 6691 6692 6693 6694 6695 6696 6697 6698 6699 6700 6701 6702 6703 6704 6705 6706 6707 6708 6709 6710 6711 6712 6713 6714 6715 6716 6717 6718 6719 6720 6721 6722 6723 6724 6725 6726 6727 6728 6729 6730 6731 6732 6733 6734 6735 6736 6737 6738 6739 6740 6741 6742 6743 6744 6745 6746 6747 6748 6749 6750 6751 6752 6753 6754 6755 6756 6757 6758 6759 6760 6761 6762 6763 6764 6765 6766 6767 6768 6769 6770 6771 6772 6773 6774 6775 6776 6777 6778 6779 6780 6781 6782 6783 6784 6785 6786 6787 6788 6789 6790 6791 6792 6793 6794 6795 6796 6797 6798 6799 6800 6801 6802 6803 6804 6805 6806 6807 6808 6809 6810 6811 6812 6813 6814 6815 6816 6817 6818 6819 6820 6821 6822 6823 6824 6825 6826 6827 6828 6829 6830 6831 6832 6833 6834 6835 6836 6837 6838 6839 6840 6841 6842 6843 6844 6845 6846 6847 6848 6849 6850 6851 6852 6853 6854 6855 6856 6857 6858 6859 6860 6861 6862 6863 6864 6865 6866 6867 6868 6869 6870 6871 6872 6873 6874 6875 6876 6877 6878 6879 6880 6881 6882 6883 6884 6885 6886 6887 6888 6889 6890 6891 6892 6893 6894 6895 6896 6897 6898 6899 6900 6901 6902 6903 6904 6905 6906 6907 6908 6909 6910 6911 6912 6913 6914 6915 6916 6917 6918 6919 6920 6921 6922 6923 6924 6925 6926 6927 6928 6929 6930 6931 6932 6933 6934 6935 6936 6937 6938 6939 6940 6941 6942 6943 6944 6945 6946 6947 6948 6949 6950 6951 6952 6953 6954 6955 6956 6957 6958 6959 6960 6961 6962 6963 6964 6965 6966 6967 6968 6969 6970 6971 6972 6973 6974 6975 6976 6977 6978 6979 6980 6981 6982 6983 6984 6985 6986 6987 6988 6989 6990 6991 6992 6993 6994 6995 6996 6997 6998 6999 7000 7001 7002 7003 7004 7005 7006 7007 7008 7009 7010 7011 7012 7013 7014 7015 7016 7017 7018 7019 7020 7021 7022 7023 7024 7025 7026 7027 7028 7029 7030 7031 7032 7033 7034 7035 7036 7037 7038 7039 7040 7041 7042 7043 7044 7045 7046 7047 7048 7049 7050 7051 7052 7053 7054 7055 7056 7057 7058 7059 7060 7061 7062 7063 7064 7065 7066 7067 7068 7069 7070 7071 7072 7073 7074 7075 7076 7077 7078 7079 7080 7081 7082 7083 7084 7085 7086 7087 7088 7089 7090 7091 7092 7093 7094 7095 7096 7097 7098 7099 7100 7101 7102 7103 7104 7105 7106 7107 7108 7109 7110 7111 7112 7113 7114 7115 7116 7117 7118 7119 7120 7121 7122 7123 7124 7125 7126 7127 7128 7129 7130 7131 7132 7133 7134 7135 7136 7137 7138 7139 7140 7141 7142 7143 7144 7145 7146 7147 7148 7149 7150 7151 7152 7153 7154 7155 7156 7157 7158 7159 7160 7161 7162 7163 7164 7165 7166 7167 7168 7169 7170 7171 7172 7173 7174 7175 7176 7177 7178 7179 7180 7181 7182 7183 7184 7185 7186 7187 7188 7189 7190 7191 7192 7193 7194 7195 7196 7197 7198 7199 7200 7201 7202 7203 7204 7205 7206 7207 7208 7209 7210 7211 7212 7213 7214 7215 7216 7217 7218 7219 7220 7221 7222 7223 7224 7225 7226 7227 7228 7229 7230 7231 7232 7233 7234 7235 7236 7237 7238 7239 7240 7241 7242 7243 7244 7245 7246 7247 7248 7249 7250 7251 7252 7253 7254 7255 7256 7257 7258 7259 7260 7261 7262 7263 7264 7265 7266 7267 7268 7269 7270 7271 7272 7273 7274 7275 7276 7277 7278 7279 7280 7281 7282 7283 7284 7285 7286 7287 7288 7289 7290 7291 7292 7293 7294 7295 7296 7297 7298 7299 7300 7301 7302 7303 7304 7305 7306 7307 7308 7309 7310 7311 7312 7313 7314 7315 7316 7317 7318 7319 7320 7321 7322 7323 7324 7325 7326 7327 7328 7329 7330 7331 7332 7333 7334 7335 7336 7337 7338 7339 7340 7341 7342 7343 7344 7345 7346 7347 7348 7349 7350 7351 7352 7353 7354 7355 7356 7357 7358 7359 7360 7361 7362 7363 7364 7365 7366 7367 7368 7369 7370 7371 7372 7373 7374 7375 7376 7377 7378 7379 7380 7381 7382 7383 7384 7385 7386 7387 7388 7389 7390 7391 7392 7393 7394 7395 7396 7397 7398 7399 7400 7401 7402 7403 7404 7405 7406 7407 7408 7409 7410 7411 7412 7413 7414 7415 7416 7417 7418 7419 7420 7421 7422 7423 7424 7425 7426 7427 7428 7429 7430 7431 7432 7433 7434 7435 7436 7437 7438 7439 7440 7441 7442 7443 7444 7445 7446 7447 7448 7449 7450 7451 7452 7453 7454 7455 7456 7457 7458 7459 7460 7461 7462 7463 7464 7465 7466 7467 7468 7469 7470 7471 7472 7473 7474 7475 7476 7477 7478 7479 7480 7481 7482 7483 7484 7485 7486 7487 7488 7489 7490 7491 7492 7493 7494 7495 7496 7497 7498 7499 7500 7501 7502 7503 7504 7505 7506 7507 7508 7509 7510 7511 7512 7513 7514 7515 7516 7517 7518 7519 7520 7521 7522 7523 7524 7525 7526 7527 7528 7529 7530 7531 7532 7533 7534 7535 7536 7537 7538 7539 7540 7541 7542 7543 7544 7545 7546 7547 7548 7549 7550 7551 7552 7553 7554 7555 7556 7557 7558 7559 7560 7561 7562 7563 7564 7565 7566 7567 7568 7569 7570 7571 7572 7573 7574 7575 7576 7577 7578 7579 7580 7581 7582 7583 7584 7585 7586 7587 7588 7589 7590 7591 7592 7593 7594 7595 7596 7597 7598 7599 7600 7601 7602 7603 7604 7605 7606 7607 7608 7609 7610 7611 7612 7613 7614 7615 7616 7617 7618 7619 7620 7621 7622 7623 7624 7625 7626 7627 7628 7629 7630 7631 7632 7633 7634 7635 7636 7637 7638 7639 7640 7641 7642 7643 7644 7645 7646 7647 7648 7649 7650 7651 7652 7653 7654 7655 7656 7657 7658 7659 7660 7661 7662 7663 7664 7665 7666 7667 7668 7669 7670 7671 7672 7673 7674 7675 7676 7677 7678 7679 7680 7681 7682 7683 7684 7685 7686 7687 7688 7689 7690 7691 7692 7693 7694 7695 7696 7697 7698 7699 7700 7701 7702 7703 7704 7705 7706 7707 7708 7709 7710 7711 7712 7713 7714 7715 7716 7717 7718 7719 7720 7721 7722 7723 7724 7725 7726 7727 7728 7729 7730 7731 7732 7733 7734 7735 7736 7737 7738 7739 7740 7741 7742 7743 7744 7745 7746 7747 7748 7749 7750 7751 7752 7753 7754 7755 7756 7757 7758 7759 7760 7761 7762 7763 7764 7765 7766 7767 7768 7769 7770 7771 7772 7773 7774 7775 7776 7777 7778 7779 7780 7781 7782 7783 7784 7785 7786 7787 7788 7789 7790 7791 7792 7793 7794 7795 7796 7797 7798 7799 7800 7801 7802 7803 7804 7805 7806 7807 7808 7809 7810 7811 7812 7813 7814 7815 7816 7817 7818 7819 7820 7821 7822 7823 7824 7825 7826 7827 7828 7829 7830 7831 7832 7833 7834 7835 7836 7837 7838 7839 7840 7841 7842 7843 7844 7845 7846 7847 7848 7849 7850 7851 7852 7853 7854 7855 7856 7857 7858 7859 7860 7861 7862 7863 7864 7865 7866 7867 7868 7869 7870 7871 7872 7873 7874 7875 7876 7877 7878 7879 7880 7881 7882 7883 7884 7885 7886 7887 7888 7889 7890 7891 7892 7893 7894 7895 7896 7897 7898 7899 7900 7901 7902 7903 7904 7905 7906 7907 7908 7909 7910 7911 7912 7913 7914 7915 7916 7917 7918 7919 7920 7921 7922 7923 7924 7925 7926 7927 7928 7929 7930 7931 7932 7933 7934 7935 7936 7937 7938 7939 7940 7941 7942 7943 7944 7945 7946 7947 7948 7949 7950 7951 7952 7953 7954 7955 7956 7957 7958 7959 7960 7961 7962 7963 7964 7965 7966 7967 7968 7969 7970 7971 7972 7973 7974 7975 7976 7977 7978 7979 7980 7981 7982 7983 7984 7985 7986 7987 7988 7989 7990 7991 7992 7993 7994 7995 7996 7997 7998 7999 8000 8001 8002 8003 8004 8005 8006 8007 8008 8009 8010 8011 8012 8013 8014 8015 8016 8017 8018 8019 8020 8021 8022 8023 8024 8025 8026 8027 8028 8029 8030 8031 8032 8033 8034 8035 8036 8037 8038 8039 8040 8041
|
<!DOCTYPE html><html><head><title>R: R News</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.15.3/dist/katex.min.css">
<script>
const macros = { "\\R": "\\textsf{R}", "\\mbox": "\\text", "\\code": "\\texttt"};
function processMathHTML() {
var l = document.getElementsByClassName('reqn');
for (let e of l) { katex.render(e.textContent, e, { throwOnError: false, macros }); }
return;
}</script>
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.15.3/dist/katex.min.js"
onload="processMathHTML();"></script>
<link rel="stylesheet" type="text/css" href="R.css">
</head><body><div class="container"><main>
<table style="width: 100%;"><tr><td>NEWS</td><td style="text-align: right;">R Documentation</td></tr></table>
<h2>R News</h2>
<h3><img src="../help/figures/../../html/Rlogo.svg" class="toplogo" alt="[R logo]"> CHANGES IN R 4.5.3</h3>
<h4>UTILITIES</h4>
<ul>
<li> <p><code>tools/fetch-recommended</code> can be used instead of
<code>tools/rsync-recommended</code> to fetch recommended packages
into <span class="rlang"><b>R</b></span> sources using <code>curl</code> on systems without
<code>rsync</code> or behind firewalls.
</p>
</li></ul>
<h4>PACKAGE INSTALLATION</h4>
<ul>
<li><p> C++ standard specifications (<code>CXX_STD =</code> in
‘<span class="file">src/Makevars*</span>’ and in the <code>SystemRequirements</code> field of
the ‘<span class="file">DESCRIPTION</span>’ file) are now checked more thoroughly.
Invalid values are still ignored but now give a warning, as do
contradictory specifications.
</p>
</li>
<li><p> (Preliminary) support for C++26 has been extended to Windows.
</p>
</li>
<li><p> A non-zero exit status from ‘<span class="file">cleanup</span>’, ‘<span class="file">cleanup.win</span>’
or ‘<span class="file">cleanup.ucrt</span>’, if requested via options <span class="option">--clean</span> or
<span class="option">--preclean</span>, is now reported with a warning.
</p>
</li></ul>
<h4>BUG FIXES</h4>
<ul>
<li> <p><code>all.equal(obj, simple, check.class=FALSE)</code> now is true, also
when <code>simple</code> is a bare atomic vector and <code>obj</code> has a simple
class, fixing the first part of <a href="https://bugs.R-project.org/show_bug.cgi?id=18971">PR#18971</a> thanks to Jan Gorecki.
</p>
</li>
<li> <p><code>str(x, give.attr=FALSE)</code> no longer shows attributes when
<code>x</code> is a zero length <code>"Date"</code> or <code>"POSIXt"</code> object.
</p>
</li>
<li><p> Tweaks to binning for <code>bw.SJ()</code> and <code>bw.ucv()</code> in the
very rare case of data which have an extremely small range compared to
their absolute values, e.g., <code>x <- 6e9 + 6:9</code>.
</p>
</li>
<li><p> Formatting book-type <code>bibentry</code> objects now converts
LaTeX accents also in the publisher and series fields.
</p>
</li>
<li> <p><code>model.frame(~1, list(), na.action=na.pass)</code> and similar
“border-line” uses no longer produce invalid data frames,
fixing <a href="https://bugs.R-project.org/show_bug.cgi?id=18977">PR#18977</a>, reported with patch by Mikael Jagan.
</p>
</li>
<li> <p><code>length(<POSIXlt>) <- v</code> is more careful about balancing,
notably when <code>v</code> is not integer, thanks to Suharto Anggono's
remarks on the mailing list R-devel.
</p>
</li>
<li> <p><code>approx(<x_with_ties>, <y_with_NA>, na.rm = FALSE)</code> now
should always call the <code>ties()</code> function, fixing <a href="https://bugs.R-project.org/show_bug.cgi?id=17604">PR#17604</a>
reported by Bill Dunlap.
</p>
</li>
<li> <p><code>besselJ(1, 1e-15)</code> and similar now give correct results,
thanks to Leo Mada and other “R-help”ers.
</p>
</li>
<li> <p><code>vignette(<var>pkg</var>::<var>topic</var>)</code> is now a documented
usage variant and confines vignette retrieval to the specified package.
</p>
</li>
<li> <p><code>pretty(ch)</code> again correctly works with <code>ch</code> a
character vector of numbers.
</p>
</li>
<li> <p><code>persp()</code> labels the three axes correctly also when C level
<code>atan2pi()</code> is available, fixing <a href="https://bugs.R-project.org/show_bug.cgi?id=19007">PR#19007</a> by Klaus Schliep.
</p>
</li>
<li><p> Large (tall) subscripts in plotmath expressions are now
positioned correctly. They were being positioned too high.
</p>
</li>
<li> <p><code>Ops</code> group (Arith, Compare,..) methods for
matrix-<code>"ts"</code> now do return (zero length) matrices even when the
two series do not overlap, a very partial fix of <a href="https://bugs.R-project.org/show_bug.cgi?id=18972">PR#18972</a> which is to
be fully addressed later.
</p>
</li></ul>
<h3><img src="../help/figures/../../html/Rlogo.svg" class="toplogo" alt="[R logo]"> CHANGES IN R 4.5.2</h3>
<h4>UTILITIES</h4>
<ul>
<li> <p><code>R CMD check</code> now handles archives with extension
‘<span class="file">.tar</span>’ or ‘<span class="file">.tar.zstd</span>’ (where <code>zstd</code> compression
is supported by the <span class="rlang"><b>R</b></span> build).
</p>
</li></ul>
<h4>BUG FIXES</h4>
<ul>
<li> <p><code>t.test(c(1:3, Inf))</code> and similar no longer produce an error but
return a (still not so useful) <code>"htest"</code> result, fixing
<a href="https://bugs.R-project.org/show_bug.cgi?id=18901">PR#18901</a>, thanks to Jesse Alderliesten.
</p>
</li>
<li> <p><code>attr(., "tsp") <- val</code> now uses <code>getOption("ts.eps")</code>
instead of hardwired <code>1e-5</code>; consequently, <code>ts(.., ts.eps=*)</code>
now passes <code>ts.eps</code> to the <code>"tsp"</code> setting C code;
both fixing a long-standing ‘FIXME’.
</p>
</li>
<li> <p><code>insertSource()</code> now ignores the internal
<code>.packageName</code> object, avoiding a superfluous message.
</p>
</li>
<li><p> In static HTML help, links to vignette files from the default
‘<span class="file">doc/index.html</span>’ page now also work for packages not installed
in the default <code>.Library</code>,
thanks to a report by Patrice Kiener.
</p>
</li>
<li>
<p><code>fixInNamespace("<var>S3method</var>")</code> failed to update the S3
methods table when the generic was not on the search path.
</p>
</li>
<li><p> In plain-text help (<code>Rd2txt</code>), an initial newline from
an Rd inline <code style="white-space: pre;">⁠\eqn⁠</code> no longer breaks the paragraph.
</p>
</li>
<li> <p><code>hist(*, log = "x")</code> now works without a warning, thanks
to Martin Smith's <a href="https://bugs.R-project.org/show_bug.cgi?id=18921">PR#18921</a>.
</p>
</li>
<li> <p>Subassigning <code>"POSIXlt"</code>, i.e., <code><tdat>[i] <- val</code>
and <code><tdat>[[i]] <- val</code> now rebalance as they should,
thanks to Mikael Jagan's <a href="https://bugs.R-project.org/show_bug.cgi?id=18919">PR#18919</a>.
</p>
</li>
<li> <p><code><POSIXlt>[*]</code> (re-)setting <code>"balanced"</code>, fixing
<a href="https://bugs.R-project.org/show_bug.cgi?id=18681">PR#18681</a> comment #7, thanks to Mikael Jagan.
</p>
</li>
<li><p> All four of <code>{col,row}{Sums,Means}(Z, na.rm=TRUE)</code> now correctly work
with complex <code>Z</code> where <code>is.na(Re(Z))</code> differs from <code>is.na(Im(Z))</code>,
fixing <a href="https://bugs.R-project.org/show_bug.cgi?id=18942">PR#18942</a>, unearthed by Dirk Eddelbuettel.
</p>
</li>
<li><p> Fix for glyph rendering on the <code>quartz()</code> device when
there is other (“normal”) text drawn on the device. The
problem was that the text transformation matrix was not reset
so glyphs would be rendered incorrectly (often completely outside
the device, i.e., not visible).
</p>
</li>
<li><p> Functions <code>install.packages()</code> and <code>download.packages()</code> again
consult option <code>download.file.method</code> when the download method is
unspecified.
</p>
</li>
<li> <p>Tanguy Barthelemy and colleagues at the
‘R Dev Day’ following Rencontres R in May 2025
extended the help page of <code>lm()</code>, fixing <a href="https://bugs.R-project.org/show_bug.cgi?id=18058">PR#18058</a>.
As suggested by Thomas Soeiro, such notes were also added to the
<code>glm()</code>, <code>poly()</code> and <code>splines::bs()</code> and <code>ns()</code>
pages.
</p>
</li>
<li> <p><code>lbeta(1i, 1)</code> now signals an error, as <code>lbeta()</code> is not implemented
for <code>complex</code>, fixing <a href="https://bugs.R-project.org/show_bug.cgi?id=18946">PR#18946</a> from Ben Bolker and Kasper Kristensen.
</p>
</li>
<li><p> The Cairo-based SVG device uses <code>pt</code> as the default
document unit also with Cairo >= 1.17.8 (<a href="https://bugs.R-project.org/show_bug.cgi?id=18912">PR#18912</a>).
</p>
</li>
<li> <p><code>pretty(*, eps.correct = 2)</code> has been fixed, e.g., to
avoid over 1 million length result for <code>pretty(c(0, 1e-322), eps.correct = 2)</code>.
</p>
</li>
<li><p> When <code>"POSIXlt"</code> date-time objects are <code>NA</code>-padded
from subsetting or increasing <code>length</code> in the <code>`[`</code> or
<code>`length<-`</code> methods, the <code>"balanced"</code> attribute is set
to <code>NA</code>, now; noted in <a href="https://bugs.R-project.org/show_bug.cgi?id=18681">PR#18681</a>, thanks to Mikael Jagan.
</p>
</li></ul>
<h3><img src="../help/figures/../../html/Rlogo.svg" class="toplogo" alt="[R logo]"> CHANGES IN R 4.5.1</h3>
<h4>NEW FEATURES</h4>
<ul>
<li><p> The internal method of <code>unzip()</code> now follows <code>unzip 6.00</code>
in how it handles extracted file paths which contain <code>"../"</code>.
With thanks to Ivan Krylov.
</p>
</li></ul>
<h4>INSTALLATION</h4>
<ul>
<li><p> Standalone <code>nmath</code> can be built with early-2025
versions of <code>clang</code>-based compilers such as LLVM
<code>clang</code> 20, Apple <code>clang</code> 17 and Intel
<code>icx</code> 2025.0.
</p>
</li>
<li><p> Tcl/Tk 9 can be used to build package <code>tcltk</code>:
this has become the default in some Linux distributions.
</p>
</li></ul>
<h4>BUG FIXES</h4>
<ul>
<li><p> Java detection in <code>javareconf</code> could not detect
‘<span class="file">libjvm.*</span>’ in the <code>zero</code> variant of the <abbr>JDK</abbr> (<a href="https://bugs.R-project.org/show_bug.cgi?id=18884">PR#18884</a>).
All valid variants as of <abbr>JDK</abbr> 24u are now supported.
</p>
</li>
<li> <p><code>factanal(.., rotation=*)</code> now correctly updates
<code>rotmat</code>, fixing <a href="https://bugs.R-project.org/show_bug.cgi?id=18886">PR#18886</a>.
</p>
</li>
<li> <p><code>dnbinom(<large>, <muchlarger>, ..)</code> now is <code>0</code>
correctly, instead of <code>NaN</code> or <code>Inf</code> sometimes.
</p>
</li>
<li> <p><code>dbinom(<large>, n=Inf, ..)</code> is <code>0</code> now correctly,
instead of <code>NaN</code> which also fixes many <code>dnbinom()</code> cases,
notably those mentioned in <a href="https://bugs.R-project.org/show_bug.cgi?id=16727">PR#16727</a> comment #5.
</p>
</li>
<li><p> Fixing C level “binomial deviance” <code>bd0()</code> for
extreme arguments (preventing under-/overflow) solves more <a href="https://bugs.R-project.org/show_bug.cgi?id=16727">PR#16727</a>
cases and also prevents some full accuracy loss in such cases for
<code>dbinom()</code>, <code>dnbinom()</code>, and via <code>dbinom_raw()</code>
potentially <code>dgeom()</code>, <code>dhyper()</code>, <code>dbeta()</code>, and
<code>df()</code>.
</p>
</li>
<li> <p><code>signif(1.**e308, digits)</code> no longer truncates unnecessarily
(but still to prevent overflow to <code>Inf</code>), fixing <a href="https://bugs.R-project.org/show_bug.cgi?id=18889">PR#18889</a>.
</p>
</li>
<li> <p><code>prettyNum(*, zero.print={>=1-char}, replace.zero=TRUE)</code>
now works as documented, thanks to Marttila Mikko and
Ivan Krylov's messages on R-devel.
</p>
</li>
<li> <p><code>pbeta(x, a,b, ..)</code> for very large <code>a,b</code> no longer returns
<code>NaN</code> but the correct values (0 or 1, or their logs for <code>log.p = TRUE</code>).
This improves Mathlib's C level <code>bratio()</code> and hence also
<code>pnbinom()</code>, etc..
</p>
</li></ul>
<h3><img src="../help/figures/../../html/Rlogo.svg" class="toplogo" alt="[R logo]"> CHANGES IN R 4.5.0</h3>
<h4>NEW FEATURES</h4>
<ul>
<li> <p><code>as.integer(rl)</code> and hence <code>as.raw(rl)</code> now work for
a <code>list</code> of <code>raw(1)</code> elements, as proposed by Michael
Chirico's <a href="https://bugs.R-project.org/show_bug.cgi?id=18696">PR#18696</a>.
</p>
</li>
<li> <p><span class="pkg">graphics</span>' <code>grid()</code> gains optional argument
<code>nintLog</code>.
</p>
</li>
<li><p> New functions <code>check_package_urls()</code> and
<code>check_package_dois()</code> in package <span class="pkg">tools</span> for checking
URLs and <abbr>DOI</abbr>s in package sources.
</p>
</li>
<li><p> New <code>head()</code> and <code>tail()</code> methods for class
<code>"ts"</code> time series, proposed by Spencer Graves on R-devel.
</p>
</li>
<li><p> New <code>qr.influence()</code> function, a “bare bones”
interface to the <code>lm.influence()</code> leave-one-out diagnostics
computations; wished for in <a href="https://bugs.R-project.org/show_bug.cgi?id=18739">PR#18739</a>.
</p>
</li>
<li><p> Package <code>citation()</code> results auto-generated from the
package metadata now also provide package <abbr>DOI</abbr>s for CRAN and
Bioconductor packages.
</p>
</li>
<li><p> New function <code>grepv()</code> identical to <code>grep()</code> except
for the default <code>value = TRUE</code>.
</p>
</li>
<li> <p><code>methods(<pkg>:::<genfun>)</code> now does report methods when
neither the generic nor the methods have been exported.
</p>
</li>
<li> <p><code>pdf()</code> gains an <code>author</code> argument to set the
corresponding metadata field, and logical arguments
<code>timestamp</code> and <code>producer</code> to optionally omit the
respective metadata.
(Thanks to Edzer Pebesma.)
</p>
</li>
<li> <p><code>grDevices::glyphInfo()</code> gains a <code>rot</code> argument
to allow per-glyph rotation.
(Thanks to Daniel Sabanes Bove.)
</p>
</li>
<li><p> Package <span class="pkg">tools</span> now exports functions
<code>CRAN_current_db()</code>, <code>CRAN_aliases_db()</code>,
<code>CRAN_rdxrefs_db()</code>, <code>CRAN_archive_db()</code>, and
<code>CRAN_authors_db()</code>.
</p>
</li>
<li><p> Package <span class="pkg">tools</span> now exports functions
<code>R()</code> and <code>parse_URI_reference()</code>.
</p>
</li>
<li><p> Package <span class="pkg">tools</span> now exports functions
<code>base_aliases_db()</code> and <code>base_rdxrefs_db()</code>.
</p>
</li>
<li><p> It is now possible to set the background color for row and
column names in the data editor on Windows (<code>Rgui</code>).
</p>
</li>
<li> <p><code>Rterm</code> on Windows now accepts input lines of unlimited
length.
</p>
</li>
<li> <p><code>file.info()</code> on Windows now provides file owner name and
domain.
</p>
</li>
<li> <p><code>Sys.info()</code> on Windows now provides current user domain.
</p>
</li>
<li> <p><code>findInterval()</code> gets new arguments <code>checkSorted</code>
and <code>checkNA</code> which allow skipping relatively costly checks;
related to <a href="https://bugs.R-project.org/show_bug.cgi?id=16567">PR#16567</a>.
</p>
</li>
<li> <p><code>pnorm(x)</code> underflows more gracefully.
</p>
</li>
<li> <p><code>get(nam, env)</code> now signals a <em>classed</em> error,
<code>"getMissingError"</code>, as “subclass” of
<code>"missingArgError"</code> where the latter is used also in similar
situations, e.g., <code>f <- function(x) exp(x); try(f())</code> .
</p>
</li>
<li><p> The set operations now avoid the <code>as.vector()</code>
transformation for same-kind apparently vector-like operands.
</p>
</li>
<li> <p><code>md5sum()</code> can be used to compute an MD5 hash of a raw
vector of bytes by using the <code>bytes=</code> argument instead
of <code>files=</code>. The two arguments are mutually exclusive.
</p>
</li>
<li><p> Added function <code>sha256sum()</code> in package <span class="pkg">tools</span>
analogous to <code>md5sum()</code> implementing the <abbr>SHA</abbr>-256 hashing
algorithm.
</p>
</li>
<li><p> The <code>xtfrm()</code> method for class <code>"AsIs"</code> is now
considerably faster thanks to a patch provided by Ivan Krylov.
</p>
</li>
<li><p> The <code>merge()</code> method for data frames will no longer
convert row names used for indexing using <code>I()</code>, which will
lead to faster execution in cases where <code>sort = TRUE</code> and
<code>all.x</code> and/or <code>all.y</code> are set to <code>TRUE</code>.
</p>
</li>
<li><p> The <span class="pkg">methods</span> package internal function
<code>.requirePackage()</code> now calls <code>requireNamespace(p)</code>
instead of <code>require(p)</code>, hence no longer adding packages to
the <code>search()</code> path in cases methods or class definitions are
needed. Consequently, previous workflows relying on the old
behaviour will have to be amended by adding corresponding
<code>library(p)</code> calls.
</p>
</li>
<li><p> More <span class="rlang"><b>R</b></span>-level messages use a common format containing
<code>"character string"</code> for more consistency and less
translation work.
</p>
</li>
<li> <p><code>available.packages()</code> and <code>install.packages()</code> get
an optional switch <code>cache_user_dir</code>, somewhat experimentally.
</p>
</li>
<li><p> The <code>sunspot.month</code> data have been updated to Oct 2024;
because of recalibration also historical numbers are changed, and we
keep the previous data as <code>sunspot.m2014</code> for
reproducibility.
</p>
</li>
<li><p> The <code>quartz()</code> device now supports alpha masks. Thanks
to George Stagg, Gwynn Gebeyhu, Heather Turner, and
Tomek Gieorgijewski.
</p>
</li>
<li><p> The <code>print()</code> method for date-time objects (<code>POSIX.t</code>)
gets an optional <code>digits</code> argument for <em>fractional</em>
seconds, passed to improved <code>format.POSIXlt()</code>; consequently,
<code>print(<date.time>, digits = n)</code> allows to print fractions of
seconds.
</p>
</li>
<li> <p><code>install.packages()</code> and <code>download.packages()</code>
download packages simultaneously using <code>libcurl</code>, significantly
reducing download times when installing or downloading multiple
packages.
</p>
</li>
<li><p> Status reporting in <code>download.file()</code> has been extended to
report the outcome for individual files in simultaneous downloads.
</p>
</li>
<li><p> The Rd <code style="white-space: pre;">⁠\link⁠</code> macro now allows markup in the link text
when the topic is given by the optional argument, e.g.,
‘<span class="samp">⁠\link[=gamma]{\eqn{\Gamma(x)}}⁠</span>’.
</p>
</li>
<li><p> If <code>La_library()</code> is empty, <code>sessionInfo()</code> still
reports <code>La_version()</code> when available.
</p>
</li>
<li> <p><code>seq.int(from, to, by, ....)</code> when <code class="reqn">|by| = 1</code> now
behaves as if <code>by</code> was omitted, and hence returns <code>from:to</code>,
possibly integer.
</p>
</li>
<li> <p><code>seq.Date(from, to, by, ....)</code> and <code>seq.POSIXt(..)</code>
now also work when <code>from</code> is missing and sufficient further
arguments are provided, thanks to Michael Chirico's report, patch
proposal in <a href="https://bugs.R-project.org/show_bug.cgi?id=17672">PR#17672</a> and ‘R Dev Day’ contributions.
</p>
<p>The <code>Date</code> method also works for <code>seq(from, to)</code>, when
<code>by</code> is missing and now defaults to <code>"1 days"</code>.
</p>
<p>It is now documented (and tested) that the <code>by</code> string may be
<em>abbreviated</em> in both <code>seq</code> methods.
</p>
<p>Both methods return or keep internal type <code>"integer"</code> more
consistently now. Also, <code>as.POSIXct({})</code> is internally integer.
</p>
</li>
<li> <p><code>duplicated()</code>, <code>unique()</code>, and <code>anyDuplicated()</code>
now also work for class <code>expression</code> vectors.
</p>
</li>
<li><p> New function <code>use()</code> to use packages in R scripts with
full control over what gets added to the search path. (Actually
already available since <span class="rlang"><b>R</b></span> 4.4.0.)
</p>
</li>
<li><p> New connection type <code>zstdfile</code> for files compressed by
<code>zstd</code> if <span class="rlang"><b>R</b></span> was built with such support. <code>file()</code>
and <code>gzfile()</code> can automagically read such files.
</p>
</li>
<li> <p><code>memCompress()</code> and <code>memDecompress()</code> have options
to use <code>zstd</code> compression if <span class="rlang"><b>R</b></span> was built with support
for it.
</p>
</li>
<li><p> There is some support for <code>zstd</code> compression of
tarballs in <code>tar()</code> and <code>untar()</code>. (This depends on OS
support of <code>libzstd</code> or by <code>tar</code>.)
</p>
</li>
<li> <p><code>print(summary(<numbers>))</code> gets new optional argument
<code>zdigits</code> to allow more flexible and consistent (double)
rounding. The current default <code>zdigits = 4L</code> is somewhat
experimental. Specifying both <code>digits = *, zdigits = *</code> allows
behaviour independent of the global <code>digits</code> option.
</p>
</li>
<li><p> The <code>format()</code> method for <code>"difftime"</code> objects gets a
new back compatible option <code>with.units</code>.
</p>
</li>
<li><p> A <code>summary()</code> method for <code>"difftime"</code> objects which
prints nicely, similar to those for <code>"Date"</code> and <code>"POSIXct"</code>.
</p>
</li>
<li> <p><code>unique()</code>'s default method now also deals with
<code>"difftime"</code> objects.
</p>
</li>
<li> <p><code>optimize(f, *)</code> when <code>f(x)</code> is not finite says
more about the value in its <code>warning</code> message. It no longer
replaces <code>-Inf</code> by the largest <em>positive</em> finite number.
</p>
</li>
<li><p> The documentation of <code>gamma()</code> and <code>is.numeric()</code>
is more specific, thanks to the contributors of <a href="https://bugs.R-project.org/show_bug.cgi?id=18677">PR#18677</a>.
</p>
</li>
<li><p> New dataset <code>gait</code> thanks to Heather Turner and
Ella Kaye, used in examples.
</p>
</li>
<li><p> New datasets <code>penguins</code> and <code>penguins_raw</code> thanks to
Ella Kaye, Heather Turner, and Kristen Gorman.
</p>
</li>
<li> <p><code>isSymmetric(<matrix>)</code> gains a new option <code>trans = "C"</code>;
when set to non-default, it tests for “simple” symmetry of
complex matrices.
</p>
</li>
<li> <p><code>model.frame()</code> produces more informative error messages
in some cases when variables in the formula are not found, thanks to
Ben Bolker's <a href="https://bugs.R-project.org/show_bug.cgi?id=18860">PR#18860</a>.
</p>
</li>
<li> <p><code>selectMethod(f, ..)</code> now keeps the function name if the
function belongs to a group generic and the method is for the
generic.
</p>
</li></ul>
<h4>BLAS and LAPACK</h4>
<ul>
<li><p> The bundled BLAS and LAPACK sources have been updated to
those shipped as part of January 2025's LAPACK 3.12.1.
</p>
</li>
<li><p> It is intended that this will be the last update to BLAS and
LAPACK in the <span class="rlang"><b>R</b></span> sources. Those building <span class="rlang"><b>R</b></span> from source are
encouraged to use external BLAS and LAPACK and this will be required in
future.
</p>
</li>
<li><p> This update was mainly bug fixes but contained a barely
documented major change. The set of BLAS routines had been
unchanged since 1988, so throughout <span class="rlang"><b>R</b></span>'s history. This update
introduced new BLAS routines <code>dgemmtr</code> and <code>zgemmtr</code>
which are now used by LAPACK routines. This means that BLAS
implementations are no longer interchangeable.
</p>
</li>
<li><p> To work around this, <span class="rlang"><b>R</b></span> can be configured with option
<span class="option">--with-2025blas</span> which arranges for the 2025 BLAS
additions to be compiled into <code>libRlapack</code> (the internal
LAPACK, not built if an external LAPACK is used).
</p>
<p>This option allows the continuation of the practice of swapping
the BLAS in use by symlinking ‘<span class="file">lib/libRblas.*</span>’. It has
the disadvantage of using the reference BLAS version of the 2025
routines whereas an enhanced BLAS might have an optimized version
(OpenBLAS does as from version 0.3.29).
</p>
</li>
<li><p> Windows builds currently use the internal LAPACK and by
default the internal BLAS: notes on how to swap the latter
<em>via</em> ‘<span class="file">Rblas.dll</span>’ are in file
‘<span class="file">src/extra/blas/Makefile.win</span>’.
</p>
</li></ul>
<h4>INSTALLATION on a UNIX-ALIKE</h4>
<ul>
<li><p> A C23 compiler (if available) is now selected by default for
compilation of <span class="rlang"><b>R</b></span> and packages. <span class="rlang"><b>R</b></span> builds can opt out <em>via</em> the
<code>configure</code> flag <span class="option">--without-C23</span>, unless the
specified or default (usually <code>gcc</code>) compiler defaults to C23:
<code>gcc</code> 15 does.
</p>
<p>A C23 compiler is known to be selected with
<code>gcc</code> 13–15,
LLVM <code>clang</code> 18–20 (and 15 should),
Apple <code>clang</code> 15–17 and
Intel 2024.2–2025.0 (and 2022.2 should).
</p>
<p>Current binary distributions on macOS use Apple
<code>clang</code> 14 and so do not use C23.
</p>
</li>
<li><p> The minimum <code>autoconf</code> requirement for a maintainer
build has been increased to <code>autoconf</code> 2.72.
</p>
</li>
<li><p> Building the HTML and Info versions of the R manuals now
requires <code>texi2any</code> from Texinfo 6.1 or later.
</p>
</li>
<li><p> Failures in building the manuals under ‘<span class="file">doc</span>’ now abort
the installation, removing any file which caused the failure.
</p>
</li>
<li><p> Control of symbol visibility is now supported on macOS (the
previous check only worked on ELF platforms).
</p>
</li>
<li><p> There is now support for installing the debug symbols for
recommended packages on macOS: see ‘<span class="samp">⁠REC_INSTALL_OPT⁠</span>’ in file
‘<span class="file">config.site</span>’.
</p>
</li>
<li> <p><code>configure</code> is now able to find an external
<code>libintl</code> on macOS (the code from an older GNU gettext
distribution failed to try linking with the macOS Core Foundation
framework).
</p>
</li></ul>
<h4>INSTALLATION on WINDOWS</h4>
<ul>
<li><p> Both building <span class="rlang"><b>R</b></span> and installing packages use the C compiler
in C23 mode.
</p>
</li>
<li><p> R on Windows by default uses <code>pkg-config</code> for linking against
external libraries. This makes it easier to test R and packages with
alternative toolchains (such as from Msys2, e.g., testing with LLVM
and possibly with sanitizers). It also allows more significant Rtools
updates within a single R minor release.
</p>
</li>
<li><p> The installer scripts for Windows have been tailored to
Rtools45, an update of the Rtools44 toolchain. It is
based on GCC 14. The experimental support for 64-bit ARM
(<code>aarch64</code>) CPUs is based on LLVM 19. R-devel and <span class="rlang"><b>R</b></span>
4.5.x are no longer maintained to be buildable using
Rtools44 and it is advised to switch to Rtools45.
</p>
</li></ul>
<h4>DEPRECATED AND DEFUNCT</h4>
<ul>
<li> <p><code>is.R()</code> is defunct. Environment variable
<span class="env">_R_DEPRECATED_IS_R_</span> no longer has any effect.
</p>
</li>
<li><p> Deprecated (for more than 9 years!) functions
<code>linearizeMlist</code>, <code>listFromMlist</code>, and <code>showMlist</code> and
the <code>"MethodsList"</code> class for S4 method handling were removed
from package <span class="pkg">methods</span>.
Deprecated functions <code>balanceMethodsList</code>, <code>emptyMethodsList</code>,
<code>inheritedSubMethodLists</code>, <code>insertMethod</code>,
<code>insertMethodInEmptyList</code>, <code>makeMethodsList</code>,
<code>mergeMethods</code>, <code>MethodsList</code>, <code>MethodsListSelect</code>, and
<code>SignatureMethod</code> were made defunct, as were the
<code>"MethodsList"</code> branches of functions <code>assignMethodsMetaData</code>,
<code>finalDefaultMethod</code>, and <code>MethodAddCoerce</code>.
</p>
</li>
<li> <p><code>getMethods(*, table = TRUE)</code> is deprecated.
</p>
</li>
<li><p> Building with the bundled (and old) version of
<code>libintl</code> is deprecated and now gives a <code>configure</code>
warning. This should be selected only if neither the OS's
<code>libc</code> (as on GNU Linux) nor an external <code>libintl</code>
library provide suitable functions.
</p>
<p>Instead install <code>libintl</code> from a recent version of GNU
gettext (available for macOS) or use <code>configure</code> option
<span class="option">--disable-nls</span>.
</p>
<p>The ability to use the bundled version may be removed as soon as
<span class="rlang"><b>R</b></span> 4.5.1.
</p>
</li>
<li><p> The deprecated <code>xfig()</code> graphics device has been removed.
</p>
</li></ul>
<h4>PACKAGE INSTALLATION</h4>
<ul>
<li><p> Packages are now installed using C23 where supported by the
OS and <span class="rlang"><b>R</b></span> build.
</p>
<p>Packages using <span class="rlang"><b>R</b></span>'s compiler settings can ask <strong>not</strong> to use C23
<em>via</em> including <code>USE_C17</code> in <code>SystemRequirements</code>
or can be installed by <code>R CMD INSTALL --use-C17</code>.
(Some packages ignore these settings in their <code>configure</code>
script or when compiling in sub-directories of ‘<span class="file">src</span>’, as
will those using a ‘<span class="file">src/Makefile</span>’.)
</p>
</li>
<li><p> Source installs now report the package version in the log.
</p>
</li>
<li><p> There is preliminary support for C++26 with GCC <code class="reqn">>=</code> 14, Apple
<code>clang++</code> <code class="reqn">>=</code> 16 and LLVM <code>clang++</code> <code class="reqn">>=</code> 17.
</p>
</li></ul>
<h4>C-LEVEL FACILITIES</h4>
<ul>
<li><p> The non-API and hidden entry points <code>Rf_setIVector</code>,
<code>Rf_setRVector</code> and <code>Rf_setSVector</code> have been removed.
</p>
</li>
<li><p> The internal code for changing the parent of an environment
now signals an error if the new parent is not an environment or if
the change would create a cycle in the parent chain.
</p>
</li>
<li> <p><code>SET_TYPEOF</code> now signals an error unless the old and
new types have compatible memory structure and content. Use of
<code>SET_TYPE</code> in package C code should be avoided and may be
deprecated in the near future. It is better to allocate an object
of the desired type in the first place.
</p>
</li>
<li><p> The set of LAPACK (double and complex) routines declared in
the headers ‘<span class="file">R_ext/Lapack.h</span>’ and ‘<span class="file">R_ext/Applic.h</span>’ has
been extended, mostly to routines actually in use by packages.
</p>
</li>
<li><p> Memory allocation messages now use the (non-SI notation)
<code>"Mb"</code>, <code>"Gb"</code> , ..., and <code>"Mbytes"</code> strings as
<em>arguments</em> instead of as part of the (translatable format)
string. This is one step for <a href="https://bugs.R-project.org/show_bug.cgi?id=18297">PR#18297</a>; from Henrik Bengtsson.
</p>
</li>
<li><p> Header ‘<span class="file">R_ext/Constants.h</span>’ (included by ‘<span class="file">R.h</span>’) now
always includes header ‘<span class="file">float.h</span>’ or ‘<span class="file">cfloat</span>’ for
constants such as <code>DBL_MAX</code>.
</p>
</li>
<li><p> Strict R headers are now the default. This removes the
legacy definitions of <code>PI</code>, <code>Calloc</code>, <code>Realloc</code> and
<code>Free</code>: use <code>M_PI</code>, <code>R_Calloc</code>, <code>R_Realloc</code> or
<code>R_Free</code> instead.
</p>
</li>
<li><p> The deprecated and seemingly never-used S-compatibility
macros <code>F77_COM</code> and <code>F77_COMDECL</code> have been removed
from header ‘<span class="file">R_ext/RS.h</span>’.
</p>
</li>
<li><p> The <code>enum</code> <code>Rboolean</code> defined in header
‘<span class="file">R_ext/Boolean.h</span>’ now has a fixed underlying type of
<code>int</code> on platforms whose C compiler supports this.
</p>
<p>This is a C23 feature (taken from C++11) and also supported in all
C standards by some versions of <code>clang</code> (from LLVM and
Apple) and (with a warning when using <span class="option">-pedantic</span>) by GCC
when in C17 mode.
</p>
<p>A fair amount of code has assumed this: it may be changed to a
smaller type in future. In particular, as standard compilers do
not check the validity of assignment to an <code>enum</code>, it has been
possible to assign <code>NA_INTEGER</code> to an <code>Rboolean</code>
variable, coerce it to <code>int</code> and recover the value.
</p>
<p>If there were a platform which used an underlying type of a
different size this would be an <abbr>ABI</abbr>-breaking change (but we are
unaware of any such platform).
</p>
</li>
<li><p> Header ‘<span class="file">R_ext/Boolean.h</span>’ now ensures that a <code>bool</code>
type is available either as a keyword (C23 and C++) or by
including the C99 header ‘<span class="file">stdbool.h</span>’. This is being used
internally in <span class="rlang"><b>R</b></span> to replace <code>Rboolean</code> by <code>bool</code>.
</p>
</li>
<li><p> There are new functions <code>asRboolean</code> and
<code>asBool</code>, variants of <code>asLogical</code> more suited to
converting logical arguments to <code>Rboolean</code> or to
<code>bool</code>. They require a length-one input and throw an error if
that evaluates to <code>NA</code>.
</p>
</li>
<li><p> Header ‘<span class="file">R_exts/Error.h</span>’ now ensures that
<code>Rf_error</code> and similar are given a <code>noreturn</code>
attribute when used from C++ under all compilers.
</p>
</li>
<li><p> Header ‘<span class="file">R_exts/Utils.h</span>’ no longer contains a
declaration for <code>F77_SUB(interv)</code>. This is intended to be
called from Fortran and was wrongly declared: <code>LOGICAL</code> in
Fortran corresponds to <code>int *</code> not <code>Rboolean *</code>.
</p>
</li>
<li><p> Defining <code>R_INCLUDE_BOOLEAN_H</code> to <code>0</code> before
including headers ‘<span class="file">R.h</span>’ or ‘<span class="file">Rinternals.h</span>’ (or any other
header which includes ‘<span class="file">R_ext/Boolean.h</span>’) stops the inclusion
of header <code>R_ext/Boolean.h</code> which ‘defines’ constants
<code>TRUE</code>, <code>FALSE</code>, <code>true</code>, <code>false</code> and the type
<code>bool</code> which some package maintainers wish to avoid.
</p>
<p>Note that the last three are keywords in C23 and C++11 so cannot be
avoided entirely. However, with commonly-used compilers they can be
masked by a macro of the same name, often with a warning.
</p>
</li></ul>
<h4>C-LEVEL API</h4>
<ul>
<li><p> The ‘Writing R Extensions’ Texinfo source now
contains very experimental annotations for more clearly
identifying the API status of C entry points. These annotations
are used to produce indices for API, experimental API, and
embedded API entry points in the rendered versions. This is very
preliminary and may be dropped if a better approach emerges.
</p>
<p>Also for Fortran-callable entry points which are part of the API.
</p>
</li>
<li> <p>‘Writing R Extensions’ has a new section
‘Moving into C API compliance’ to help package authors move
away from using non-API endpoints. This section will continue to
be updated as work on clarifying and tightening the C API
continues.
</p>
</li>
<li><p> New API function <code>R_mkClosure</code>. This checks that its
arguments are valid and should be used instead of
<code>allocSExp(CLOSXP</code> followed by <code>SET_FORMALS</code>,
<code>SET_BODY</code>, and <code>SET_CLOENV</code>.
</p>
</li>
<li><p> New API functions <code>R_ClosureFormals</code>,
<code>R_ClosureBody</code>, and <code>R_ClosureEnv</code> for extracting
closure components. The existing functions <code>R_ClosureExpr</code>
and <code>R_BytecodeExpr</code> have also been added to the API.
</p>
</li>
<li><p> New API function <code>R_ParentEnv</code> corresponding to <span class="rlang"><b>R</b></span>'s
<code>parent.env()</code>.
</p>
</li>
<li><p> Further non-API entry points have been added to those reported
by <code>R CMD check</code>: <code>COMPLEX0</code>, <code>ddfind</code>,
<code>DDVAL</code>, <code>ENSURE_NAMEDMAX</code>, <code>ENVFLAGS</code>,
<code>FRAME</code>, <code>HASHTAB</code>, <code>INTERNAL</code>, <code>IS_ASCII</code>,
<code>IS_UTF8</code>, <code>LEVELS</code>, <code>NAMED</code>, <code>PRSEEN</code>,
<code>RDEBUG</code>, <code>REAL0</code>, <code>Rf_findVarInFrame3</code>,
<code>SET_BODY</code>, <code>SET_CLOENV</code>, <code>SET_FORMALS</code>,
<code>SET_PRSEEN</code>, <code>SET_RDEBUG</code>, <code>STRING_PTR</code>,
<code>SYMVALUE</code>, and <code>VECTOR_PTR</code>. Any declarations for these
in public header files will be removed in the near future, and
they will be hidden where possible.
</p>
</li>
<li><p> Some <code>R CMD check</code> ‘<span class="samp">⁠NOTE⁠</span>’s on the use of
non-API entry points have been upgraded to ‘<span class="samp">⁠WARNING⁠</span>’s in
preparation for removing declarations and, where possible, hiding
these entry points.
</p>
</li>
<li><p> Additional non-API entry points have been added to those
reported by <code>R CMD check</code>: <code>IS_LONG_VEC</code>,
<code>PRCODE</code>, <code>PRENV</code>, <code>PRVALUE</code>, <code>R_nchar</code>,
<code>Rf_NonNullStringMatch</code>, <code>R_shallow_duplicate_attr</code>,
<code>Rf_StringBlank</code>, <code>SET_TYPEOF</code>, <code>TRUELENGTH</code>,
<code>XLENGTH_EX</code>, and <code>XTRUELENGTH</code>.
</p>
</li>
<li><p> Enable defining <span class="env">R_NO_REMAP_RMATH</span> and calling
<code>Rf_*()</code> as has been documented in
‘Writing R Extensions’ for a while, fixing <a href="https://bugs.R-project.org/show_bug.cgi?id=18800">PR#18800</a>
thanks to Mikael Jagan and Suharto Anggono.
</p>
</li>
<li> <p><code>R_GetCurrentSrcref(skip)</code> now skips calls rather
than <code>srcref</code>s, consistent with counting items in the
<code>traceback()</code> display. If <code>skip == NA_INTEGER</code>,
it searches for the first <code>srcref</code>, starting at
the current evaluation state and proceeding through the
call stack; otherwise, it returns the <code>srcref</code>
of the requested entry from the call stack.
</p>
</li></ul>
<h4>UTILITIES</h4>
<ul>
<li> <p><code>R CMD INSTALL</code> (and hence <code>check</code>) now
compile C++ code with <code>-DR_NO_REMAP</code>.
</p>
<p>‘Writing R Extensions’ has been revised to describe the remapped
entry points, for with the <code>Rf_</code> prefix remains optional when
used from C code (but is recommended for new C code).
</p>
</li>
<li> <p><code>R CMD check --as-cran</code> notes bad parts in the
‘<span class="file">DESCRIPTION</span>’ file's URL fields.
</p>
</li>
<li> <p><code>R CMD check</code> now reports more warnings on
long-deprecated/obsolete Fortran features reported by
<code>gfortran -Wall</code>. For hints on how to modernize these,
see
<a href="https://fortranwiki.org/fortran/show/Modernizing+Old+Fortran">https://fortranwiki.org/fortran/show/Modernizing+Old+Fortran</a>.
</p>
</li>
<li><p> Since almost all supported <span class="rlang"><b>R</b></span> versions now use UTF-8,
<code>R CMD check</code> no longer by default reports on marked
UTF-8 or Latin-1 strings in character data. Set environment
variable <span class="env">_R_CHECK_PACKAGE_DATASETS_SUPPRESS_NOTES_</span> to a
false value for the previous behaviour.
</p>
</li>
<li> <p><code>tools::checkDocFiles()</code> notes more cases of
usage documentation without corresponding <code style="white-space: pre;">⁠\alias⁠</code>.
</p>
</li>
<li> <p><code>R CMD check</code> with a true value for environment variable
<span class="env">_R_CHECK_BASHISMS_</span> checks more thoroughly, including for
<code>bash</code> scripts and bashisms in components of
<code>autoconf</code>-generated <code>configure</code> scripts.
</p>
</li>
<li> <p><code>R CMD check</code> gains option <span class="option">--run-demo</span> to
check demo scripts analogously to tests. This includes a check
for undeclared package dependencies: it can also be enabled
separately by setting the environment variable
<span class="env">_R_CHECK_PACKAGES_USED_IN_DEMO_</span> to a true value
(as done by <code>R CMD check --as-cran</code>).
</p>
</li>
<li> <p><code>R CMD build</code> now supports <span class="option">--compression=zstd</span>
on platforms with sufficient support for <code>zstd</code>.
</p>
</li>
<li> <p><code>tools::texi2pdf(..., texinputs=<var>paths</var>)</code> now
<em>pre</em>pends the specified <var>paths</var> to <span class="env">TEXINPUTS</span>.
When building <span class="rlang"><b>R</b></span> itself (‘<span class="file">doc/NEWS.pdf</span>’ and base vignettes)
or package manuals using <code>R CMD Rd2pdf</code>, it is ensured
that this <span class="rlang"><b>R</b></span>'s ‘<span class="file">Rd.sty</span>’ takes precedence over any other
(incompatible) versions in default “texmf trees”.
</p>
</li>
<li> <p><code>tools::Rd2latex()</code> no longer outputs an
‘<span class="samp">⁠\inputencoding{utf8}⁠</span>’ line by default;
such a declaration is obsolete since LaTeX 2018-04-01.
</p>
</li></ul>
<h4>BUG FIXES</h4>
<ul>
<li> <p><code>update_pkg_po()</code> now copies ‘<span class="file">.mo</span>’ files to the
<span class="pkg">translation</span> package even if a ‘<span class="file">DESCRIPTION</span>’ file
exists, thanks to Michael Chirico fixing <a href="https://bugs.R-project.org/show_bug.cgi?id=18694">PR#18694</a>.
</p>
</li>
<li><p> Auto-generated <code>citation()</code> entries no longer include
(additional) URLs in the ‘<span class="samp">⁠note⁠</span>’ field (<a href="https://bugs.R-project.org/show_bug.cgi?id=18547">PR#18547</a>).
</p>
</li>
<li> <p><code>as.data.frame.list()</code> gets a new option <code>new.names</code>
and now preserves <code>NA</code> names, thus fixing the <code>format()</code>
method for data frames, and also bug <a href="https://bugs.R-project.org/show_bug.cgi?id=18745">PR#18745</a>.
Relatedly, the <code>format()</code> method gets an option <code>cut.names</code>.
</p>
</li>
<li> <p><code>stem()</code> formats correctly also in cases where rounding
up, e.g., from 9.96 to 10 needs more digits; thanks to Ella
Kaye and Kelly Bodwin, fixing <a href="https://bugs.R-project.org/show_bug.cgi?id=8934">PR#8934</a> during ‘R
Dev Day’ at useR!2024.
</p>
<p>Additionally, <code>stem(x)</code> now works normally also when
<code>length(x) == 1</code>.
</p>
</li>
<li> <p><span class="pkg">tools</span>' <code>toTitleCase()</code> now works better, fixing
<a href="https://bugs.R-project.org/show_bug.cgi?id=18674">PR#18674</a>, thanks to Shannon Pileggi, Sarah Zeller,
Reiko Okamoto, and Hugo Gruson's ‘R Dev Day’
effort.
</p>
</li>
<li><p> Printing matrices (typically with many rows and or columns)
now also omits columns when desirable according to option
<code>max.print</code>, or argument <code>max</code>, respectively.
This is primarily the work of Lorena Abad,
Ekaterina Akimova, Hanne Oberman, Abhishek Ulayil,
and Lionel Henry at the ‘R Dev Day’, thus fixing
<a href="https://bugs.R-project.org/show_bug.cgi?id=15027">PR#15027</a>.
</p>
</li>
<li> <p><code>Sys.setLanguage()</code> now warns about <em>some</em>
failures to change the language.
</p>
</li>
<li><p> Printing <code>ls.str()</code> now shows <code>"<missing>"</code> even when
<span class="rlang"><b>R</b></span>'s language setting is not English.
</p>
</li>
<li> <p><code>xyTable()</code> now handles and reports <code>NA</code>s
fixing <a href="https://bugs.R-project.org/show_bug.cgi?id=18654">PR#18654</a>.
Thanks to Heather Turner and Zhian Kamvar for report and patch.
</p>
</li>
<li> <p><code>as(*, "raw")</code> now works as documented, thanks to Mikael
Jagan's <a href="https://bugs.R-project.org/show_bug.cgi?id=18795">PR#18795</a>.
</p>
</li>
<li><p> Informational messages of e.g., <code>print(1:1e4, max=1000)</code>,
now correctly mention <code>max</code> in addition to
<code>getOption("max.print")</code>.
</p>
</li>
<li> <p><code>rowSums(A, dims = dd)</code>, <code>colMeans(..)</code>, etc, give a
more helpful error message when <code>dd</code> is not of length one,
thanks to Michael Chirico's <a href="https://bugs.R-project.org/show_bug.cgi?id=18811">PR#18811</a>.
</p>
</li>
<li> <p><code>seq.Date()</code> no longer explicitly coerces results from
integer to double, analogously with <code>seq.default()</code>,
<code>seq.int()</code> and <code>seq.POSIXt()</code>, resolving a <em>modified</em>
<a href="https://bugs.R-project.org/show_bug.cgi?id=18782">PR#18782</a>.
</p>
</li>
<li> <p><code>axisTicks(usr, ...)</code> documentation clarification for
<code>log = TRUE</code>, fixing bug <a href="https://bugs.R-project.org/show_bug.cgi?id=18821">PR#18821</a> thanks to Duncan Murdoch.
</p>
</li>
<li> <p><code>debug()</code> and <code>debugonce(fun)</code> now also accept a
string <code>fun</code> when it names an S4 generic, fixing <a href="https://bugs.R-project.org/show_bug.cgi?id=18822">PR#18822</a>
thanks to Mikael Jagan.
</p>
</li>
<li> <p><code>debugonce(<S4-simple-body>, signature=*)</code> now works
correctly when “called twice”, fixing <a href="https://bugs.R-project.org/show_bug.cgi?id=18824">PR#18824</a> thanks to
Mikael Jagan.
</p>
</li>
<li> <p><code>format(dtime, digits=* / format=*)</code> is more consistent
when the <code>POSIXt</code> date-time object <code>dtime</code> has fractional
(non integer) seconds. Fixes <a href="https://bugs.R-project.org/show_bug.cgi?id=17350">PR#17350</a>, thanks to new contributions
by LatinR's ‘R Dev Day’ participants, Heather
Turner and Dirk Eddelbuettel; also fixes more cases, notably
when <code>format</code> contains ‘<span class="samp">⁠%OS<nodigit>⁠</span>’.
</p>
</li>
<li> <p><code>options(scipen = NULL)</code> and other invalid values now
signal an error instead of invalidating ops relying on a finite
integer value. Values outside the range -9 .. 9999 are now warned
about and set to a boundary or to the default <code>0</code>, e.g., in
case of an <code>NA</code>. This also fixes <a href="https://bugs.R-project.org/show_bug.cgi?id=16322">PR#16322</a>.
</p>
</li>
<li> <p><code>cbind()</code> could segfault with <code>NULL</code> inputs.
(Seen when <span class="rlang"><b>R</b></span> was built with <code>gcc-14</code>, <abbr>LTO</abbr> and C99
inlining semantics.)
</p>
</li>
<li><p> Fix segfault on <code>quartz()</code> from <code>grid.glyph()</code>
call with <code>glyphInfo()</code> that describes non-existent font
(<a href="https://bugs.R-project.org/show_bug.cgi?id=18784">PR#18784</a>). Thanks to Tomek Gieorgijewski.
</p>
</li>
<li> <p><code>format()</code> etc, using <code>decimal.mark = s</code>, by default
getting <code>s <- getOption("OutDec")</code>, signals a warning (to become
an error in the future) when <code>s</code> is not a string with exactly
one character.
</p>
</li>
<li><p> When <code>s <- getOption("OutDec")</code> is not a string of one
character, a warning is signalled now whenever it is used in internal
C code, notably when calling the default methods of <code>format()</code>.
</p>
</li>
<li> <p><code>pwilcox()</code> and <code>qwilcox()</code> now check for user
interrupt less frequently.
</p>
</li>
<li> <p><code>summary(<stl>)</code> (which prints directly) finally gets the
same <code>digits</code> default as the formatting printing of default
<code>summary()</code> method results, and it is documented explicitly.
</p>
</li>
<li> <p><code>options(show.error.locations = TRUE)</code> once
again shows the most recent known location when an
error is reported. Setting its value to <code>"bottom"</code>
is no longer supported. Numerical values are converted
to logical.
</p>
</li>
<li><p> C API function <code>R_GetCurrentSrcref(skip)</code> now
returns <code>srcref</code> entries correctly. (Note that there
is also a change to the interpretation of <code>skip</code>;
see the C-LEVEL API entry above.)
</p>
</li>
<li> <p><code>tools::Rd2latex()</code> now removes leading and trailing
spaces from <code style="white-space: pre;">⁠\alias⁠</code> entries as documented, fixing indexing
and linking hiccups in some PDF manuals.
</p>
</li>
<li> <p><code>R CMD Rd2pdf</code> can now render the package manual from
a <span class="option">--latex</span> installation also when the help contains figures.
</p>
</li>
<li><p> The argument of <code>as.environment()</code> is now named <code>x</code>,
not <code>object</code>, as was always documented and shown when
printing it; thanks to Gael Millot's <a href="https://bugs.R-project.org/show_bug.cgi?id=18849">PR#18849</a>.
</p>
</li>
<li><p> When <code>R CMD check</code> aims at getting the time+date from a
world clock, it is more robust against unexpected non-error results,
thanks to Michael Chirico's <a href="https://bugs.R-project.org/show_bug.cgi?id=18852">PR#18852</a>.
</p>
</li>
<li><p> The <code>tools::parseLatex()</code> parser made several parsing
errors (<a href="https://bugs.R-project.org/show_bug.cgi?id=18855">PR#18855</a>).
</p>
</li>
<li><p> Error messages produced by <code>tools::parseLatex()</code> are
now more readable (<a href="https://bugs.R-project.org/show_bug.cgi?id=18855">PR#18855</a>).
</p>
</li>
<li> <p><code>R CMD build <pkg></code> excludes more file patterns
when it tars the <pkg> directory, fixing both <a href="https://bugs.R-project.org/show_bug.cgi?id=18432">PR#18432</a> and
<a href="https://bugs.R-project.org/show_bug.cgi?id=18434">PR#18434</a>, for <code>vim</code> and <code>GNU Global</code>
<code>emacs</code> users, thanks to Dirk Eddelbuettel's patch.
</p>
</li>
<li> <p><code>quantile()</code>'s default method gets an option <code>fuzz</code>
to protect against floating point inaccuracy before rounding, thus
fixing <a href="https://bugs.R-project.org/show_bug.cgi?id=15811">PR#15811</a> and, en passant, <a href="https://bugs.R-project.org/show_bug.cgi?id=17683">PR#17683</a>.
</p>
</li>
<li><p> Printing arrays now also omits columns, rows and slices when
desirable according to option <code>max.print</code>, or argument
<code>max</code>, respectively, addressing most of the remaining part of
<a href="https://bugs.R-project.org/show_bug.cgi?id=15027">PR#15027</a>, thanks to Sherry Zhang's patch.
</p>
</li>
<li> <p><code>drop.terms(y ~ w, 1)</code> and similar now work, thanks to
Benjamin Sommer's report in <a href="https://bugs.R-project.org/show_bug.cgi?id=18861">PR#18861</a> and collaboration with
Heather Turner improving <code>reformulate()</code>.
</p>
</li>
<li><p> Many arguments which should be length-1 logical are checked
more thoroughly. The most commonly seen errors are in
<code>unlink(, recursive)</code>, <code>tempdir()</code> and the <code>na.rm</code>
arguments of <code>max()</code>, <code>min()</code>, <code>sum()</code>, ....
</p>
<p><code>grep()</code>, <code>strsplit()</code> and similar took
non-<code>TRUE</code>/<code>FALSE</code>
values of their logical arguments as <code>FALSE</code>, but these were
almost always mismatches to unnamed arguments and are now reported
as <code>NA</code>.
</p>
</li>
<li> <p><code>vignette("reshape")</code> is now also available on Windows.
</p>
</li>
<li> <p><code>trace(coerce, ..)</code> now works correctly, fixing <a href="https://bugs.R-project.org/show_bug.cgi?id=18823">PR#18823</a>
thanks to Mikael Jagan.
</p>
</li>
<li> <p><code>R CMD check</code> now also reports bad symbols in
package shared objects linked in from local static libraries
(<a href="https://bugs.R-project.org/show_bug.cgi?id=18789">PR#18789</a>).
</p>
</li>
<li> <p><code>factanal()</code> now works correctly also, e.g., for
<span class="pkg">GPArotation</span>, <code>oblimin()</code> rotations, fixing <a href="https://bugs.R-project.org/show_bug.cgi?id=18417">PR#18417</a>,
thanks to Coen Bernaards and others.
</p>
</li>
<li><p> Setting <code>attributes</code> on primitive functions is
deprecated now and already an error in the development version of <span class="rlang"><b>R</b></span>.
Changing the <code>environment</code> of a primitive does no longer happen
and signals a warning.
</p>
</li></ul>
<h3><img src="../help/figures/../../html/Rlogo.svg" class="toplogo" alt="[R logo]"> CHANGES IN R 4.4.3</h3>
<h4>INSTALLATION</h4>
<ul>
<li> <p><span class="rlang"><b>R</b></span> can be installed using C23 (for example with
<span class="option">-std=gnu23</span> or <span class="option">-std=gnu2x</span>) with recent compilers
including <code>gcc</code> 12–14, Apple <code>clang</code> 15–16, LLVM
<code>clang</code> 17–20 and Intel <code>icx</code> 2024.2.
</p>
<p>It can be installed with the upcoming (at the time of writing)
<code>gcc</code> 15, which defaults to C23.
</p>
</li></ul>
<h4>C-LEVEL FACILITIES</h4>
<ul>
<li><p> The functions <code>R_strtod</code> and <code>R_atof</code> now allow
hexadecimal constants without an exponent, for compatibility with
their C99 versions (<a href="https://bugs.R-project.org/show_bug.cgi?id=18805">PR#18805</a>).
</p>
</li></ul>
<h4>UTILITIES</h4>
<ul>
<li> <p><code>R CMD build</code> and <code>R CMD check</code> now allow
reference output for demo scripts (‘<span class="file">demo/<var>demo</var>.Rout.save</span>’
files) to be shipped with the package, as proposed by
Torsten Hothorn in <a href="https://bugs.R-project.org/show_bug.cgi?id=18816">PR#18816</a>.
</p>
</li></ul>
<h4>BUG FIXES</h4>
<ul>
<li> <p><code>kappa(A, exact=TRUE)</code> for singular <code>A</code> returns
<code>Inf</code> more generally, fixing <a href="https://bugs.R-project.org/show_bug.cgi?id=18817">PR#18817</a> reported by
Mikael Jagan.
</p>
</li>
<li><p> Fixed URLs of the sun spots (<code>sunspot.month</code> etc) data
sets and mention future changes due to recalibration.
</p>
</li>
<li><p> The parser now accepts hexadecimal constants with a decimal
point without an exponent (taken as <code>p0</code>) as documented in
<code>?NumericConstants</code> (<a href="https://bugs.R-project.org/show_bug.cgi?id=18819">PR#18819</a>).
</p>
</li>
<li> <p><code>rbind()</code> now works correctly when inputs include a raw
vector and a logical, integer or double vector – previously the
inclusion of the latter was garbled.
</p>
</li>
<li> <p><code>smooth.spline()</code> checks validity of its arguments
<code>df.offset</code> and <code>penalty</code>: it could segfault if they
were <code>NULL</code>.
</p>
</li>
<li> <p><code>isGeneric(<primitive>, fdef=*, getName=TRUE)</code> now also
returns the name instead of just <code>TRUE</code>, fixing <a href="https://bugs.R-project.org/show_bug.cgi?id=18829">PR#18829</a>
reported by Mikael Jagan.
</p>
</li>
<li> <p><code>isGeneric(fdef = print)</code> now works, fixing <a href="https://bugs.R-project.org/show_bug.cgi?id=18369">PR#18369</a>
thanks to Mikael Jagan.
</p>
</li>
<li> <p><code>sort(x, method = "qsort")</code> made illegal accesses when
<code>x</code> has length 0.
</p>
</li>
<li> <p><code>dir.create()</code> is protected against being passed an
empty string as its <code>path</code> argument.
</p>
</li>
<li><p> Silent integer overflow could occur in the
‘exact’ computations for <code>fisher.test()</code> for
unrealistic inputs: this is now an error.
</p>
</li>
<li><p> Some invalid C-level memory accesses are avoided for
<code>loglin(, margin = NULL)</code>.
</p>
<p><code>loglin(, param = TRUE)</code> no longer gives an error in corner
cases such as a one-dimensional input.
</p>
</li>
<li> <p><code>dev.capabilities() $ events</code> now reports <code>"Idle"</code> if
the device provides it, fixing <a href="https://bugs.R-project.org/show_bug.cgi?id=18836">PR#18836</a>, thanks to Trevor Davis.
</p>
</li>
<li> <p><code>arima(.., seasonal = <wrong-vector>)</code> correctly errors
now, ditto for <code>arima0()</code>, thanks to Norbert Kuder's report
on the R-devel list.
</p>
</li>
<li> <p><code>binomial(<link>)$linkinv(eta)</code> and <code>.. $mu.eta(eta)</code>
now also work for <code>"logit"</code> link when <code>is.integer(eta)</code>.
</p>
</li>
<li> <p><code>as.roman(x)</code> now should work platform independently,
also for, e.g., <code>x = "IIIII"</code> (= V) and <code>x = "IIIIII"</code>
(= VI).
</p>
</li>
<li> <p><code>R CMD Rd2pdf</code> works again on an installed package
directory containing LaTeX help (from option <span class="option">--latex</span>),
thanks to a report by Peter Ruckdeschel.
</p>
</li></ul>
<h3><img src="../help/figures/../../html/Rlogo.svg" class="toplogo" alt="[R logo]"> CHANGES IN R 4.4.2</h3>
<h4>C-LEVEL FACILITIES</h4>
<ul>
<li><p> The S-compatibility macros <code>F77_COM</code> and
<code>F77_COMDECL</code> defined in header ‘<span class="file">R_ext/RS.h</span>’ are
deprecated and will be removed shortly. We could find no record
of their use.
</p>
</li></ul>
<h4>BUG FIXES</h4>
<ul>
<li> <p>Mathlib function <code>lgammacor(x)</code> no longer warns about
underflow to zero for large <code>x</code>.
</p>
</li>
<li><p> Text widths and heights were incorrectly reported by the
Quartz device if the drawing context didn't exist yet (typically
when drawing off-screen to a window that is yet to appear, see
<a href="https://bugs.R-project.org/show_bug.cgi?id=18591">PR#18591</a>).
</p>
</li>
<li><p> The Quartz device could segfault in cases where paths with
spaces are used in the new glyph drawing API.
Thanks to Tomek Gieorgijewski (<a href="https://bugs.R-project.org/show_bug.cgi?id=18758">PR#18758</a>).
</p>
</li>
<li><p> On macOS in R CRAN builds, it is again possible to read
little-endian UTF-16 text with a <abbr>BOM</abbr> from a connection using
<code>encoding="UTF-16"</code>. Users building R from source should avoid
using the system <code>libiconv</code> in macOS 14.1 and later.
</p>
</li>
<li> <p><span class="pkg">methods</span>' internal <code>.requirePackage()</code> now re-enables
primitive method dispatch when needed; thanks to Ivan Krylov
for demystifying CRAN package check failures on the R-devel mailing
list.
</p>
</li></ul>
<h3><img src="../help/figures/../../html/Rlogo.svg" class="toplogo" alt="[R logo]"> CHANGES IN R 4.4.1</h3>
<h4>C-LEVEL FACILITIES</h4>
<ul>
<li><p> Functions <code>R_atof</code> and <code>R_strtod</code> declared in
header ‘<span class="file">R_ext/Utils.h</span>’ are now documented in
‘Writing R Extensions’ and so formally part of the API.
</p>
</li>
<li><p> The non-API entry points <code>Rf_setSVector</code>,
<code>Rf_StringFalse</code>, <code>Rf_StringTrue</code> and
<code>Rf_isBlankString</code> have been added to those reported by
<code>R CMD check</code>.
</p>
</li>
<li><p> The new function <code>Rf_allocLang</code> is now available. This
provides an alternative to the idiom of calling
<code>Rf_allocList</code> followed by <code>SET_TYPEOF</code>.
</p>
</li></ul>
<h4>UTILITIES</h4>
<ul>
<li> <p><code>R CMD check</code> now reports as warnings what
<code>gfortran</code> calls ‘Fortran 2018 deleted features’, all
of which have long been marked as ‘obsolescent’ and some of
which were deleted in Fortran 2008 or earlier. Fortran compilers
are no longer required to support these.
</p>
</li></ul>
<h4>BUG FIXES</h4>
<ul>
<li> <p><code>as.numeric()</code>, <code>scan()</code>, <code>type.convert()</code>
and other places which use the internal C function <code>R_strtod</code> now
require a <em>non-empty</em> digit sequence in a decimal or binary
exponent. This aligns with the C/POSIX standard for <code>strtod</code> and
with <code>?NumericConstants</code>.
</p>
</li>
<li> <p><code>as.data.frame(m, make.names=NA)</code> now works correctly for
a matrix <code>m</code> with <code>NA</code>'s in row names.
</p>
</li>
<li><p> The error message from <code><POSIXlt>[["hour"]]</code> and similar
now mentions <code>*[[, "hour"]]</code>, as wished for in <a href="https://bugs.R-project.org/show_bug.cgi?id=17409">PR#17409</a> and
proposed by Michael Chirico.
</p>
</li>
<li> <p><code>qbinom()</code> and potentially <code>qpois()</code>, <code>qnbinom()</code>,
no longer sometimes fail accurate inversion (of <code>pbinom()</code>,
etc), thanks to Christopher Chang's report and patch in <a href="https://bugs.R-project.org/show_bug.cgi?id=18711">PR#18711</a>.
</p>
</li>
<li><p> The internal help server on Windows can again serve requests
sent in quick succession, fixing a regression in <span class="rlang"><b>R</b></span> 4.4.0.
</p>
</li>
<li> <p><code>debugcall(<var>S3Generic</var>())</code> now also works when a
corresponding S4-generic version is in the <span class="pkg">methods</span> cache
(<a href="https://bugs.R-project.org/show_bug.cgi?id=18143">PR#18143</a>).
</p>
</li>
<li><p> Package <span class="pkg">tools</span>' <code>toTitleCase(ch0)</code> now returns
<code>character(0)</code> when <code>ch0</code> is of zero length; fixing
<a href="https://bugs.R-project.org/show_bug.cgi?id=18724">PR#18724</a>, reported by David Hugh Jones.
</p>
</li>
<li> <p><code>R CMD check</code> is no longer broken (without a check
result and no explanation in ‘<span class="file">00check.log</span>’) for a package
which declares an invalid <code>VignetteBuilder</code> in
‘<span class="file">DESCRIPTION</span>’ but has no vignettes.
</p>
</li></ul>
<h3><img src="../help/figures/../../html/Rlogo.svg" class="toplogo" alt="[R logo]"> CHANGES IN R 4.4.0</h3>
<h4>SIGNIFICANT USER-VISIBLE CHANGES</h4>
<ul>
<li><p> Startup banners, <code>R --version</code>, <code>sessionInfo()</code>
and <code>R CMD check</code> no longer report <code>(64-bit)</code> as part of
the platform as this is almost universal – the increasingly rare
32-bit platforms will still report <code>(32-bit)</code>.
</p>
<p>On Windows, ditto for window titles.
</p>
</li>
<li> <p><code>is.atomic(NULL)</code> now returns <code>FALSE</code>, as <code>NULL</code>
is not an atomic vector. Strict back-compatibility would
replace <code>is.atomic(foo)</code> by <code>(is.null(foo) || is.atomic(foo))</code>
but should happen only sparingly.
</p>
</li></ul>
<h4>NEW FEATURES</h4>
<ul>
<li><p> The <code>confint()</code> methods for <code>"glm"</code> and
<code>"nls"</code> objects have been copied to the <span class="pkg">stats</span>
package. Previously, they were stubs which called versions in
package <span class="pkg">MASS</span>. The <span class="pkg">MASS</span> namespace is no longer loaded
if you invoke (say) <code>confint(glmfit)</code>. Further, the
<code>"glm"</code> method for <code>profile()</code> and the <code>plot()</code>
and <code>pairs()</code> methods for class <code>"profile"</code> have been
copied from <span class="pkg">MASS</span> to <span class="pkg">stats</span>. (<code>profile.nls()</code> and
<code>plot.profile.nls()</code> were already in <span class="pkg">stats</span>.)
</p>
</li>
<li><p> The <code>confint()</code> and <code>profile</code> methods for
<code>"glm"</code> objects have gained a possibility to do profiling
based on the Rao Score statistic in addition to the default
Likelihood Ratio. This is controlled by a new <code>test =</code>
argument.
</p>
</li>
<li><p> The <code>pairs()</code> method for <code>"profile"</code> objects has
been extended with a <code>which =</code> argument to allow plotting only
a subset of the parameters.
</p>
</li>
<li><p> The <code>"glm"</code> method for <code>anova()</code> computes test
statistics and p-values by default, using a chi-squared test or
an F test depending on whether the dispersion is fixed or
free. Test statistics can be suppressed by giving argument
<code>test</code> a false logical value.
</p>
</li>
<li><p> In <code>setRepositories()</code> the repositories can be set
using their names via <code>name =</code> instead of index <code>ind =</code>.
</p>
</li>
<li> <p><code>methods()</code> and <code>.S3methods()</code> gain a
<code>all.names</code> option for the (rare) case where functions starting
with a ‘<span class="samp">⁠.⁠</span>’ should be included.
</p>
</li>
<li><p> Serializations can now be interrupted (e.g., by <kbd>Ctrl-C</kbd> on
a Unix-alike) if they take too long, e.g., from <code>save.image()</code>,
thanks to suggestions by Ivan Krylov and others on R-devel.
</p>
</li>
<li><p> New startup option <span class="option">--max-connections</span> to set the
maximum number of simultaneous connections for the session.
Defaults to 128 as before: allowed values up to 4096 (but resource
limits may in practice restrict to smaller values).
</p>
</li>
<li> <p><span class="rlang"><b>R</b></span> on Windows (since Windows 10 2004) now uses the new Segment
Heap allocator. This may improve performance of some memory-intensive
applications.
</p>
</li>
<li><p> When <span class="rlang"><b>R</b></span> packages are built, typically by <code>R CMD build <pkg></code>,
the new <code>--user=<build_user></code> option overrides the
(internally determined) user name, currently <code>Sys.info()["user"]</code>
or <span class="env">LOGNAME</span>. This is a (modified) fulfillment of Will Landau's
suggestion in <a href="https://bugs.R-project.org/show_bug.cgi?id=17530">PR#17530</a>.
</p>
</li>
<li> <p><code>tools::testInstalledBasic()</code> gets new optional
arguments <code>outDir</code> and <code>testSrcdir</code>, e.g., allowing to use
it in a <code><var>builddir</var> != <var>srcdir</var></code> setup, and in standard
“binary” Windows installation <b>if</b> a source ‘<span class="file">tests/</span>’
folder is present.
</p>
</li>
<li> <p><code>range(<DT_with_Inf>, finite = TRUE)</code> now work for objects
of class <code>"Date"</code>, <code>"POSIXct"</code>, and <code>"POSIXlt"</code> with
infinite entries, analogously to <code>range.default()</code>, as proposed
by Davis Vaughan on R-devel. Other <code>range()</code>-methods can make
use of new function <code>.rangeNum()</code>.
</p>
</li>
<li><p> New <code>.internalGenerics</code> object complementing
<code>.S3PrimitiveGenerics</code>, for documentation and low-level
book-keeping.
</p>
</li>
<li> <p><code>grid()</code> now invisibly returns the x- and y- coordinates
at which the grid-lines were drawn.
</p>
</li>
<li> <p><code>norm(., type)</code> now also works for complex matrices.
</p>
</li>
<li> <p><code>kappa(., exact = TRUE, norm = *)</code> now works for all
norms and also for complex matrices. In symmetric / triangular
cases, the new argument <code>uplo = "U" | "L"</code> allows the
upper or lower triangular part to be specified.
</p>
</li>
<li> <p><code>memDecompress(type = "unknown")</code> recognizes compression
in the default ‘zlib’ format as used by
<code>memCompress(type = "gzip")</code>.
</p>
</li>
<li> <p><code>memCompress()</code> and <code>memDecompress()</code> will use the
<code>libdeflate</code> library
(<a href="https://github.com/ebiggers/libdeflate">https://github.com/ebiggers/libdeflate</a>) if installed. This
uses the same type of compression for <code>type = "gzip"</code> but is
1.5-2x faster than the system <code>libz</code> library on some
common platforms: the speed-up may depend on the library version.
</p>
</li>
<li> <p><code>diff()</code> for objects of class <code>"Date"</code>,
<code>"POSIXct"</code>, and <code>"POSIXlt"</code> accepts a <code>units</code>
argument passed via <code>...</code>.
</p>
</li>
<li><p> Dynamic help now does a much better job of rendering package
‘<span class="file">DESCRIPTION</span>’ metadata.
</p>
</li>
<li> <p><code>Rprof()</code> gains an <code>event</code> argument and support
for elapsed (real) time profiling on Unix (<a href="https://bugs.R-project.org/show_bug.cgi?id=18076">PR#18076</a>).
</p>
</li>
<li> <p><code>filled.contour()</code> gains a <code>key.border</code> argument.
</p>
</li>
<li> <p><code>tools::update_pkg_po()</code> gets arguments <code>pot_make</code>
and <code>mo_make</code> for <em>not</em> re-making the corresponding
files, and additionally a <code>verbose</code> argument.
</p>
</li>
<li><p> Hexadecimal string colour specifications are now accepted
in short form, so, for example, we can use <code>"#123"</code>, which is
equivalent to <code>"#112233"</code>.
</p>
<p>Thanks to MikeFC for the original idea and Ella Kaye,
Malcolm Barrett, George Stagg, and Hanne Oberman for
the patch.
</p>
</li>
<li><p> Plain-text help shows <code style="white-space: pre;">⁠\var⁠</code> markup by angle brackets.
</p>
</li>
<li><p> The new experimental primitive function <code>declare()</code> is
intended to eventually allow information about <span class="rlang"><b>R</b></span> code to be
communicated to the interpreter, compiler, and code analysis
tools. The syntax for declarations is still being developed.
</p>
</li>
<li><p> Functions <code>psmirnov()</code>, <code>qsmirnov()</code> and
<code>rsmirnov()</code> in package <span class="pkg">stats</span> have had argument
<code>two.sided</code> renamed to <code>alternative</code>, to take into
account that the permutation distributions of the one-sided
statistics can be different in the case of ties. Consequence of
<a href="https://bugs.R-project.org/show_bug.cgi?id=18582">PR#18582</a>.
</p>
</li>
<li> <p><code>sort()</code> is now an implicit S4 generic in <span class="pkg">methods</span>.
</p>
</li>
<li><p> Formatting and printing, <code>format(z), print(z)</code>, of
complex vectors <code>z</code> no longer zap relatively small real or
imaginary parts to zero, fixing <a href="https://bugs.R-project.org/show_bug.cgi?id=16752">PR#16752</a>. This is an API
change, as it was documented previously to round real and
imaginary parts together on purpose, producing nicer looking
output. As mentioned, e.g. in the PR, this change is
compatible with many other “<span class="rlang"><b>R</b></span>-like” programming
environments.
</p>
<p>We have simplified the internal code and now basically format the
real and imaginary parts independently of each other.
</p>
</li>
<li><p> New experimental functions <code>Tailcall()</code> and
<code>Exec()</code> to support writing stack-space-efficient recursive
functions.
</p>
</li>
<li><p> Where characters are attempted to be plotted by
<code>pdf()</code>, <code>postscript()</code> and <code>xfig()</code> which are
not in the selected 8-bit character set (most often Latin-1) and
the <span class="rlang"><b>R</b></span> session is using a UTF-8 locale, the warning messages will
show the UTF-8 character rather than its bytes and one dot will be
substituted per character rather than per byte. (Platforms whose
<code>iconv()</code> does transliteration silently plot the
transliteration.)
</p>
<p>In a UTF-8 locale some transliterations are now done with a
warning (e.g., dashes and Unicode minus to hyphen, ligatures are
expanded, permille (‘<span class="samp">⁠‰⁠</span>’) is replaced by ‘<span class="samp">⁠o/oo⁠</span>’),
although the OS may have got there first. These are warnings as
they will continue to be replaced by dots in earlier versions of
<span class="rlang"><b>R</b></span>.
</p>
</li>
<li><p> The matrix multiplication functions <code>crossprod()</code> and
<code>tcrossprod()</code> are now also primitive and S3 generic, as
<code>%*%</code> had become in <span class="rlang"><b>R</b></span> 4.3.0.
</p>
</li>
<li> <p><code>source()</code> and <code>example()</code> have a new optional
argument <code>catch.aborts</code> which allows continued evaluation of
the <span class="rlang"><b>R</b></span> code after an error.
</p>
</li>
<li><p> The non-Quartz <code>tiff()</code> devices allow additional types
of compression if supported by the platform's ‘<span class="samp">⁠libtiff⁠</span>’ library.
</p>
</li>
<li><p> The list of base and recommended package names is now provided by
<code>tools::standard_package_names()</code>.
</p>
</li>
<li> <p><code>cairo_pdf()</code> and <code>cairo_ps()</code> default to
<code>onefile = TRUE</code> to closer match <code>pdf()</code> and
<code>postscript()</code>.
</p>
</li>
<li><p> New option <code>catch.script.errors</code> provides a documented way
to catch errors and then continue in non-interactive use.
</p>
</li>
<li> <p><code>L %||% R</code> newly in <span class="pkg">base</span> is an expressive idiom
for the phrases <code>if(!is.null(L)) L else R</code> or
<code>if(is.null(L)) R else L</code>.
</p>
</li>
<li><p> The return value from <code>warnings()</code> now always inherits
from <code>"warnings"</code> as documented, now also in the case of no
warnings where it previously returned <code>NULL</code>.
</p>
</li>
<li> <p><code>as.complex("1i")</code> now returns <code>0 + 1i</code> instead of
<code>NA</code> with a warning.
</p>
</li>
<li> <p><code>z <- c(NA, 1i)</code> now keeps the imaginary part
<code>Im(z[1]) == 0</code>, no longer coercing to <code>NA_complex_</code>.
Similarly, <code>cumsum(z)</code> correctly sums real and imaginary parts
separately, i.e., without “crosstalk” in case of <code>NA</code>s.
</p>
</li>
<li><p> On Alpine Linux <code>iconv()</code> now maps <code>"latin2"</code>,
<code>"latin-2"</code>, <code>"latin9"</code> and <code>"latin-9"</code> to encoding
names the OS knows about (case-insensitively).
</p>
</li>
<li> <p><code>iconv(sub = "Unicode")</code> now always zero-pads to four
(hex) digits, rather than to 4 or 8. (This seems to have become
the convention once Unicode restricted the number of Unicode
points to <code class="reqn">2^{21} - 1</code> and so will never need more
than 6 digits.)
</p>
</li>
<li> <p><code>NCOL(NULL)</code> now returns 0 instead of 1, for
consistency with <code>cbind()</code>.
</p>
</li>
<li><p> The information for the Euro glyph missing from the Adobe
‘<span class="file">.afm</span>’ files for the Courier, Helvetica and Times families
has been copied from their URW equivalents – this will
improve vertical centring in the <code>pdf()</code> and
<code>postscript()</code> devices.
</p>
</li>
<li><p> The included BLAS sources have been updated to those shipped
with LAPACK version 3.12.0. The changes are almost entirely cosmetic.
</p>
</li>
<li><p> The included LAPACK sources have been updated to version
3.12.0 and some further double-complex routines added.
</p>
</li>
<li><p> There are new font families for the 2014–5 URW 2.0 fonts
(see <code>?pdf</code>) which are included in recent versions of
Ghostscript. These have font widths for most Greek glyphs and a
few others which were missing from the original versions (whose
font families remain available for reproducibility, although
Ghostscript-based viewers will render using the 2.0 versions).
</p>
</li>
<li><p> Improve the large-n efficiency of <code>as.matrix(<dist>)</code>,
thanks an R contributors effort, notably by Tim Taylor and
Heather Turner, see <a href="https://bugs.R-project.org/show_bug.cgi?id=18660">PR#18660</a>.
</p>
</li>
<li><p> The default and <code>numeric</code> methods of <code>all.equal()</code>
get a <code>check.class</code> option.
</p>
</li>
<li> <p><code>zapsmall()</code> gets new optional arguments, function
<code>mFUN</code> and <code>min.d</code>, for extra flexibility; fulfills a
wish in <a href="https://bugs.R-project.org/show_bug.cgi?id=18199">PR#18199</a>. Also, it is now an implicit S4 generic in
package <span class="pkg">methods</span>.
</p>
</li>
<li><p> The Rd filter for <code>aspell()</code> gains an <code>ignore</code>
argument.
</p>
</li>
<li><p> New generic function <code>sort_by()</code>, primarily useful for
the <code>data.frame</code> method which can be used to sort rows of a
data frame by one or more columns.
</p>
</li>
<li><p> The licence headers for the <abbr>RPC</abbr> code in
‘<span class="file">src/extra/xdr</span>’ have been updated to use the GPL-compatible
licence published by Oracle America in 2010.
</p>
</li>
<li><p> New function <code>pkg2HTML()</code> in <span class="pkg">tools</span> to create
single-page HTML reference manuals for R packages.
</p>
</li>
<li><p> The byte code evaluator now uses less C stack space for
recursive calls to byte-compiled functions. It also makes more of
an effort to avoid allocations for scalar return values.
</p>
</li>
<li><p> New completion option <code>backtick</code> (disabled by default)
allows non-syntactic completions to be wrapped in backquotes. This
is currently only useful for Jupyter notebooks via the
<span class="pkg">IRkernel</span> package, and may cause problems for other backends.
</p>
</li>
<li><p> The numeric version creators now stop on invalid
non-character version specifications.
</p>
</li></ul>
<h4>INSTALLATION</h4>
<ul>
<li><p> The parser has been updated to work with <code>bison</code> 3.8.2,
which is now used for the pre-generated parsers in ‘<span class="file">gram.c</span>’,
<code>file.c</code>, and ‘<span class="file">gramRd.c</span>’. A few parser error messages
have changed, which may affect code that relies on exact messages.
</p>
</li></ul>
<h4>INSTALLATION on a UNIX-ALIKE</h4>
<ul>
<li><p> System valgrind headers are now required to use
<code>configure</code> option <span class="option">--with-valgrind-instrumentation</span>
with value <code>1</code> or <code>2</code>.
</p>
</li>
<li> <p><code>configure</code> will warn if it encounters a 32-bit
build, as that is nowadays almost untested.
</p>
</li>
<li><p> Environment variable <span class="env">R_SYSTEM_ABI</span> is no longer used and
so no longer recorded in ‘<span class="file">etc/Renviron</span>’ (it was not on Windows
and was only ever used when preparing package <span class="pkg">tools</span>).
</p>
</li>
<li><p> If the <code>libdeflate</code> library and headers are available,
<code>libdeflate</code> rather than <code>libz</code> is used to (de)compress
<span class="rlang"><b>R</b></span> objects in lazy-load databases. Typically tasks spend up to 5% of
their time on such operations, although creating lazy-data
databases is one of the exceptions.
</p>
<p>This can be suppressed if the library is available by the
<code>configure</code> option
<span class="option">--without-libdeflate-compression</span>.
</p>
</li>
<li> <p><code>configure</code> option <span class="option">--enable-lto=check</span> has
not worked reliably since 2019 and has been removed.
</p>
</li>
<li><p> The minimum <code>autoconf</code> requirement for a maintainer
build has been increased to <code>autoconf</code> 2.71.
</p>
<p>It is intended to increase this to 2.72 for <span class="rlang"><b>R</b></span> 4.5.0: the
distributed ‘<span class="file">configure</span>’ file was generated using 2.72.
</p>
</li>
<li><p> The minimum version requirement for an external LAPACK has
been reduced to 3.9.0.
</p>
</li>
<li><p> No default C++ compiler is set if no C++17 compiler is
detected: there is no longer an automatic fallback to C++14 or
C++11.
</p>
<p>Compilers from the last five years should have sufficient
support: for others macros <code>CXX</code> and <code>CXXSTD</code> can be set
in file ‘<span class="file">config.site</span>’ to provide a fallback if needed.
</p>
<p>The Objective-C++ compiler now by default uses the standard
selected by <span class="rlang"><b>R</b></span> for C++ (currently C++17) rather than the default
standard for the C++ compiler (which on macOS is still C++98).
</p>
</li></ul>
<h4>INSTALLATION on macOS</h4>
<ul>
<li><p> A new <code>configure</code> option <span class="option">--with-newAccelerate</span>
makes use of Apple's ‘new’ BLAS / LAPACK interfaces in their
Accelerate framework. Those interfaces are only available in macOS
13.3 or later, and building requires <abbr>SDK</abbr> 13.3 or later (from the
Command Line Tools or Xcode 14.3 or later).
</p>
<p>By default the option uses new Accelerate for BLAS calls: to also
use it for LAPACK use option <span class="option">--with-newAccelerate=lapack</span>. The
later interfaces provide LAPACK 3.9.1 rather than 3.2.1: 3.9.1 is
from 2021-04 and does not include the improved algorithms
introduced in LAPACK 3.10.0 (including for BLAS calls).
</p>
</li></ul>
<h4>INSTALLATION on WINDOWS</h4>
<ul>
<li><p> The makefiles and installer scripts for Windows have been
tailored to Rtools44, an update of the Rtools43 toolchain. It
is based on GCC 13 and newer versions of MinGW-W64, binutils
and libraries (targeting 64-bit Intel CPUs). R-devel can no longer be
built using Rtools43 without changes.
</p>
</li>
<li> <p>Rtools44 has experimental support for 64-bit ARM
(<code>aarch64</code>) CPUs <em>via</em> the LLVM 17 toolchain using
<code>lld</code>, <code>clang</code>/<code>flang-new</code> and <code>libc++</code>.
</p>
</li></ul>
<h4>UTILITIES</h4>
<ul>
<li> <p><code>R CMD check</code> notes when S4-style exports are used
without declaring a strong dependence on package <span class="pkg">methods</span>.
</p>
</li>
<li> <p><code>tools::checkRd()</code> (used by <code>R CMD check</code>)
detects more problems with <code style="white-space: pre;">⁠\Sexpr⁠</code>-based dynamic content,
including bad nesting of <code style="white-space: pre;">⁠\Sexpr⁠</code>s and invalid arguments.
</p>
</li>
<li> <p><code>tools::checkRd()</code> now reports Rd titles and section
names ending in a period; this is ignored by <code>R CMD check</code>
unless environment variable <span class="env">_R_CHECK_RD_CHECKRD_MINLEVEL_</span> is
set to -5 or smaller.
</p>
</li>
<li> <p><code>R CMD check</code> now notes Rd files without an
<code style="white-space: pre;">⁠\alias⁠</code>, as long documented in ‘Writing R Extensions’
§1.3.1.
The check for a missing <code style="white-space: pre;">⁠\description⁠</code> has been moved from
<code>tools::checkRd()</code> to <code>tools::checkRdContents()</code>.
</p>
</li>
<li> <p><code>R CMD check</code> now visits ‘<span class="file">inst/NEWS.Rd</span>’
and OS-specific ‘<span class="file">man</span>’ subdirectories when checking Rd files.
</p>
</li>
<li> <p><code>tools::checkDocFiles()</code> and
<code>tools::checkRdContents()</code> now also check internal Rd files
by default, but “specially” (ignoring missing documentation
of arguments).
</p>
</li>
<li> <p><code>R CMD Rdiff</code> gets option <span class="option">--useEx</span>.
</p>
</li>
<li> <p><code>R CMD check</code> now warns on non-portable uses of
Fortran <code>KIND</code> such as <code>INTEGER(KIND=4)</code> and
<code>REAL(KIND=8)</code>.
</p>
<p>To see the failing lines set environment variable
<span class="env">_R_CHECK_FORTRAN_KIND_DETAILS_</span> to a true value.
</p>
</li>
<li><p> When checking Rd files, <code>R CMD check</code> now
notes some of the “lost braces” that
<code>tools::checkRd()</code> finds. Typical problems are Rd macros
missing the initial backslash (e.g., ‘<span class="samp">⁠code{...}⁠</span>’), in-text
set notation (e.g., ‘<span class="samp">⁠{1, 2}⁠</span>’, where the braces need
escaping), and <code style="white-space: pre;">⁠\itemize⁠</code> lists with <code style="white-space: pre;">⁠\describe⁠</code>-style
entries of the form <code style="white-space: pre;">⁠\item{label}{description}⁠</code>.
</p>
</li>
<li> <p><code>R CMD INSTALL</code> (and hence <code>check</code>) will
compile C++ code with <code>-DR_NO_REMAP</code> if environment variable
<span class="env">_R_CXX_USE_NO_REMAP_</span> is set to a true value. It is planned
that this will in future become the default for compiling C++.
</p>
</li>
<li><p> The new built-in Rd macro <code style="white-space: pre;">⁠\dontdiff{}⁠</code> can be used
to mark example code whose output should be ignored when comparing
check output to reference output
(‘<span class="file">tests/Examples/<var>pkg</var>-Ex.Rout.save</span>’).
The <code style="white-space: pre;">⁠\dontdiff⁠</code> tag, like <code style="white-space: pre;">⁠\donttest⁠</code>, is <em>not</em>
shown on the rendered help page, so provides a clean alternative
to ‘<span class="samp">⁠## IGNORE_RDIFF_(BEGIN|END)⁠</span>’ comments.
</p>
</li>
<li> <p><code>R CMD build</code> when there is no ‘<span class="file">NAMESPACE</span>’, now
uses the recommended <code>exportPattern("^[^.]")</code>, instead of
exporting everything.
</p>
</li>
<li> <p><code>R CMD check</code> now warns about non-ASCII characters
in the ‘<span class="file">NAMESPACE</span>’ file (in addition to <span class="rlang"><b>R</b></span> files). Such
packages are not portable and may fail to install on some platforms.
</p>
</li></ul>
<h4>C-LEVEL FACILITIES</h4>
<ul>
<li><p> Headers ‘<span class="file">R_ext/Applic.h</span>’ and ‘<span class="file">R-ext/Linpack.h</span>’
used to include ‘<span class="file">R_ext/BLAS.h</span>’ although this was undocumented and
unneeded by their documented entry points. They no longer do so.
</p>
</li>
<li><p> New function <code>R_missing()</code>, factored out from
<code>do_missing()</code>, used to fix <a href="https://bugs.R-project.org/show_bug.cgi?id=18579">PR#18579</a>.
</p>
</li>
<li> <p><code>SEXP</code> type <code>S4SXP</code> has been renamed to <code>OBJSXP</code>
to support experimenting with alternative object systems. The
<code>S4SXP</code> value can still be used in <code>C</code> code but is now
deprecated. Based on contributions from the R Consortium's
Object-Oriented Programming Working Group.
</p>
</li>
<li><p> New function <code>pow1p(x,y)</code> for accurate <code>(1+x)^y</code>.
</p>
</li>
<li> <p><code>mkCharLenCE</code> was incorrectly documented to take a
<code>size_t</code> length but was implemented with <code>int</code> (and
character strings in <span class="rlang"><b>R</b></span> are limited to <code class="reqn">2^{31} - 1</code> bytes).
</p>
</li></ul>
<h4>DEPRECATED AND DEFUNCT</h4>
<ul>
<li> <p><code>data()</code> no longer handles zipped data from
long-defunct (since <span class="rlang"><b>R</b></span> 2.13.0) <span class="option">--use-zip-data</span>
installations.
</p>
</li>
<li><p> The legacy graphics devices <code>pictex()</code> and
<code>xfig()</code> are now deprecated. They do not support recent
graphics enhancements and their font handling is rudimentary. The
intention is to retain them for historical interest as long as
they remain somewhat functional.
</p>
</li>
<li><p> Support for <code>encoding = "MacRoman"</code> has been removed
from the <code>pdf()</code> and <code>postscript()</code> devices – this was
a legacy encoding supporting classic macOS up to 2001 and no
longer has universal <code>libiconv</code> support.
</p>
</li>
<li> <p><code>is.R()</code> is deprecated as no other S dialect is known
to be in use (and this could only identify historical dialects,
not future ones).
</p>
<p>Further information on calls can be obtained by setting the
environment variable <span class="env">_R_DEPRECATED_IS_R_</span> to ‘<span class="samp">⁠error⁠</span>’
which turns the deprecation warning into an error and so by
default gives a traceback. (This is done by <code>R CMD check
--as-cran</code>.)
</p>
</li>
<li> <p><code>UseMethod()</code> no longer forwards local variables
assigned in the generic function into method call environments
before evaluating the method body. This makes method calls behave
more like standard function calls and makes method code easier to
analyze correctly.
</p>
</li>
<li><p> The twelve <code>as.data.frame.<class>()</code> methods which were
deprecated only via <span class="env">_R_CHECK_AS_DATA_FRAME_EXPLICIT_METHOD_</span> and
in <code>R CMD check --as-cran</code> are formally deprecated now in
favour of calling <code>as.data.frame()</code> or <code>as.data.frame.vector()</code>.
The deprecation “check” now works also when <code>as.data.frame()</code>
is S4 generic thanks to Ivan Krylov.
</p>
</li>
<li><p> The default method for the directional comparison operators
<code><</code>, <code>></code>, <code><=</code>, and <code>>=</code> now signals an error
when one of the operands is a language object, i.e. a symbol or a
call.
</p>
</li>
<li><p> For <code>terms.formula()</code>, deprecate <code>abb</code> and <code>neg.out</code>
arguments <em>formally</em> in addition to just documenting it.
</p>
</li></ul>
<h4>BUG FIXES</h4>
<ul>
<li><p> The <span class="pkg">methods</span> package is more robust to not being attached to
the search path. More work needs to be done.
</p>
</li>
<li> <p><code>pairwise.t.test()</code> misbehaved when subgroups had 0 <abbr>DF</abbr>
for variance, even with <code>pool.sd = TRUE</code>. (<a href="https://bugs.R-project.org/show_bug.cgi?id=18594">PR#18594</a> by
Jack Berry.)
</p>
</li>
<li><p> Probability distribution functions <code>[dpq]<distrib>(x, *)</code>,
but also <code>bessel[IKJY](x, .)</code> now consistently preserve
<code>attributes(x)</code> when <code>length(x) == 0</code>, e.g., for a
<code class="reqn">2 \times 0</code> matrix, thanks to Karolis Koncevičius'
report <a href="https://bugs.R-project.org/show_bug.cgi?id=18509">PR#18509</a>.
</p>
</li>
<li><p> Group “Summary” computations such as
<code>sum(1:3, 4, na.rm = 5, NA, 7, na.rm = LL)</code> now give an error
instead of either <code>17</code> or <code>NN</code> for <code>LL</code> true or false,
as proposed by Ivan Krylov on the R-devel mailing list. (This
also means it is now an error to specify <code>na.rm</code> more than once.)
</p>
</li>
<li> <p><code>as.complex(x)</code> now returns <code>complex(real = x,
imaginary = 0)</code> for <em>all</em> numerical and logical <code>x</code>,
notably also for <code>NA</code> or <code>NA_integer_</code>.
</p>
</li>
<li><p> Directories are now omitted by
<code>file.copy(, recursive = FALSE)</code> and in <code>file.append()</code>
(<a href="https://bugs.R-project.org/show_bug.cgi?id=17337">PR#17337</a>).
</p>
</li>
<li> <p><code>gsub()</code> and <code>sub()</code> are now more robust to integer
overflow when reporting errors caused by too large input strings
(<a href="https://bugs.R-project.org/show_bug.cgi?id=18346">PR#18346</a>).
</p>
</li>
<li><p> Top-level handlers are now more robust to attempts to remove a
handler whilst handlers are running (<a href="https://bugs.R-project.org/show_bug.cgi?id=18508">PR#18508</a>).
</p>
</li>
<li><p> The handling of <code>Alt+F4</code> in dialogs created on Windows using
GraphApp has been fixed (<a href="https://bugs.R-project.org/show_bug.cgi?id=13870">PR#13870</a>).
</p>
</li>
<li> <p><code>density()</code> more consistently computes grid values for the
FFT-based convolution, following Robert Schlicht's analysis and
proposal in <a href="https://bugs.R-project.org/show_bug.cgi?id=18337">PR#18337</a>, correcting density values typically by a
factor of about 0.999. Argument <code>old.coords = TRUE</code> provides
back compatibility.
</p>
</li>
<li> <p><code>palette.colors()</code> gains a <code>name</code> argument that
defaults to <code>FALSE</code> controlling whether the vector of colours
that is returned has names (where possible). <a href="https://bugs.R-project.org/show_bug.cgi?id=18529">PR#18529</a>.
</p>
</li>
<li> <p><code>tools::xgettext()</code> no longer extracts the
(non-translatable) class names from <code>warningCondition</code> and
<code>errorCondition</code> calls.
</p>
</li>
<li> <p><code>S3method(<gen>, <class>, <func>)</code> in the ‘<span class="file">NAMESPACE</span>’
file now works (again) when <code><func></code> is visible from the
namespace, e.g., imported, or in base.
</p>
</li>
<li> <p><code>getParseData(f)</code> now also works for a function defined
in the first of several ‘<span class="file"><pkg>/R/*.R</span>’ source files, thanks to
Kirill Müller's report and Duncan Murdoch's patch in <a href="https://bugs.R-project.org/show_bug.cgi?id=16756">PR#16756</a>.
</p>
</li>
<li><p> Rd <code style="white-space: pre;">⁠\Sexpr⁠</code> macros with nested <code style="white-space: pre;">⁠#ifdef⁠</code>
conditionals were not processed.
</p>
</li>
<li><p> A non-blocking connection with non-default encoding (such as
a socket) now correctly returns from <code>readLines()</code> after new
data has arrived also when its <abbr>EOF</abbr> had been reached
previously. Thanks to Peter Meilstrup's report on R-devel and
Ivan Krylov's report and patch proposal in <a href="https://bugs.R-project.org/show_bug.cgi?id=18555">PR#18555</a>.
</p>
</li>
<li> <p><code>tools::checkRdContents()</code> failed to detect empty
argument descriptions when they spanned multiple lines,
including those generated by <code>prompt()</code>.
These cases are now noted by <code>R CMD check</code>.
</p>
</li>
<li><p> Plain-text help no longer outputs spurious colons in the
arguments list (for multi-line <code style="white-space: pre;">⁠\item⁠</code> labels in the Rd source).
</p>
</li>
<li> <p><code>kappa()</code> and <code>rcond()</code> work correctly in more cases;
<code>kappa(., norm = "2")</code> now warns that it computes the 1-norm with
(default) <code>exact = FALSE</code>; prompted by Mikael Jagan's quite
comprehensive <a href="https://bugs.R-project.org/show_bug.cgi?id=18543">PR#18543</a>.
</p>
</li>
<li><p> Rd skeletons generated by <code>prompt()</code> or
<code>promptData()</code> now use a dummy title (so <code>R CMD
build</code> works). <code>tools::checkRdContents()</code> has been updated
to detect such template leftovers, including from
<code>promptPackage()</code>.
</p>
</li>
<li><p> When S4 method dispatch fails because no method was found, the
error message now includes the signature argument names; thanks to
Michael Chirico's proposal on the R-devel list.
</p>
</li>
<li> <p><code>withAutoprint({ .. })</code> now preserves <code>srcref</code>s
previously lost, thanks to Andrew Simmons' report plus fix in
<a href="https://bugs.R-project.org/show_bug.cgi?id=18572">PR#18572</a>.
</p>
</li>
<li> <p><code>transform.data.frame()</code> no longer adjusts names;
in particular, untransformed variables are kept as-is,
including those with syntactically invalid names (<a href="https://bugs.R-project.org/show_bug.cgi?id=17890">PR#17890</a>).
</p>
</li>
<li><p> The <code>keep.source</code> option for Rd <code style="white-space: pre;">⁠\Sexpr⁠</code> blocks is
no longer ignored.
</p>
</li>
<li><p> The <code>formula</code> methods for <code>t.test()</code> and
<code>wilcox.test()</code> now catch when <code>paired</code> is passed,
addressing <a href="https://bugs.R-project.org/show_bug.cgi?id=14359">PR#14359</a>; use <code>Pair(x1, x2) ~ 1</code> for a paired test.
</p>
</li>
<li><p> The level reported in the <code>browser</code> prompt was often too
large. It now shows the number of browser contexts on the stack.
</p>
</li>
<li><p> For <code>cbind()</code> and <code>rbind()</code>, the optional
<code>deparse.level</code> argument is now properly passed to methods,
thanks to Mikael Jagan's <a href="https://bugs.R-project.org/show_bug.cgi?id=18579">PR#18579</a> and comments there.
</p>
</li>
<li><p> Some error and warning messages for large (‘long
vector’) <code>matrix(v, nr, nc)</code> and <code>dim(m) <- d</code> are now
correct about sizes, using <code>long long</code> formatting, fixing
<a href="https://bugs.R-project.org/show_bug.cgi?id=18612">PR#18612</a> (and more) reported by Mikael Jagan.
</p>
</li>
<li> <p><code>readChar(useBytes = TRUE)</code> now terminates strings even when
the underlying connection uses extra spaces in the input buffer. This
fixes problems with extra garbage seen with <code>gzip</code>
connections, <a href="https://bugs.R-project.org/show_bug.cgi?id=18605">PR#18605</a>.
</p>
</li>
<li><p> Named capture in PCRE regular expressions now works also with
more than 127 named groups (<a href="https://bugs.R-project.org/show_bug.cgi?id=18588">PR#18588</a>).
</p>
</li>
<li><p> Datetime functions are now robust against long jumps when
dealing with internal time zone changes. This avoids confusing
warnings about an invalid time zone, previously triggered by turning
warnings into errors or handling them via <code>tryCatch</code> (<a href="https://bugs.R-project.org/show_bug.cgi?id=17966">PR#17966</a>,
<a href="https://bugs.R-project.org/show_bug.cgi?id=17780">PR#17780</a>).
</p>
</li>
<li><p> Datetime functions now restore even an empty <span class="env">TZ</span>
environment variable after internal time zone changes (<a href="https://bugs.R-project.org/show_bug.cgi?id=17724">PR#17724</a>).
This makes results of datetime functions with this (typically
unintentional) setting more predictable.
</p>
</li>
<li> <p><code>drop.terms(*)</code> now drops response as by default,
<code>keep.response = FALSE</code>, fixing <a href="https://bugs.R-project.org/show_bug.cgi?id=18564">PR#18564</a> thanks to Mikael Jagan.
</p>
</li>
<li> <p><code>dummy.coef(.)</code> now also works for <code>lm()</code>-models with
<code>character</code> categorical predictor variables rather than
<code>factor</code> ones, fixing <a href="https://bugs.R-project.org/show_bug.cgi?id=18635">PR#18635</a> reported by Jinsong Zhao.
</p>
</li>
<li> <p><code>formals(f) <- formals(f)</code> now also works for a function
w/o arguments and atomic <em>constant</em> <code>body(f)</code>.
</p>
</li>
<li><p> Correct <code>as.function(<invalid list>, .)</code>'s error message.
</p>
</li>
<li> <p><code>removeSource()</code> is yet more thorough in finding and
removing <code>"srcref"</code> and the other source references from parsed
<span class="rlang"><b>R</b></span> language chunks, fixing <a href="https://bugs.R-project.org/show_bug.cgi?id=18638">PR#18638</a> thanks to Andrew Simmons.
</p>
</li>
<li> <p><code>dgeom()</code> is more accurate now, notably when its result is
very small, fixing <a href="https://bugs.R-project.org/show_bug.cgi?id=18642">PR#18642</a> thanks to the proposal of Morten Welinder,
also improving other instances where C level <code>binom_raw(x, n, ..)</code>
has <code>x == 0</code> or <code>x== n</code>.
</p>
</li>
<li> <p><code>warning()</code> with <code>options(warn = 1)</code> has improved
output for multi-line messages.
</p>
</li>
<li> <p><code>axis.Date()</code> and <code>axis.POSIXct()</code> now respect the
<code>par("lab")</code> setting for the number of <code>pretty()</code> intervals.
</p>
</li>
<li><p> Comparisons for language objects (which are based on
deparsing) are now more careful about using accurate deparsed
results (<a href="https://bugs.R-project.org/show_bug.cgi?id=18676">PR#18676</a>).
</p>
</li>
<li><p> Plain-text help (<code>Rd2txt</code>) now correctly preserves
blank lines following single-line <code style="white-space: pre;">⁠\dontrun⁠</code> code.
</p>
</li>
<li> <p><code><POSIXlt>[*]</code> no longer sets wrong <code>"balanced"</code>
attribute, fixing <a href="https://bugs.R-project.org/show_bug.cgi?id=18681">PR#18681</a> thanks to Mikael Jagan.
</p>
</li>
<li> <p><code>str(<classed-call>)</code> now deparses the call as expected,
fixing <a href="https://bugs.R-project.org/show_bug.cgi?id=18684">PR#18684</a>, reported by Dave Slager.
</p>
</li>
<li><p> In Rd examples, code following the closing brace of a
<code style="white-space: pre;">⁠\dontrun⁠</code>, <code style="white-space: pre;">⁠\dontshow⁠</code> or <code style="white-space: pre;">⁠\donttest⁠</code> tag
on the same line is no longer skipped when <code>R CMD check</code>
runs the examples.
</p>
</li>
<li> <p><code>as.data.frame(matrix(*, ncol=0))</code> now gets valid
<code>names()</code> and <code>colnames()</code>; reported by Davis Vaughan
on the R-devel list.
</p>
</li>
<li><p> Internal Mathlib function <code>stirlerr(n)</code> is now almost
fully (52-bit) accurate for all <code class="reqn">n >= ~5.9</code> and more accurate
also in the range <code class="reqn">1 -- 5.9</code>. This entails small (“after
12th decimal”) changes in density functions, e.g., <code>dgamma()</code>
in <em>some</em> regions of their support. The fix was partly
prompted by Morten Welinder's <a href="https://bugs.R-project.org/show_bug.cgi?id=18640">PR#18640</a>.
</p>
</li>
<li><p> Numbers like <code>9876543.2</code> are now considered non-integer by
Mathlib internal <code>R_nonint()</code>, amending original fix of <a href="https://bugs.R-project.org/show_bug.cgi?id=15734">PR#15734</a>.
</p>
</li>
<li><p> Rd comment lines no longer cause broken paragraphs in the
rendered PDF and plain-text help. In code blocks, pure comment
lines (starting with ‘<span class="samp">⁠%⁠</span>’) no longer produce an empty line.
</p>
</li>
<li> <p><code>xtabs(Freq ~ .)</code> now consistently defaults to
<code>na.action = na.pass</code>, using <code>na.rm = FALSE</code> (added as an
argument) when summing over <code>Freq</code> (<a href="https://bugs.R-project.org/show_bug.cgi?id=17770">PR#17770</a>).
</p>
</li>
<li> <p><code>tools::testInstalledPackage()</code> is no longer silent
about failures from running examples or tests and its return code
no longer ignores failures from checking vignettes.
</p>
</li></ul>
<h3><img src="../help/figures/../../html/Rlogo.svg" class="toplogo" alt="[R logo]"> CHANGES IN R 4.3.3</h3>
<h4>NEW FEATURES</h4>
<ul>
<li> <p><code>iconv()</code> now fixes up variant encoding names such as
<code>"utf8"</code> case-insensitively.
</p>
</li></ul>
<h4>DEPRECATED AND DEFUNCT</h4>
<ul>
<li><p> The legacy <code>encoding = "MacRoman"</code> is deprecated in
<code>pdf()</code> and <code>postscript()</code>: support was incomplete in
earlier versions of <span class="rlang"><b>R</b></span>.
</p>
</li></ul>
<h4>BUG FIXES</h4>
<ul>
<li><p> Arguments are now properly forwarded to methods on S4 generics
with ... in the middle of their formal arguments. This was
broken for the case when a method introduced an argument but did
not include ... in its own formals. Thanks to Hervé Pagès for
the report <a href="https://bugs.R-project.org/show_bug.cgi?id=18538">PR#18538</a>.
</p>
</li>
<li><p> Some invalid <code>file</code> arguments to <code>pictex()</code>,
<code>postscript()</code> and <code>xfig()</code> opened a file called
‘<span class="samp">⁠NA⁠</span>’ rather than throw an error. These included
<code>postscript(NULL)</code> (which some people expected to work like
<code>pdf(NULL)</code>).
</p>
</li>
<li><p> Passing <code>filename = NA</code> to <code>svg()</code>, <code>cairo_pdf()</code>,
<code>cairo_ps()</code> or the Cairo-based bitmap devices opened a file
called ‘<span class="samp">⁠NA⁠</span>’: it now throws an error.
</p>
</li>
<li> <p><code>quartz(file = NA)</code> opened a file called ‘<span class="samp">⁠NA⁠</span>’, including
when used as a Quartz-based bitmap device. It now gives an error.
</p>
</li>
<li> <p><code>rank(<long vector>)</code> now works, fixing <a href="https://bugs.R-project.org/show_bug.cgi?id=18617">PR#18617</a>, thanks to
Ilia Kats.
</p>
</li>
<li> <p><code>seq.int()</code> did not adequately check its
<code>length.out</code> argument.
</p>
</li>
<li> <p><code>match(<POSIXct>, .)</code> is correct again for differing time
zones, ditto for <code>"POSIXlt"</code>, fixing <a href="https://bugs.R-project.org/show_bug.cgi?id=18618">PR#18618</a> reported by
Bastian Klein.
</p>
</li>
<li> <p><code>drop.terms(*, dropx = <0-length>)</code> now works, fixing
<a href="https://bugs.R-project.org/show_bug.cgi?id=18563">PR#18563</a> as proposed by Mikael Jagan.
</p>
</li>
<li> <p><code>drop.terms(*)</code> keeps <code> + offset(.)</code> terms when it should,
<a href="https://bugs.R-project.org/show_bug.cgi?id=18565">PR#18565</a>, and <code>drop.terms()</code> no longer makes up a response,
<a href="https://bugs.R-project.org/show_bug.cgi?id=18566">PR#18566</a>, fixing both bugs thanks to Mikael Jagan.
</p>
</li>
<li> <p><code>getS3method("t", "test")</code> no longer finds the
<code>t.test()</code> function, fixing <a href="https://bugs.R-project.org/show_bug.cgi?id=18627">PR#18627</a>.
</p>
</li>
<li> <p><code>pdf()</code> and <code>postscript()</code> support for the documented
Adobe encodings <code>"Greek"</code> and <code>"Cyrilllic"</code> was missing
(although the corresponding Windows' codepages could be used).
</p>
</li>
<li><p> Computations of glyph metric information for <code>pdf()</code>
and <code>postscript()</code> did not take into account that
transliteration could replace one character by two or more (only
seen on macOS 14) and typically warned that the information was
not known.
</p>
</li>
<li> <p><code>rank(x)</code> no longer overflows during integer addition, when
computing rank average for largish but not-yet long vector <code>x</code>,
fixing <a href="https://bugs.R-project.org/show_bug.cgi?id=18630">PR#18630</a>, thanks to Ilia Kats.
</p>
</li>
<li> <p><code>list.files()</code> on Windows now returns also files with names
longer that 260 bytes (the Windows limit is 260 characters).
Previously, some file names particularly with ‘East Asian’
characters were omitted.
</p>
</li>
<li> <p><code>cov2cor(<0 x 0>)</code> now works, fixing <a href="https://bugs.R-project.org/show_bug.cgi?id=18423">PR#18423</a> thanks to
Mikael Jagan and Elin Waring.
</p>
</li>
<li> <p><code>cov2cor(<negative diagonal>)</code> and similar now give one
warning instead of two, with better wording, fixing <a href="https://bugs.R-project.org/show_bug.cgi?id=18424">PR#18424</a> thanks
to Mikael Jagan.
</p>
</li>
<li> <p><span class="pkg">tools</span><code>:: startDynamicHelp()</code> now ensures <code>port</code>
is in proper range, fixing <a href="https://bugs.R-project.org/show_bug.cgi?id=18645">PR#18645</a>.
</p>
</li>
<li> <p><code>pbeta(x, a,b)</code> is correct now for <code>x</code>=0 or 1 in the
boundary cases where <code>a</code> or <code>b</code> or both are 0, fixing
<a href="https://bugs.R-project.org/show_bug.cgi?id=18672">PR#18672</a> thanks to Michael Fay.
</p>
</li>
<li> <p><code>pmatch(x, table)</code> for large <code>table</code>, also called for
data frame row selection, <code>dfrm[nm, ]</code>, is now interruptible,
fixing <a href="https://bugs.R-project.org/show_bug.cgi?id=18656">PR#18656</a>.
</p>
</li>
<li> <p><code>predict(<rank-deficient lm>, newdata=*)</code> fix computing of
<code>nbasis</code>, see Russ Lenth's comment 29 in <a href="https://bugs.R-project.org/show_bug.cgi?id=16158">PR#16158</a>.
</p>
</li>
<li><p> Added a work-around for a bug in macOS 14.3.1 and higher which
prevents R plots in the Quartz Cocoa device from updating on screen.
</p>
</li></ul>
<h3><img src="../help/figures/../../html/Rlogo.svg" class="toplogo" alt="[R logo]"> CHANGES IN R 4.3.2</h3>
<h4>NEW FEATURES</h4>
<ul>
<li><p> The default initialization of the <code>"repos"</code> option
from the ‘<span class="file">repositories</span>’ file at startup can be skipped by
setting environment variable <span class="env">R_REPOSITORIES</span> to <code>NULL</code>
such that <code>getOption("repos")</code> is empty if not set elsewhere.
</p>
</li>
<li> <p><code>qr.X()</code> is now an implicit S4 generic in <span class="pkg">methods</span>.
</p>
</li>
<li> <p><code>iconv(to = "ASCII//TRANSLIT")</code> is emulated using
substitution on platforms which do not support it (notably Alpine
Linux). This should give a human-readable conversion in ASCII on
all platforms (rather than <code>NA_character_</code>).
</p>
</li>
<li> <p><code>trans3d()</code> gains options <code>continuous</code> and
<code>verbose</code> addressing the problem of possible “wrap
around” when projecting too long curves, as reported by Achim
Zeileis in <a href="https://bugs.R-project.org/show_bug.cgi?id=18537">PR#18537</a>.
</p>
</li>
<li> <p><code>tools::showNonASCII()</code> has been rewritten to work
better on macOS 14 (which has a changed implementation of
<code>iconv()</code>).
</p>
</li>
<li> <p><code>tiff(type = "quartz")</code> (the default on macOS) now warns
if <code>compression</code> is specified: it continues to be ignored.
</p>
</li></ul>
<h4>INSTALLATION on a UNIX-ALIKE</h4>
<ul>
<li><p> There is some support for building with Intel's LLVM-based
compilers on ‘<span class="samp">⁠x86_64⁠</span>’ Linux, such as (C) <code>icx</code>, (C++)
<code>ipcx</code> and (Fortran) <code>ifx</code> from oneAPI 2023.x.y.
</p>
</li>
<li><p> There is support for using LLVM's <code>flang-new</code> as the
Fortran compiler from LLVM 16.0.x (preferably 17.0.0
or later).
</p>
</li></ul>
<h4>UTILITIES</h4>
<ul>
<li> <p><code>R CMD check</code> reports the use of the Fortran 90 random
number generator <code>RANDOM_NUMBER()</code> and the subroutines to
initialize it.
</p>
<p>‘Writing R Extensions’ has example code to use <span class="rlang"><b>R</b></span>'s <abbr>RNG</abbr>s
from Fortran.
</p>
</li></ul>
<h4>BUG FIXES</h4>
<ul>
<li> <p><code>substr(x, n, L) <- cc</code> now works (more) correctly for
multibyte UTF-8 strings <code>x</code> when <code>L > nchar(x)</code>, thanks to
a report and patch by ‘Architect 95’.
</p>
</li>
<li> <p><code>contrib.url(character())</code> now returns 0-length
<code>character()</code> as documented, which also avoids spurious
warnings from <code>available.packages()</code> <abbr>et al.</abbr> in the
edge case of an empty vector of repository URLs.
</p>
</li>
<li> <p><code>readChar(., 4e8)</code> no longer fails, thanks to Kodi Arfer's
report (<a href="https://bugs.R-project.org/show_bug.cgi?id=18557">PR#18557</a>).
</p>
</li>
<li> <p><code>lapply(<list>, as.data.frame)</code> no longer warns falsely for
some base vector components.
</p>
</li>
<li><p> Communication between parent and child processes in the
<code>multicore</code> part of <code>parallel</code> could fail on platforms
that do not support an arbitrarily large payload in system
functions <code>read()</code>/<code>write()</code> on pipes (seen on macOS
where a restriction to <code>INT_MAX</code> bytes is documented, without
doing a partial read unlike Linux). The payload is now split into
1<abbr>Gb</abbr> chunks to avoid that problem. (<a href="https://bugs.R-project.org/show_bug.cgi?id=18571">PR#18571</a>)
</p>
</li>
<li> <p><code>qqplot(x,y, conf.level=.)</code> gives better confidence bounds
when <code>length(x) != length(y)</code>, thanks to Alexander Ploner's
report and patch proposal (<a href="https://bugs.R-project.org/show_bug.cgi?id=18557">PR#18557</a>).
</p>
</li>
<li> <p><code>norm(<0-length>, "2")</code> now gives zero instead of an
error, as all the other norm types, thanks to Mikael Jagan's <a href="https://bugs.R-project.org/show_bug.cgi?id=18542">PR#18542</a>.
</p>
</li>
<li><p> Build-stage Rd macros <code style="white-space: pre;">⁠\packageAuthor⁠</code> and
<code style="white-space: pre;">⁠\packageMaintainer⁠</code> now process ‘<span class="samp">⁠Authors@R⁠</span>’,
fixing ‘<span class="samp">⁠NA⁠</span>’ results when the package ‘<span class="file">DESCRIPTION</span>’ omits
‘<span class="samp">⁠Author⁠</span>’ and ‘<span class="samp">⁠Maintainer⁠</span>’ fields.
</p>
</li>
<li><p> Formatting and printing complex numbers could give things
like ‘<span class="samp">⁠0.1683-0i⁠</span>’ because of rounding error: ‘<span class="samp">⁠-0i⁠</span>’ is now
replaced by ‘<span class="samp">⁠+0i⁠</span>’.
</p>
</li>
<li> <p><code>postscript()</code> refused to accept a <code>title</code> comment
containing the letter “W” (<a href="https://bugs.R-project.org/show_bug.cgi?id=18599">PR#18599</a>).
</p>
</li>
<li> <p><code>isoreg(c(1,Inf))</code> signals an error instead of
segfaulting, fixing <a href="https://bugs.R-project.org/show_bug.cgi?id=18603">PR#18603</a>.
</p>
</li>
<li> <p><code>tiff(type = "Xlib")</code> was only outputting the last page
of multi-page plots.
</p>
</li>
<li> <p><code>tools::latexToUtf8()</code> again knows about ‘<span class="samp">⁠\~{n}⁠</span>’
and other letters with tilde, fixing a regression in <span class="rlang"><b>R</b></span> 4.3.0,
and about ‘<span class="samp">⁠\^{i}⁠</span>’ as an alternative to ‘<span class="samp">⁠\^{\i}⁠</span>’
(similarly with other accents).
Furthermore, LaTeX codes for accented I letters are now
correctly converted, also fixing related mistakes in
<code>tools::encoded_text_to_latex()</code>.
</p>
</li>
<li> <p><code>tar(*, tar = "internal")</code> no longer creates out-of-spec
tar files in the very rare case of user or group names longer than
32 bytes, fixing <a href="https://bugs.R-project.org/show_bug.cgi?id=17871">PR#17871</a> with thanks to Ivan Krylov.
</p>
</li>
<li><p> When using the “internal” timezone datetime code, adding
a fraction of a second no longer adds one second, fixing <a href="https://bugs.R-project.org/show_bug.cgi?id=16856">PR#16856</a>
from a patch by Ivan Krylov.
</p>
</li>
<li> <p><code>tools::checkRd()</code> no longer produces spurious notes
about “unnecessary braces” from multi-line Rd results of
<code style="white-space: pre;">⁠\Sexpr⁠</code> macros.
</p>
</li></ul>
<h3><img src="../help/figures/../../html/Rlogo.svg" class="toplogo" alt="[R logo]"> CHANGES IN R 4.3.1</h3>
<h4>C-LEVEL FACILITIES</h4>
<ul>
<li><p> The C-level API version of <span class="rlang"><b>R</b></span>'s <code>integrate()</code>,
<code>Rdqags()</code> in ‘<span class="file">Applic.h</span>’, now returns the correct number of
integrand evaluations <code>neval</code>, fixing <a href="https://bugs.R-project.org/show_bug.cgi?id=18515">PR#18515</a> reported and
diagnosed by Stephen Wade.
</p>
</li>
<li><p> The C prototypes for LAPACK calls <code>dspgv</code> and <code>dtptrs</code>
in ‘<span class="file">R_ext/Lapack.h</span>’ had one too many and one too few
character length arguments — but this has not caused any known
issues. To get the corrected prototypes, include
</p>
<pre>
#include <Rconfig.h> // for PR18534fixed
#ifdef PR18534fixed
# define usePR18534fix 1
#endif
#include <R_ext/Lapack.h>
</pre>
<p>in your C/C++ code (<a href="https://bugs.R-project.org/show_bug.cgi?id=18534">PR#18534</a>).
</p>
</li></ul>
<h4>INSTALLATION</h4>
<ul>
<li><p> Many of the checks of esoteric Internet operations and those
using unreliable external sites have been moved to a new target
that is not run by default and primarily intended for the core
developers. To run them use
</p>
<pre>
cd tests; make test-Internet-dev
</pre>
</li></ul>
<h4>BUG FIXES</h4>
<ul>
<li> <p><code>.S3methods()</code>, typically called from <code>methods()</code>,
again marks methods from package <span class="pkg">base</span> as <code>visible</code>.
</p>
<p>Also, the visibility of non-<span class="pkg">base</span> methods is again determined by
the method's presence in <code>search()</code>.
</p>
</li>
<li> <p><code>tools::Rdiff()</code> is now more robust against invalid
strings, fixing installation tests on Windows without Rtools
installed (<a href="https://bugs.R-project.org/show_bug.cgi?id=18530">PR#18530</a>).
</p>
</li>
<li><p> Fix (new) bug in <code>hcl.colors(2, *)</code>, by Achim Zeileis (<a href="https://bugs.R-project.org/show_bug.cgi?id=18523">PR#18523</a>).
</p>
</li>
<li> <p><code>head(., <illegal>)</code> and <code>tail(..)</code> now produce
more useful <code>"Error in ...."</code> error messages, fixing <a href="https://bugs.R-project.org/show_bug.cgi?id=18362">PR#18362</a>.
</p>
</li>
<li><p> Package code syntax on Windows is checked in UTF-8 when UTF-8 is
the native encoding.
</p>
</li>
<li> <p><code>na.contiguous(x)</code> now also returns the first run, when it
is at the beginning and there is a later one of the same length;
reported to R-devel, including a fix, by Georgi Boshnakov.
Further, by default, it modifies only an existing
<code>attr(*,"tsp")</code> but otherwise no longer sets one.
</p>
</li>
<li> <p><code>chol(<not pos.def>, pivot = <T|F>)</code> now gives a correct
error or warning message (depending on <code>pivot</code>), thanks to
Mikael Jagan's (<a href="https://bugs.R-project.org/show_bug.cgi?id=18541">PR#18541</a>).
</p>
</li></ul>
<h3><img src="../help/figures/../../html/Rlogo.svg" class="toplogo" alt="[R logo]"> CHANGES IN R 4.3.0</h3>
<h4>SIGNIFICANT USER-VISIBLE CHANGES</h4>
<ul>
<li><p> Calling <code>&&</code> or <code>||</code> with LHS or (if evaluated) RHS of
length greater than one is now always an error, with a report of
the form
</p>
<pre> 'length = 4' in coercion to 'logical(1)'</pre>
<p>Environment variable <span class="env">_R_CHECK_LENGTH_1_LOGIC2_</span> no longer has
any effect.
</p>
</li></ul>
<h4>NEW FEATURES</h4>
<ul>
<li><p> The included BLAS sources have been updated to those shipped
with LAPACK version 3.10.1. (This caused some platform-dependent
changes to package check output.) And then to the sources from
LAPACK version 3.11.0 (with changes only to double complex
subroutines).
</p>
</li>
<li><p> The included LAPACK sources have been updated to include the
four Fortran 90 routines rather than their Fortran 77
predecessors. This may give some different signs in <abbr>SVD</abbr>s or
eigendecompositions.. (This completes the transition to LAPACK
3.10.x begun in <span class="rlang"><b>R</b></span> 4.2.0.)
</p>
</li>
<li><p> The LAPACK sources have been updated to version 3.11.0. (No
new subroutines have been added, so this almost entirely bug
fixes: Those fixes do affect some computations with <code>NaN</code>s,
including <span class="rlang"><b>R</b></span>'s <code>NA</code>.)
</p>
</li>
<li><p> The parser now signals <em>classed</em> errors, notably in
case of the pipe operator <code>|></code>. The error object and
message now give line and column numbers, mostly as proposed and
provided by Duncan Murdoch in <a href="https://bugs.R-project.org/show_bug.cgi?id=18328">PR#18328</a>.
</p>
</li>
<li> <p><code>toeplitz()</code> is now generalized for asymmetric cases,
with a <code>toeplitz2()</code> variant.
</p>
</li>
<li> <p><code>xy.coords()</code> and <code>xyz.coords()</code> and consequently,
e.g., <code>plot(x,y, log = "y")</code> now signal a <em>classed</em> warning
about negative values of y (where <code>log(.)</code> is <code>NA</code>).
Such a warning can be specifically suppressed or caught otherwise.
</p>
</li>
<li><p> Regular expression functions now check more thoroughly whether
their inputs are valid strings (in their encoding, e.g. in UTF-8).
</p>
</li>
<li><p> The performance of <code>grep()</code>, <code>sub()</code>,
<code>gsub()</code> and <code>strsplit()</code> has been improved,
particularly with <code>perl = TRUE</code> and <code>fixed = TRUE</code>. Use
of <code>useBytes = TRUE</code> for performance reasons should no longer
be needed and is discouraged: it may lead to incorrect results.
</p>
</li>
<li> <p><code>apropos()</code> gains an argument <code>dot_internals</code> which
is used by the completion (<code>help(rcompgen)</code>) engine to also
see <span class="pkg">base</span> internals such as <code>.POSIXct()</code>.
</p>
</li>
<li><p> Support in <code>tools::Rdiff()</code> for comparing uncompressed
PDF files is further reduced – see its help page.
</p>
</li>
<li> <p><code>qqplot(x, y, ...)</code> gains <code>conf.level</code> and
<code>conf.args</code> arguments for computing and plotting a confidence
band for the treatment function transforming the distribution of
<code>x</code> into the distribution of <code>y </code> (Switzer, 1976,
<em>Biometrika</em>). Contributed by Torsten Hothorn.
</p>
</li>
<li><p> Performance of <code>package_dependencies()</code> has been improved
for cases when the number of dependencies is large.
</p>
</li>
<li><p> Strings newly created by <code>gsub()</code>, <code>sub()</code> and
<code>strsplit()</code>, when any of the inputs is marked as <code>"bytes"</code>,
are also marked as <code>"bytes"</code>. This reduces the risk of creating
invalid strings and accidental substitution of bytes deemed invalid.
</p>
</li>
<li><p> Support for <code>readLines(encoding = "bytes")</code> has been added to
allow processing special text files byte-by-byte, without creating
invalid strings.
</p>
</li>
<li> <p><code>iconv(from = "")</code> now takes into account any declared
encoding of the input elements and uses it in preference to the native
encoding. This reduces the risk of accidental creation of invalid
strings, particularly when different elements of the input have
different encoding (including <code>"bytes"</code>).
</p>
</li>
<li><p> Package repositories in <code>getOption("repos")</code> are now
initialized from the ‘<span class="file">repositories</span>’ file when <span class="pkg">utils</span> is
loaded (if not already set, e.g., in ‘<span class="file">.Rprofile</span>’).
(From a report and patch proposal by Gabriel Becker in <a href="https://bugs.R-project.org/show_bug.cgi?id=18405">PR#18405</a>.)
</p>
</li>
<li> <p><code>compactPDF()</code> gets a <code>verbose</code> option.
</p>
</li>
<li> <p><code>type.convert()</code> and hence <code>read.table()</code> get new
option <code>tryLogical = TRUE</code> with back compatible default. When
set to false, converts <code>"F"</code> or <code>"T"</code> columns to character.
</p>
</li>
<li><p> Added new unit prefixes <code>"R"</code> and <code>"Q"</code> for
abbreviating (unrealistically large) sizes beyond <code class="reqn">10^{27}</code> in
<code>standard = "SI"</code>, thanks to Henrik Bengtsson's <a href="https://bugs.R-project.org/show_bug.cgi?id=18435">PR#18435</a>.
</p>
</li>
<li> <p><code>as.data.frame()</code>'s default method now also works fine
with atomic objects inheriting from classes such as <code>"roman"</code>,
<code>"octmode"</code> and <code>"hexmode"</code>, thus fulfilling the wish of
<a href="https://bugs.R-project.org/show_bug.cgi?id=18421">PR#18421</a>, by Benjamin Feakins.
</p>
</li>
<li><p> The <code>as.data.frame.vector()</code> utility now errors for
wrong-length <code>row.names</code>. It warned for almost six years, with
“Will be an error!”.
</p>
</li>
<li> <p><code>sessionInfo()</code> now also contains <code>La_version()</code> and
reports codepage and timezone when relevant, in both <code>print()</code>
and <code>toLatex()</code> methods which also get new option <code>tzone</code>
for displaying timezone information when <code>locale = FALSE</code>.
</p>
</li>
<li><p> New function <code>R_compiled_by()</code> reports the C and
Fortran compilers used to build <span class="rlang"><b>R</b></span>, if known.
</p>
</li>
<li> <p><code>predict(<lm>, newdata = *)</code> no longer unnecessarily creates
an <code>offset</code> of all <code>0</code>s.
</p>
</li>
<li> <p><code>solve()</code> for complex inputs now uses argument <code>tol</code>
and by default checks for ‘computational singularity’ (as
it long has done for numeric inputs).
</p>
</li>
<li> <p><code>predict(<rank-deficient lm>, newdata=*)</code> now obeys a new
argument <code>rankdeficient</code>, with new default <code>"warnif"</code>,
warning only if there are non-estimable cases in <code>newdata</code>.
Other options include <code>rankdeficient = "NA"</code>, predicting <code>NA</code>
for non-estimable <code>newdata</code> cases.
This addresses <a href="https://bugs.R-project.org/show_bug.cgi?id=15072">PR#15072</a> by Russ Lenth and is based on his original
proposal and discussions in <a href="https://bugs.R-project.org/show_bug.cgi?id=16158">PR#16158</a> also by David Firth and Elin Waring.
Still somewhat experimental.
</p>
</li>
<li> <p><code>Rgui</code> console implementation now works better with the
<code>NVDA</code> screen reader when the full blinking cursor is selected.
The underlying improvements in cursor handling may help also other
screen readers on Windows.
</p>
</li>
<li><p> The drop-field control in GraphApp can now be left with the TAB
key and all controls can be navigated in the reverse order using the
Shift+TAB key, improving accessibility of the <code>Rgui</code>
configuration editor.
</p>
</li>
<li> <p><code>qnorm(<very large negative>, log.p=TRUE)</code> is now fully
accurate (instead of to “only” minimally five digits).
</p>
</li>
<li> <p><code>demo(error.catching)</code> now also shows off
<code>withWarnings()</code> and <code>tryCatchWEMs()</code>.
</p>
</li>
<li><p> As an experimental feature the placeholder <code>_</code> can now
also be used in the <code>rhs</code> of a forward pipe <code>|></code>
expression as the first argument in an extraction call, such as
<code>_$coef</code>. More generally, it can be used as the head of a
chain of extractions, such as <code>_$coef[[2]]</code>.
</p>
</li>
<li><p> Spaces in the environment variable used to choose the <span class="rlang"><b>R</b></span>
session's temporary directory (<span class="env">TMPDIR</span>, <span class="env">TMP</span> and
<span class="env">TEMP</span> are tried in turn) are now fatal. (On Windows the
‘short path’ version of the path is tried and used if that
does not contain a space.)
</p>
</li>
<li> <p><code>all.equal.numeric()</code> gets a new optional switch
<code>giveErr</code> to return the numeric error as attribute. Relatedly,
<code>stopifnot(all.equal<some>(a, b, ..))</code> is as “smart” now,
as <code>stopifnot(all.equal(....))</code> has been already, thus allowing
customized <code>all.equal<Some>()</code> wrappers.
</p>
</li>
<li> <p><span class="rlang"><b>R</b></span> on Windows is now able to work with path names longer than
260 characters when these are enabled in the system (requires at least
Windows 10 version 1607). Packages should be updated to work with
long paths as well, instead of assuming <code>PATH_MAX</code> to be the
maximum length. Custom front-ends and applications embedding <span class="rlang"><b>R</b></span> need
to update their manifests if they wish to allow this feature. See
<a href="https://blog.r-project.org/2023/03/07/path-length-limit-on-windows">https://blog.r-project.org/2023/03/07/path-length-limit-on-windows</a>
for more information.
</p>
</li>
<li> <p>‘Object not found’ and ‘Missing argument’
errors now give a more accurate error context. Patch provided by
Lionel Henry in <a href="https://bugs.R-project.org/show_bug.cgi?id=18241">PR#18241</a>.
</p>
</li>
<li><p> The <code>@</code> operator is now an S3 generic. Based on
contributions by Tomasz Kalinowski in <a href="https://bugs.R-project.org/show_bug.cgi?id=18482">PR#18482</a>.
</p>
</li>
<li><p> New generic <code>chooseOpsMethod()</code> provides a mechanism
for objects to resolve cases where two suitable methods are found
for an Ops Group Generic. This supports experimenting with
alternative object systems.
Based on contributions by Tomasz Kalinowski in <a href="https://bugs.R-project.org/show_bug.cgi?id=18484">PR#18484</a>.
</p>
</li>
<li> <p><code>inherits(x, what)</code> now accepts values other than a
simple character vector for argument <code>what</code>. A new generic,
<code>nameOfClass()</code>, is called to resolve the class name from
<code>what</code>. This supports experimenting with alternative object
systems.
Based on contributions by Tomasz Kalinowski in <a href="https://bugs.R-project.org/show_bug.cgi?id=18485">PR#18485</a>.
</p>
</li>
<li><p> Detection of BLAS/LAPACK in use (<code>sessionInfo()</code>) with
FlexiBLAS now reports the current backend.
</p>
</li>
<li><p> The <code>"data.frame"</code> method for <code>subset()</code> now warns
about extraneous arguments, typically catching the use of ‘<span class="samp">⁠=⁠</span>’
instead of ‘<span class="samp">⁠==⁠</span>’ in the <code>subset</code> expression.
</p>
</li>
<li><p> Calling <code>a:b</code> when numeric <code>a</code> or <code>b</code> is longer
than one may now be made into an error by setting environment variable
<span class="env">_R_CHECK_LENGTH_COLON_</span> to a true value, along the proposal in
<a href="https://bugs.R-project.org/show_bug.cgi?id=18419">PR#18419</a> by Henrik Bengtsson.
</p>
</li>
<li> <p><code>density(x, weights = *)</code> now warns if automatic bandwidth
selection happens without using <code>weights</code>; new optional
<code>warnWbw</code> may suppress the warning. Prompted by Christoph
Dalitz' <a href="https://bugs.R-project.org/show_bug.cgi?id=18490">PR#18490</a> and its discussants.
</p>
</li>
<li> <p><code>rm(list = *)</code> is faster and more readable thanks to
Kevin Ushey's <a href="https://bugs.R-project.org/show_bug.cgi?id=18492">PR#18492</a>.
</p>
</li>
<li><p> The <code>plot.lm()</code> function no longer produces a normal
Q-Q plot for GLMs. Instead it plots a half-normal Q-Q plot of the
absolute value of the standardized deviance residuals.
</p>
</li>
<li><p> The <code>print()</code> method for class <code>"summary.glm"</code> no
longer shows summary statistics for the deviance residuals by
default. Its optional argument <code>show.residuals</code> can be used
to show them if required.
</p>
</li>
<li><p> The <code>tapply()</code> function now accepts a data frame as its
<code>X</code> argument, and allows <code>INDEX</code> to be a formula in that
case. <code>by.data.frame()</code> similarly allows <code>INDICES</code> to be
a formula.
</p>
</li>
<li><p> The performance of <code>df[j] <- value</code> (including for
missing <code>j</code>) and <code>write.table(df)</code> has been improved for
data frames <code>df</code> with a large number of columns. (Thanks to
Gabriel Becker's <a href="https://bugs.R-project.org/show_bug.cgi?id=18500">PR#18500</a>, <a href="https://bugs.R-project.org/show_bug.cgi?id=18503">PR#18503</a> and discussants, prompted
by a report from Toby Dylan Hocking on the R-devel mailing list.)
</p>
</li>
<li><p> The matrix multiply operator <code>%*%</code> is now an S3 generic,
belonging to new group generic <code>matrixOps</code>.
From Tomasz Kalinowski's contribution in <a href="https://bugs.R-project.org/show_bug.cgi?id=18483">PR#18483</a>.
</p>
</li>
<li><p> New function <code>array2DF()</code> to convert arrays to data
frames, particularly useful for the list arrays created by
<code>tapply()</code>.
</p>
</li></ul>
<h4>DATES and TIMES</h4>
<ul>
<li><p> On platforms where (non-UTC) datetimes before 1902 (or
before 1900 as with system functions on recent macOS) are guessed
by extrapolating time zones from 1902-2037, there is a warning at
the first use of extrapolation in a session. (As all time zones
post 2037 are extrapolation, we do not warn on those.)
</p>
</li>
<li><p> (Platforms using <span class="option">--with-internal-tzone</span>, including
Windows and by default macOS). How years are printed in dates or
date-times can be controlled by environment variable
<span class="env">R_PAD_YEARS_BY_ZERO</span>. The default remains to pad to 4 digits
by zeroes, but setting value ‘<span class="samp">⁠no⁠</span>’ gives no padding (as used
by default by <code>glibc</code>).
</p>
</li>
<li> <p><code>strftime()</code> tries harder to determine the offset for
the <code>"%z"</code> format, and succeeds on the mainstream <span class="rlang"><b>R</b></span> platforms.
</p>
</li>
<li> <p><code>strftime()</code> has a limit of 2048 bytes on the string
produced – attempting to exceed this is an error. (Previously it
silently truncated at 255 bytes.)
</p>
</li>
<li> <p><code>sessionInfo()</code> records (and by default prints) the
system time zone as part of the locale information. Also, the
source (system/internal) of the date-time conversion and printing
functions.
</p>
</li>
<li><p> Objects of class <code>"POSIXlt"</code> created in this version of
<span class="rlang"><b>R</b></span> always have 11 components: component <code>zone</code> is always set,
and component <code>gmtoff</code> is set for times in UTC and usually
set on the (almost all) platforms which have C-level support,
otherwise is <code>NA</code>.
</p>
</li>
<li><p> There are comprehensive validity checks on the structure of
objects of class <code>"POSIXlt"</code> when converting (including
formatting and printing). (This avoids mis-conversions of
hand-crafted objects.)
</p>
</li>
<li><p> There is some support for using the native date-time
routines on macOS: this is only viable on recent versions
(e.g. 12.6 and 13) and does get wrong some historical changes
(before 1900, during WWII). Use of <span class="option">--with-internal-tzone</span>
remains the default.
</p>
</li>
<li> <p><code>as.POSIXct(<numeric>)</code> and <code>as.POSIXlt(.)</code> (without
specifying <code>origin</code>) now work.
So does <code>as.Date(<numeric>)</code>.
</p>
</li>
<li> <p><code>as.Date.POSIXct(., tz)</code> now treats several <code>tz</code>
values, notably <code>"GMT"</code> as equivalent to <code>"UTC"</code>, proposed
and improved by Michael Chirico and Joshua Ulrich in <a href="https://bugs.R-project.org/show_bug.cgi?id=17674">PR#17674</a>.
</p>
</li>
<li><p> Experimental <code>balancePOSIXlt()</code> utility allows using
“ragged” and or out-of-range <code>"POSIXlt"</code> objects more
correctly, e.g., in subsetting and subassignments. Such objects
are now documented.
Complemented by the low-level <code>unCfillPOSIXlt()</code> utility.
</p>
<p>More experimentally, a <code>"POSIXlt"</code> object may have an attribute
<code>"balanced"</code> indicating if it is known to be filled or fully
balanced.
</p>
</li>
<li><p> Functions <code>axis.Date()</code> and <code>axis.POSIXct()</code> are
rewritten to gain better default tick locations and better default
formats via the corresponding <code>pretty()</code> methods.
Thanks to Swetlana Herbrandt.
</p>
</li>
<li><p> The mapping of Windows' names for time zones to <abbr>IANA</abbr>'s
‘Olson’ names has been updated. When ICU is available (it is
by default), it is used to get a mapping for the current region set in
Windows. This can be overridden by setting environment variable
<span class="env">TZ</span> to the desired Olson name — see <code>OlsonNames()</code> for
those currently available.
</p>
</li></ul>
<h4>GRAPHICS</h4>
<ul>
<li><p> The graphics engine version, <code>R_GE_version</code>, has been
bumped to <code>16</code> and so packages that provide graphics devices
should be reinstalled.
</p>
</li>
<li><p> The <span class="pkg">grDevices</span> and <span class="pkg">grid</span> packages have new
functions for rendering typeset glyphs, primarily:
<code>grDevices::glyphInfo()</code> and <code>grid::grid.glyph()</code>.
</p>
<p>Rendering of typeset glyphs is only supported so far on the
Cairo-based graphics devices and on the <code>pdf()</code> and
<code>quartz()</code> devices.
</p>
</li>
<li><p> The defined behaviour for <code>"clear"</code> and <code>"source"</code>
compositing operators (via <code>grid::grid.group()</code>) has been
changed (to align better with
simple interpretation of original Porter-Duff definitions).
</p>
</li>
<li><p> Support for gradients, patterns, clipping paths, masks,
groups, compositing operators, and affine transformations has
been added to the <code>quartz()</code> device.
</p>
</li></ul>
<h4>INSTALLATION on a UNIX-ALIKE</h4>
<ul>
<li><p> A system installation of generic LAPACK 3.10.0 or later will
be preferred to the version in the <span class="rlang"><b>R</b></span> sources.
</p>
<p><code>configure</code> option <span class="option">--with-lapack=no</span> (equivalently
<span class="option">--without-lapack</span>) forces compilation of the internal
LAPACK sources.
</p>
<p>If <span class="option">--with-lapack</span> is not specified, a system
<code>liblapack</code> is looked for and used if it reports version
3.10.0 or later and does not contain BLAS routines.
</p>
<p>Packages using LAPACK will need to be reinstalled if this changes
to using an external library.
</p>
</li>
<li><p> On ‘<span class="samp">⁠aarch64⁠</span>’ Linux platforms using GCC,
<code>configure</code> now defaults to <span class="option">-fPIC</span> (instead of
<span class="option">-fpic</span>), as desired in <a href="https://bugs.R-project.org/show_bug.cgi?id=18326">PR#18326</a>.
</p>
</li>
<li> <p><code>configure</code> now checks conversion of datetimes
between <code>POSIXlt</code> and <code>POSIXct</code> around year 2020. Failure
(which has been seen on platforms missing <code>tzdata</code>) is fatal.
</p>
</li>
<li><p> If <code>configure</code> option
<span class="option">--with-valgrind-instrumentation</span> is given value <code>1</code>
or <code>2</code>, option <span class="option">--with-system-valgrind-headers</span> is now
the default and ignored (with a warning). It is highly
recommended that the system headers are installed alongside
<code>valgrind</code>: they are part of its packaging on some Linux
distributions and packaged separately (e.g. in the
‘<span class="file">valgrind-devel</span>’ RPM) on others. <code>configure</code> will
give a warning if they are not found.
</p>
<p>The system headers will be required in a future release of <span class="rlang"><b>R</b></span>
to build with <code>valgrind</code> instrumentation.
</p>
</li>
<li> <p><code>libcurl</code> 8.x is now accepted by <code>configure</code>:
despite a change in major version number it changes neither API
nor <abbr>ABI</abbr>.
</p>
</li></ul>
<h4>INSTALLATION on WINDOWS</h4>
<ul>
<li><p> The makefiles and installer scripts for Windows have been
tailored to Rtools43, an update of the Rtools42
toolchain. It is based on GCC 12 and newer versions of
MinGW-W64, binutils and libraries. At this time R-devel can still
be built using Rtools42 without changes, but when R-devel is
installed via the installer, it will by default look for Rtools43.
</p>
</li>
<li><p> Old make targets <code>rsync-extsoft</code> and 32-bit ones that
are no longer needed have been removed.
</p>
</li>
<li><p> Default builds (including for packages) no longer select
C99. Thus the C standard used is the default for the compiler,
which for the toolchain in ‘<span class="file">Rtools43</span>’ is C17. (This is
consistent with Unix builds.)
</p>
</li></ul>
<h4>PACKAGE INSTALLATION</h4>
<ul>
<li><p> The default C++ standard has been changed to C++17 where
available (which it is on all currently checked platforms): if not
C++14 or C++11 is used if available otherwise C++ is not supported.
</p>
</li>
<li> <p><code>USE_FC_LEN_T</code> is the default: this uses the
correct (compiler-dependent) prototypes for Fortran BLAS/LAPACK
routines called from C/C++, and requires adjustment of many such
calls – see ‘Writing R Extensions’ §6.6.1.
</p>
</li>
<li><p> There is initial support for C++23 as several compilers are
now supporting <code>-std=c++23</code> or <code>-std=c++2b</code> or similar.
As for C++20, there no additional <code>configure</code> checks for
C++23 features beyond a check that the compiler reports a
<code>__cplusplus</code> value greater than that in the C++20 standard.
C++ feature tests should be used.
</p>
</li>
<li><p> There is support for a package to indicate the version of
the C standard which should be used to compile it, and for the
installing user to specify this. In most cases <span class="rlang"><b>R</b></span> defaults to the
C compiler's default standard which is C17 (a ‘bug-fix’ of C11) –
earlier versions of <span class="rlang"><b>R</b></span> or compilers may have defaulted to C99.
</p>
<p>Current options are:
</p>
<dl>
<dt>USE_C17</dt><dd><p>Use a standard that is at most C17. The
intention is to allow legacy packages to still be installed when
later C standards become the default, including packages
using new keywords as identifiers or with K&R-style function
declarations. This will use C17 if available, falling back
to C11.
</p>
</dd>
<dt>USE_C90</dt><dd><p>Use the C90 (aka C89) standard. (As that standard
did not require compilers to identify that version, all we can
verify is that the compiler does not claim to be using a later
standard. It may accept C99 features – for example
<code>clang</code> accepts // to make comments.)</p>
</dd>
<dt>USE_C99</dt><dd><p>Use the C99 standard. This should be rarely
needed – it avoids the few new features of C11/C17 which can
be useful if a package assumes them if C17 is specified and
they are not implemented.</p>
</dd>
<dt>USE_C23</dt><dd><p>Use C23 (or in future, later). Compiler/library
support for C23 is still being implemented, but LLVM clang
from 15.0.0 and GCC from 13 have quite extensive support.
</p>
</dd>
</dl>
<p>These can be specified as part of the ‘<span class="samp">⁠SystemRequirements⁠</span>’
field in the package's ‘<span class="file">DESCRIPTION</span>’ file or <em>via</em>
options <span class="option">--use-C17</span> and so on of <code>R CMD INSTALL</code>
and <code>R CMD SHLIB</code>.
</p>
<p>For further details see “Writing R Extensions” §1.2.5.
</p>
</li>
<li><p> (Windows) A ‘<span class="file">src/Makefile.ucrt</span>’ or
‘<span class="file">src/Makefile.win</span>’ file is now included after
‘<span class="file"><var>R_HOME</var>/etc<var>R_ARCH</var>/Makeconf</span>’ and so no longer
needs to include that file itself. Installation of a package with
such a file now uses a site ‘<span class="file">Makevars</span>’ file in the same way
as a package with a ‘<span class="file">src/Makevars.win</span>’ file would.
</p>
</li>
<li> <p><code>configure</code> is now passed crucial variables such as
<span class="env">CC</span> and <span class="env">CFLAGS</span> in its environment, as many packages
were not setting them (as documented in ‘Writing R
Extensions’ §1.2).
</p>
<p>This has most effect where <code>configure</code> is used to compile
parts of the package – most often by <code>cmake</code> or
<code>libtool</code> which obfuscate the actual compile commands
used.
</p>
<p>Also used for <code>configure.win</code> and <code>configure.ucrt</code>
on Windows.
</p>
</li></ul>
<h4>FORTRAN FLAGS</h4>
<ul>
<li><p> The flag <span class="option">-fno-optimize-sibling-calls</span> is no longer
forced for <code>gfortran</code> 7 and later. It should no longer be
needed now using ‘hidden’ character-length arguments when
calling BLAS/LAPACK routines from C/C++ is the default even for
packages. (Unless perhaps packages call Fortran code from C/C++
without using <span class="rlang"><b>R</b></span>'s headers and without allowing for these
arguments.)
</p>
</li></ul>
<h4>C-LEVEL FACILITIES</h4>
<ul>
<li><p> The deprecated S-compatibility macros <code>DOUBLE_*</code> in
‘<span class="file">R_ext/Constants.h</span>’ (included by ‘<span class="file">R.h</span>’) have been
removed.
</p>
</li>
<li><p> The deprecated legacy typedefs of <code>Sint</code> and
<code>Sfloat</code> in header ‘<span class="file">R.h</span>’ are no longer defined, and that
header no longer includes header ‘<span class="file">limits.h</span>’ from C nor
‘<span class="file">climits</span>’ from C++.
</p>
</li>
<li><p> New macro <code>CAD5R()</code> is provided in ‘<span class="file">Rinternals.h</span>’
and used in a few places in the <span class="rlang"><b>R</b></span> sources.
</p>
</li>
<li> <p>ALTREP now supports <code>VECSXP</code> vectors. Contributed by
Gabor Csardi in <a href="https://bugs.R-project.org/show_bug.cgi?id=17620">PR#17620</a>.
</p>
</li>
<li><p> The <code>Rcomplex</code> definition (in header
‘<span class="file">R_ext/Complex.h</span>’) has been extended to prevent possible
mis-compilation when interfacing with Fortran (<a href="https://bugs.R-project.org/show_bug.cgi?id=18430">PR#18430</a>). The
new definition causes compiler warnings with static initializers
such as <code>{1, 2}</code>, which can be changed to <code>{.r=1,
.i=2}</code>.
</p>
<p>Using the new definition from C++ depends on compiler extensions
supporting C features that have not been incorporated into the C++
standards but are available in <code>g++</code> and
<code>clang++</code>: this may result in C++ compiler warnings but
these have been worked around for recent versions of common
compilers (GCC, Apple/LLVM clang, Intel).
</p>
<p>It is intended to change the inclusion of header
‘<span class="file">R_ext/Complex.h</span>’ by other <span class="rlang"><b>R</b></span> headers, so C/C++ code files
which make use of <code>Rcomplex</code> should include that header
explicitly.
</p>
</li></ul>
<h4>UTILITIES</h4>
<ul>
<li> <p><code>R CMD check</code> does more checking of package ‘<span class="file">.Rd</span>’
files, warning about invalid email addresses and (some) invalid
<abbr>URI</abbr>s and noting empty ‘<span class="samp">⁠\item⁠</span>’ labels in description lists.
</p>
</li>
<li> <p><code>R CMD check</code> now also reports problems when reading
package news in <abbr>md</abbr> (file ‘<span class="file">NEWS.md</span>’) and (optionally) plain
text (file ‘<span class="file">NEWS</span>’) formats.
</p>
</li>
<li> <p><span class="env">_R_CHECK_TIMINGS_</span> defaults to a value from the
environment even for <code>R CMD check --as-cran</code>; this allows
for exceptionally fast or slow platforms.
</p>
<p>It now applies to checking PDF and HTML versions of the manuals,
and ‘checking CRAN incoming feasibility’.
</p>
</li>
<li> <p><code>R CMD check</code> can optionally (but included in
<span class="option">--as-cran</span>) check whether HTML math rendering <em>via</em>
KaTeX works for the package ‘<span class="file">.Rd</span>’ files.
</p>
</li>
<li><p> Non-interactive debugger invocations can be trapped by
setting the environment variable
<span class="env">_R_CHECK_BROWSER_NONINTERACTIVE_</span> to a true value. This is
enabled by <code>R CMD check --as-cran</code> to detect the use of
leftover <code>browser()</code> statements in the package.
</p>
</li>
<li><p> The use of <code>sprintf</code> and <code>vsprintf</code> from C/C++ has
been deprecated in macOS 13 and is a known security risk.
<code>R CMD check</code> now reports (on all platforms) if their use
is found in compiled code: replace by <code>snprintf</code> or
<code>vsnprintf</code> respectively. [<b>NB:</b> whether such calls get
compiled into the package is platform-dependent.]
</p>
</li>
<li><p> Where recorded at installation, <code>R CMD check</code>
reports the C and Fortran compilers used to build <span class="rlang"><b>R</b></span>.
</p>
<p>It reports the OS in use (if known, as given by
<code>osVersion</code>) as well as that <span class="rlang"><b>R</b></span> was built for.
</p>
<p>It notes if a C++ standard was specified which is older than the
current default: many packages have used C++11 to mean ‘not
C++98’ — as C++11 is the minimum supported since <span class="rlang"><b>R</b></span> 4.0.0, that
specification can probably be removed.
</p>
</li>
<li> <p><code>R CMD INSTALL</code> reports the compilers (and on
macOS, the <abbr>SDK</abbr>) used, and this is copied to the output of
<code>R CMD check</code>.
</p>
<p>Where a C++ standard is specified, it is reported.
</p>
</li>
<li> <p><code>R CMD check</code>'s
‘checking compilation flags in Makevars’
has been relaxed to accept the use of flags such as
<span class="option">-std=f2008</span> in ‘<span class="samp">⁠PKG_FFLAGS⁠</span>’.
</p>
</li>
<li> <p><code>tools::buildVignettes()</code> has a new argument <code>skip</code>,
which is used by <code>R CMD check</code> to skip (and note)
vignettes with unavailable ‘<span class="samp">⁠\VignetteDepends⁠</span>’ (<a href="https://bugs.R-project.org/show_bug.cgi?id=18318">PR#18318</a>).
</p>
</li>
<li><p> New generic <code>.AtNames()</code> added to enable class-specific
completions after <code>@</code>. The formerly internal function
<code>findMatches()</code> is now exported, mainly for use in methods
for <code>.DollarNames()</code> and <code>.AtNames()</code>.
</p>
</li></ul>
<h4>DEPRECATED AND DEFUNCT</h4>
<ul>
<li> <p><code>default.stringsAsFactors()</code> is defunct.
</p>
</li>
<li><p> Calling <code>as.data.frame.<class>()</code> directly (for 12 atomic
classes) is going to be formally deprecated, currently activated by
setting the environment variable
<span class="env">_R_CHECK_AS_DATA_FRAME_EXPLICIT_METHOD_</span> to non-empty, which
also happens in <code>R CMD check --as-cran</code>.
</p>
</li></ul>
<h4>BUG FIXES</h4>
<ul>
<li><p> Hashed <code>environment</code>s with sizes less than 5 can now grow.
(Reported to R-devel by Duncan Garmonsway.)
</p>
</li>
<li> <p><code>as.character(<Rd>, deparse = TRUE)</code> failed to
re-escape curly braces in LaTeX-like text.
(Reported by Hadley Wickham in <a href="https://bugs.R-project.org/show_bug.cgi?id=18324">PR#18324</a>.)
</p>
</li>
<li> <p><code>library()</code> now passes its <code>lib.loc</code> argument when
requiring <code>Depends</code> packages; reported (with fix) in <a href="https://bugs.R-project.org/show_bug.cgi?id=18331">PR#18331</a>
by Mikael Jagan.
</p>
</li>
<li> <p><code>R CMD Stangle</code>: improved message about ‘Output’
files.
</p>
</li>
<li> <p><code>head(x, n)</code> and <code>tail(x, n)</code> now signal an error if
<code>n</code> is not numeric, instead of incidentally “working”
sometimes returning all of <code>x</code>. Reported and discussed by Colin
Fay, in <a href="https://bugs.R-project.org/show_bug.cgi?id=18357">PR#18357</a>.
</p>
</li>
<li><p> The <code>"lm"</code> method for <code>summary()</code> now gives the
correct F-statistic when the model contains an offset. Reported in
<a href="https://bugs.R-project.org/show_bug.cgi?id=18008">PR#18008</a>.
</p>
</li>
<li> <p><code>C()</code> and <code>`contrasts<-`()</code> now preserve factor
level names when given a function object (as opposed a function
name which did preserve names). Reported in <a href="https://bugs.R-project.org/show_bug.cgi?id=17616">PR#17616</a>.
</p>
</li>
<li> <p><code>c(a = 1, 2)[[]]</code> no longer matches <code>2</code> but rather
signals a <em>classed</em> error. Reported and analysed by Davis Vaughan in
<a href="https://bugs.R-project.org/show_bug.cgi?id=18367">PR#18367</a>, a duplicate of <a href="https://bugs.R-project.org/show_bug.cgi?id=18004">PR#18004</a>, by Jan Meis <abbr>et al.</abbr>
For consistency, <code>NULL[[]]</code> is also erroneous now.
<code>x[[]] <- v</code> gives an error of the same class <code>"MissingSubscriptError"</code>.
</p>
</li>
<li><p> The <code>relist()</code> function of <span class="pkg">utils</span> now supports
<code>NULL</code> elements in the skeleton (<a href="https://bugs.R-project.org/show_bug.cgi?id=15854">PR#15854</a>).
</p>
</li>
<li> <p><code>ordered(levels = *)</code> (missing <code>x</code>) now works
analogously to <code>factor(, ordered=TRUE)</code>; reported (with fix)
by Achim Zeileis in <a href="https://bugs.R-project.org/show_bug.cgi?id=18389">PR#18389</a>.
</p>
</li>
<li><p> User-defined Rd macro definitions can now span multiple lines,
thanks to a patch from Duncan Murdoch. Previously, the Rd parser
silently ignored everything after the first line.
</p>
</li>
<li><p> Plain-text help (<code>tools::Rd2txt()</code>) now preserves an
initial blank line for text following description list items.
</p>
</li>
<li> <p><code>tools::Rd2HTML()</code> and <code>tools::Rd2latex()</code> no
longer split <code style="white-space: pre;">⁠\arguments⁠</code> and <code style="white-space: pre;">⁠\value⁠</code> lists at Rd comments.
</p>
</li>
<li> <p><code>tools::Rd2latex()</code> now correctly handles optional text
outside <code style="white-space: pre;">⁠\item⁠</code>s of argument lists as well as bracketed text
at the beginning of sections, e.g., <code style="white-space: pre;">⁠\value{[NULL]}⁠</code>.
</p>
</li>
<li> <p><code>as.character(<POSIXt>)</code> now behaves more in line with the
methods for atomic vectors such as numbers, and is no longer
influenced by <code>options()</code>.
Ditto for <code>as.character(<Date>)</code>.
The <code>as.character()</code> method gets arguments <code>digits</code> and <code>OutDec</code>
with defaults <em>not</em> depending on <code>options()</code>.
Use of <code>as.character(*, format = .)</code> now warns.
</p>
</li>
<li><p> Similarly, the <code>as.character.hexmode()</code> and
<code>*.octmode()</code> methods also behave as <code>good citizen</code>
methods and back compatibility option <code>keepStr = TRUE</code>.
</p>
</li>
<li><p> The <code>as.POSIXlt(<POSIXlt>)</code> and
<code>as.POSIXct(<POSIXct>)</code> default methods now do obey their
<code>tz</code> argument, also in this case.
</p>
</li>
<li> <p><code>as.POSIXlt(<Date>)</code> now does apply a <code>tz</code> (time
zone) argument, as does <code>as.POSIXct()</code>; partly suggested by
Roland Fuß on the R-devel mailing list.
</p>
</li>
<li> <p><code>as.Date.POSIXlt(x)</code> now also works when the list components
are of unequal length, aka “partially filled” or “ragged”.
</p>
</li>
<li> <p><code>expand.model.frame()</code> looked up variables in the wrong
environment when applied to models fitted without <code>data</code>.
Reported in <a href="https://bugs.R-project.org/show_bug.cgi?id=18414">PR#18414</a>.
</p>
</li>
<li> <p><code>time()</code> now (also) uses the
<code>ts.eps = getOption("ts.eps")</code>
argument and thus by default rounds values very close to the start (or
end) of a year. Based on a proposal by Andreï V. Kostyrka on R-help.
</p>
</li>
<li><p> Printing of a <code>factanal()</code> result with just one factor and
<code>sort = TRUE</code> now works regularly, fixing <a href="https://bugs.R-project.org/show_bug.cgi?id=17863">PR#17863</a> by Timothy
Bates, thanks to the ‘R Contributors’ working group.
</p>
</li>
<li><p> Printing 0-length objects of class
<code>"factor"</code>, <code>"roman"</code>, <code>"hexmode"</code>,
<code>"octmode"</code>, <code>"person"</code>, <code>"bibentry"</code>, or
<code>"citation"</code> now prints something better, one
of which fixes <a href="https://bugs.R-project.org/show_bug.cgi?id=18422">PR#18422</a>, reported by Benjamin Feakins.
</p>
</li>
<li> <p><code>Sys.timezone()</code> queries <code>timedatectl</code> only if
<code>systemd</code> is loaded; addressing a report by Jan Gorecki in
<a href="https://bugs.R-project.org/show_bug.cgi?id=17421">PR#17421</a>.
</p>
</li>
<li><p> The formula method of <code>cor.test()</code> had scoping problems
when <code>environment(formula)</code> was not the calling environment;
reported with a patch proposal by Mao Kobayashi in <a href="https://bugs.R-project.org/show_bug.cgi?id=18439">PR#18439</a>.
</p>
</li>
<li> <p><code>attach()</code> of an environment with active bindings now
preserves the active bindings. Reported by Kevin Ushey in
<a href="https://bugs.R-project.org/show_bug.cgi?id=18425">PR#18425</a>.
</p>
</li>
<li><p> BLAS detection now works also with system-provided libraries not
available as regular files. This fixes detection of the Accelerate
framework on macOS since Big Sur. Reported by David Novgorodsky.
</p>
</li>
<li> <p><code>download.file()</code> gives a helpful error message in case of
an invalid <code>download.file.method</code> option, thanks to Colin Fay's
report in <a href="https://bugs.R-project.org/show_bug.cgi?id=18455">PR#18455</a>.
</p>
</li>
<li><p> Sporadic crashes of <code>Rterm</code> when using completion have
been fixed.
</p>
</li>
<li> <p><code>Rprof()</code> is now more reliable. A livelock in thread
initialization with too short sampling interval has been fixed on
macOS. A deadlock in using the C runtime has been fixed on Windows.
A potential deadlock has been prevented on Unix.
</p>
</li>
<li><p> Cursor placement in <code>Rgui</code> now works even after a
fixed-width font is selected.
</p>
</li>
<li><p> Mandatory options (<code>options()</code>) are now set on startup so
that saving and restoring them always works (<a href="https://bugs.R-project.org/show_bug.cgi?id=18372">PR#18372</a>).
</p>
</li>
<li><p> Package installation, <code>R CMD INSTALL</code> or <code>install.packages(*)</code>,
now parses each of the ‘<span class="file"><pkg>/R/*.R</span>’ files individually instead
of first concatenating and then <code>parse()</code>ing the large resulting
file. This allows parser or syntax errors to be diagnosed with
correct file names and line numbers, thanks to Simon Dedman's report
and Bill Dunlap's patch in <a href="https://bugs.R-project.org/show_bug.cgi?id=17859">PR#17859</a>.
</p>
<p>This <em>does</em> require syntactically self contained R source
files now, fixing another inadvertent bug.
</p>
</li>
<li> <p><code>predict.lm(<model with offset>)</code> now finds the offset in
the correct environment, thanks to André Gillibert's report and patch
in <a href="https://bugs.R-project.org/show_bug.cgi?id=18456">PR#18456</a>.
</p>
</li>
<li> <p><code>getInitial(<formula>)</code> now finds the <code>selfStart</code>
model in the correct environment.
(Reported by Ivan Krylov in <a href="https://bugs.R-project.org/show_bug.cgi?id=18368">PR#18368</a>.)
</p>
</li>
<li><p> Fix for possible segfault when using recently-added graphics
features, such as gradients, clipping paths, masks, and groups with
<code>pdf(file=NULL)</code>.
</p>
</li>
<li> <p><code>class(m) <- class(m)</code> no longer changes a matrix <code>m</code>
by adding a class <em>attribute</em>.
</p>
</li>
<li> <p><code>packageDate(pkg)</code> now only warns once if there is no <code>pkg</code>.
</p>
</li>
<li><p> When <code>ts()</code> creates a multivariate time series,
<code>"mts"</code>, it also inherits from <code>"array"</code> now, and
<code>is.mts()</code> is documented <em>and</em> stricter.
</p>
</li>
<li> <p><code>Rd2txt()</code> now preserves line breaks of <code style="white-space: pre;">⁠\verb⁠</code> Rd
content and from duplicated <code style="white-space: pre;">⁠\cr⁠</code>. The former also
fixes the rendering of verbatim output from Rd
<code style="white-space: pre;">⁠\Sexpr⁠</code> in plain-text help.
</p>
</li>
<li> <p><code>uniroot(f, interval)</code> should no longer wrongly converge
<em>outside</em> the interval in some cases where <code>abs(f(x)) == Inf</code>
for an <code>x</code> at the interval boundary, thanks to posts by
Ben Bolker and Serguei Sokol on R-devel.
</p>
</li>
<li><p> Vectorized alpha handling in palette functions such as in
<code>gray()</code>, <code>rainbow()</code>, or <code>hcl.colors()</code> works
correctly now, thanks to Achim Zeileis' report and patch in
<a href="https://bugs.R-project.org/show_bug.cgi?id=18476">PR#18476</a>.
</p>
</li>
<li><p> Formatting and <code>print()</code>ing of <code>bibentry</code> objects has
dropped the deprecated <code>citation.bibtex.max</code> argument, such that
the <code>bibtex</code> argument's default for <code>print.bibentry()</code>
depends directly on the <code>citation.bibtex.max</code> option, whereas in
<code>format.bibentry()</code> the option no longer applies.
</p>
</li>
<li><p> Attempting to use a character string naming a foreign
function entry point in a foreign function call in a package will
now signal an error if the packages has called
<code>R_forceSymbols</code> to specify that symbols must be
used.
</p>
</li>
<li><p> An error in <code>table()</code> could permanently set
<code>options(warn=2)</code> promoting all subsequent warnings to errors.
</p>
</li>
<li><p> The <code>sigma()</code> function gave misleading results for
binary GLMs. A new method for objects of class <code>"glm"</code> returns the
square root of the estimate of the dispersion parameter using the
same calculation as <code>summary.glm()</code>.
</p>
</li>
<li> <p><code>bs()</code> and <code>ns()</code> in the (typical) case of automatic
knot construction, when some of the supposedly inner knots coincide
with boundary knots, now moves them inside (with a warning), building
on <a href="https://bugs.R-project.org/show_bug.cgi?id=18442">PR#18442</a> by Ben Bolker.
</p>
</li>
<li> <p><code>R CMD</code> on Windows now skips the site profile with
<span class="option">--no-site-file</span> and <span class="option">--vanilla</span> even when
<span class="env">R_PROFILE</span> is set (<a href="https://bugs.R-project.org/show_bug.cgi?id=18512">PR#18512</a>, from Kevin Ushey).
</p>
</li></ul>
<h3><img src="../help/figures/../../html/Rlogo.svg" class="toplogo" alt="[R logo]"> CHANGES IN R 4.2.3</h3>
<h4>C-LEVEL FACILITIES</h4>
<ul>
<li><p> The definition of <code>DL_FUNC</code> in ‘<span class="file">R_ext/Rdynload.h</span>’
has been changed to be fully C-compliant. This means that
functions loaded <em>via</em> for example <code>R_GetCCallable</code> need
to be cast to an appropriate type if they have any arguments.
</p>
</li>
<li> <p><code>.Machine</code> has a new element <code>sizeof.time_t</code> to
identify old systems with a 32-bit type and hence a limited range
of date-times (and limited support for dates millions of years
from present).
</p>
</li></ul>
<h4>PACKAGE INSTALLATION</h4>
<ul>
<li><p> (Windows) The default C++ standard had accidentally been
left at C++11 when it was changed to C++14 on Unix.
</p>
</li></ul>
<h4>BUG FIXES</h4>
<ul>
<li><p> As <code>"POSIXlt"</code> objects may be “partially filled”
and their list components meant to be recycled, <code>length()</code> now
is the length of the longest component.
</p>
</li>
<li> <p><code>as.POSIXlt.Date()</code> could underflow for dates in the
far past (more than half a million years <abbr>BCE</abbr>).
</p>
</li>
<li> <p><code>as.Date.POSIXlt(x)</code> would return <code>"1970-01-01"</code>
instead of <code>NA</code> in R 4.2.2, e.g., for </p>
<pre>
x <- as.POSIXlt(c("2019-01-30","2001-1-1"))
x$mon <- c(0L, NA); as.Date(x)</pre>
</li>
<li> <p><code>R CMD check</code> failed to apply enabled
<span class="env">_R_CHECK_SUGGESTS_ONLY_</span> to examples and vignettes
(regression in <span class="rlang"><b>R</b></span> 4.2.0).
</p>
</li>
<li> <p><code>R CMD check</code> did not re-build vignettes in
separate processes by default (regression in <span class="rlang"><b>R</b></span> 4.2.0).
</p>
</li>
<li><p> Running examples from HTML documentation now restores
previous <span class="pkg">knitr</span> settings and options (<a href="https://bugs.R-project.org/show_bug.cgi?id=18420">PR#18420</a>).
</p>
</li>
<li><p> Quartz: fonts are now located using Core Graphics API
instead of deprecated ATS which is no longer supported in the
macOS 13 <abbr>SDK</abbr> (<a href="https://bugs.R-project.org/show_bug.cgi?id=18426">PR#18426</a>). This also addresses an issue where
the currently used font in the Quartz device context was not
correctly retained.
</p>
</li>
<li><p> (Windows) Math symbols in text drawing functions are again
rendered correctly (<a href="https://bugs.R-project.org/show_bug.cgi?id=18440">PR#18440</a>). This fixes a regression in <span class="rlang"><b>R</b></span> 4.2.1
caused by a fix in <a href="https://bugs.R-project.org/show_bug.cgi?id=18382">PR#18382</a> which uncovered an issue in GraphApp
due to which the symbol <abbr>charset</abbr> was not used with TT Symbol font face.
</p>
</li>
<li><p> (Windows) Installing a package with a
‘<span class="file">src/Makefile.{win,ucrt}</span>’ file includes
‘<span class="file">~/.R/Makevars.win64</span>’ in the search for user makevars, as
documented in “R Installation and Administration” and done
for packages with a ‘<span class="file">src/Makevars.{win,ucrt}</span>’ file.
</p>
</li>
<li> <p><code>format(<POSIXlt_w/_unbalanced_sec>, "....%OS<n>")</code> with
<code class="reqn">n > 0</code> no longer accidentally uses the unbalanced seconds,
thanks to Suharto Anggono's report (including patch) in <a href="https://bugs.R-project.org/show_bug.cgi?id=18448">PR#18448</a>.
</p>
</li>
<li> <p><code>solve.default(a, b)</code> works around issues with
some versions of LAPACK when <code>a</code> contains <code>NA</code> or
<code>NaN</code> values.
</p>
</li>
<li><p> When <code>UseMethod()</code> cannot dispatch, it no longer segfaults
producing the error message in case of a long <code>class()</code>, thanks to
Joris Vankerschaver's report (including patch) in <a href="https://bugs.R-project.org/show_bug.cgi?id=18447">PR#18447</a>.
</p>
</li>
<li><p> When <code>example(foo, ..)</code> produces graphics on an interactive
device it needs to open itself, it now leaves <code>devAskNewPage()</code>
unchanged even when it was <code>FALSE</code>, thus fixing a 14 years old
‘FIXME’.
</p>
</li>
<li> <p><code>packageDescription()</code> again catches errors from encoding
conversions. This also fixes broken <code>packageVersion()</code> in
C locale on systems where <code>iconv</code> does not support transliteration.
</p>
</li></ul>
<h3><img src="../help/figures/../../html/Rlogo.svg" class="toplogo" alt="[R logo]"> CHANGES IN R 4.2.2</h3>
<h4>NEW FEATURES</h4>
<ul>
<li> <p><code>tools::Rdiff(useDiff = TRUE)</code> checks for the presence
of an external <code>diff</code> command and switches to
<code>useDiff = FALSE</code> if none is found.
This allows <code>R CMD Rdiff</code> to always work.
</p>
</li>
<li><p> On Windows, environment variable
<span class="env">R_LIBCURL_SSL_REVOKE_BEST_EFFORT</span> can be used to switch to
only ‘best-effort’ <abbr>SSL</abbr> certificate revocation checks with
the default <code>"libcurl"</code> download method. This reduces
security, but may be needed for downloads to work with <abbr>MITM</abbr>
proxies (<a href="https://bugs.R-project.org/show_bug.cgi?id=18379">PR#18379</a>).
</p>
</li>
<li><p> (macOS) The run-time check for libraries from XQuartz for
X11 and Tcl/Tk no longer uses <code>otool</code> from the Apple
Developer Tools (<a href="https://bugs.R-project.org/show_bug.cgi?id=18400">PR#18400</a>).
</p>
</li>
<li><p> The LaTeX style for producing the PDF manuals, ‘<span class="file">Rd.sty</span>’,
now loads the standard ‘<span class="samp">⁠amsmath⁠</span>’, ‘<span class="samp">⁠amsfonts⁠</span>’ and
‘<span class="samp">⁠amssymb⁠</span>’ packages for greater coverage of math commands in
the Rd <code style="white-space: pre;">⁠\eqn⁠</code> and <code style="white-space: pre;">⁠\deqn⁠</code> macros.
The <code style="white-space: pre;">⁠\mathscr⁠</code> LaTeX command is also provided (via the
‘<span class="samp">⁠mathrsfs⁠</span>’ package, if available, or the ‘<span class="samp">⁠amsfonts⁠</span>’
bundle otherwise), fulfilling the wish of <a href="https://bugs.R-project.org/show_bug.cgi?id=18398">PR#18398</a>.
</p>
</li>
<li><p> (Windows) The default format of <code>readClipboard()</code> and
<code>writeClipboard()</code> has been changed to <code>13</code>
(<code>CF_UNICODETEXT</code>).
</p>
</li></ul>
<h4>INSTALLATION on a UNIX-ALIKE</h4>
<ul>
<li><p> The PDF manuals (if built) can be compacted by the new
target <code>make compact-pdf</code> (at the top level or in
directory ‘<span class="file">doc/manual</span>’).
</p>
</li>
<li><p> There is now <code>configure</code> support for LLVM clang 15
on Linux, which defaults to position-independent (PIE) executables
whereas <code>gfortran</code> does not.
</p>
</li>
<li><p> Many small changes to ease compilation (and suppress
warnings) with LLVM <code>clang</code> 15.
</p>
</li></ul>
<h4>BUG FIXES</h4>
<ul>
<li> <p><code>Rscript -e</code> would fail if ‘<span class="file">stdin</span>’ were closed
(Reported by Henrik Bengtsson.)
</p>
</li>
<li> <p><code>qt(*, log.p=TRUE)</code> in outer tails no longer produces
<code>NaN</code> in its final steps, thus fixing <a href="https://bugs.R-project.org/show_bug.cgi?id=18360">PR#18360</a>.
</p>
</li>
<li> <p><code>tools::Rd2latex()</code> now escapes hashes and ampersands
when writing URLs, fixing LaTeX errors with such URLs in <code style="white-space: pre;">⁠\tabular⁠</code>.
</p>
</li>
<li><p> When <code>isGeneric(f, fdef=*)</code> is used with mismatching
names, the warning is better understandable; reported (with fix) in
<a href="https://bugs.R-project.org/show_bug.cgi?id=18370">PR#18370</a> by Gabe Becker.
</p>
</li>
<li> <p><code>poly(x, n)</code> now works again (and is now documented)
when <code>x</code> is a <code>"Date"</code> or <code>"POSIXct"</code> object, or of
another class while fulfilling <code>mode(x) == "numeric"</code>. This
also enables <code>poly(x, *, raw=TRUE)</code> for such variables.
Reported by Michael Chirico to R-devel.
</p>
</li>
<li> <p><code>write.table()</code>, <code>write.csv()</code> and
<code>write.csv2()</code> restore their numerical precision (internal
equivalent of <code>digits = 15</code>) after an interrupt (<a href="https://bugs.R-project.org/show_bug.cgi?id=18384">PR#18384</a>).
</p>
</li>
<li><p> One can now read also byte <code>FF</code> from a clipboard connection
(<a href="https://bugs.R-project.org/show_bug.cgi?id=18385">PR#18385</a>).
</p>
</li>
<li> <p><code>source("")</code> and <code>source(character())</code> now give more
helpful error messages.
</p>
</li>
<li> <p><code>R CMD check --as-cran</code> set <span class="env">_R_CHECK_TIMINGS_</span>
too late to have the intended effect.
</p>
</li>
<li> <p><code>as.POSIXlt(x)</code> now also works with very large dates
<code>x</code>, fixing <a href="https://bugs.R-project.org/show_bug.cgi?id=18401">PR#18401</a> reported by Hannes Mühleisen.
</p>
</li>
<li><p> Files can now be extracted even from very large zip archives
(<a href="https://bugs.R-project.org/show_bug.cgi?id=18390">PR#18390</a>, thanks to Martin Jakt).
</p>
</li>
<li><p> Non-finite objects of class <code>"POSIXlt"</code> are now
correctly coerced to classes <code>"Date"</code> and <code>"POSIXct"</code>;
following up on the extension to <code>format()</code> them correctly.
</p>
</li>
<li><p> Added methods for <code>is.finite()</code>, <code>is.infinite()</code>
and <code>is.nan()</code> for <code>"POSIXlt"</code> date-time objects.
</p>
</li></ul>
<h4>BUG FIXES on Windows</h4>
<ul>
<li><p> Non-ASCII characters are now properly displayed on Windows
in windows created using GraphApp via
e.g. <code>winDialogString</code> thanks to a workaround for an
at least surprising Windows behavior with UTF-8 as the system
encoding (<a href="https://bugs.R-project.org/show_bug.cgi?id=18382">PR#18382</a>).
</p>
</li>
<li><p> Find and replace operations work again in the script editor in
<code>Rgui</code> on Windows.
</p>
</li>
<li><p> Computation of window size based on requested client size in
GraphApp when running in a multi-byte locale on Windows has been fixed
(regression in <span class="rlang"><b>R</b></span> 4.2.0 for users of systems where <span class="rlang"><b>R</b></span> 4.1 used a
single-byte locale). <code>Rgui</code> again respects the number of
console rows and columns given in ‘<span class="file">Rconsole</span>’ file.
</p>
</li>
<li> <p><code>Rterm</code> support for <code>Alt+xxx</code> sequences has been
fixed to produce the corresponding character (only) once. This fixes
pasting text with tilde on Italian keyboard (<a href="https://bugs.R-project.org/show_bug.cgi?id=18391">PR#18391</a>).
</p>
</li></ul>
<h3><img src="../help/figures/../../html/Rlogo.svg" class="toplogo" alt="[R logo]"> CHANGES IN R 4.2.1</h3>
<h4>NEW FEATURES</h4>
<ul>
<li><p> New function <code>utils::findCRANmirror()</code> to find out if a
<abbr>CRAN</abbr> mirror has been selected, otherwise fallback to
the main site. This behaves in the same way as
<code>tools::CRAN_package_db()</code> and is intended for packages
wishing to access <abbr>CRAN</abbr> for purposes other than
installing packages.
</p>
<p>The need for this was shown by a day when the main <abbr>CRAN</abbr>
website was offline and a dozen or so packages which had its URL
hardcoded failed their checks.
</p>
</li></ul>
<h4>INSTALLATION on a UNIX-ALIKE</h4>
<ul>
<li><p> The libraries searched for by <span class="option">--with-blas</span> (without
a value) now include BLIS (after OpenBLAS but before ATLAS). And
on macOS, the Accelerate framework (after ATLAS). (This is
patterned after the <code>AX_BLAS</code> macro from the Autoconf Archive.)
</p>
</li>
<li><p> The included LAPACK sources have been updated to 3.10.1.
</p>
</li></ul>
<h4>UTILITIES</h4>
<ul>
<li><p> The (full path to) the command <code>tidy</code> to be used for
HTML validation can be set by environment variable <span class="env">R_TIDYCMD</span>.
</p>
</li>
<li><p> Setting environment variable
<span class="env">_R_CHECK_RD_VALIDATE_RD2HTML_</span> to a false value will override
<code>R CMD check --as-cran</code> and turn off HTML validation.
This provides a way to circumvent a problematic <code>tidy</code>.
</p>
<p>The 2006 version that ships with macOS is always skipped.
</p>
</li></ul>
<h4>C-LEVEL FACILITIES</h4>
<ul>
<li><p> The undocumented legacy declarations of <code>Sint</code>,
<code>Sfloat</code>, <code>SINT_MAX</code> and <code>SINT_MIN</code> in header
‘<span class="file">R.h</span>’ are deprecated.
</p>
</li></ul>
<h4>BUG FIXES</h4>
<ul>
<li> <p><code>fisher.test(d)</code> no longer segfaults for “large”
<code>d</code>; fixing <a href="https://bugs.R-project.org/show_bug.cgi?id=18336">PR#18336</a> by preventing/detecting an integer
overflow reliably.
</p>
</li>
<li> <p><code>tar(., files=*)</code> now produces correctly the warning
about invalid <abbr>UID</abbr> or <abbr>GID</abbr> of files, fixing <a href="https://bugs.R-project.org/show_bug.cgi?id=18344">PR#18344</a>, reported by
Martin Morgan.
</p>
</li>
<li> <p><code>tk_choose.files()</code> with <code>multi = FALSE</code>
misbehaved on paths containing spaces (<a href="https://bugs.R-project.org/show_bug.cgi?id=18334">PR#18334</a>) (regression
introduced in <span class="rlang"><b>R</b></span> 4.0.0).
</p>
</li>
<li> <p><code>sort(x, partial = ind, *)</code> now works correctly notably for
the non-default <code>na.last = FALSE</code> or <code>TRUE</code>, fixing
<a href="https://bugs.R-project.org/show_bug.cgi?id=18335">PR#18335</a> reported by James Edwards.
</p>
</li>
<li><p> Environment variable <span class="env">_R_CHECK_XREFS_REPOSITORIES_</span> is
only used for checking ‘<span class="file">.Rd</span>’ cross-references in <code>R
CMD check</code> (as documented) and not for other uses looking for a
<abbr>CRAN</abbr> mirror.
</p>
</li>
<li><p> The search for a <abbr>CRAN</abbr> mirror when checking
packages now uses <code>getOption("repos")</code> if that specifies a
<abbr>CRAN</abbr> mirror, even when it does not also specify all three
Bioconductor repositories (as was previously required).
</p>
</li>
<li><p> The <abbr><span class="acronym">HTML</span></abbr> code generated by <code>tools::Rd2HTML()</code>
has been improved to pass <code>tidy</code> 5.8.0.
</p>
</li></ul>
<h4>BUG FIXES on Windows</h4>
<ul>
<li><p> Writing to a clipboard connection works again, fixing a
regression in <span class="rlang"><b>R</b></span> 4.2.0 (<a href="https://bugs.R-project.org/show_bug.cgi?id=18332">PR#18332</a>). Re-using a closed clipboard
connection no longer issues a spurious warning about an ignored
encoding argument.
</p>
</li>
<li><p> C function <code>getlocale</code> no longer attempts to query an
unsupported category from the OS, even when requested at R level,
which may cause crashes when <span class="rlang"><b>R</b></span> 4.2.0 (which uses <abbr>UCRT</abbr>) is
embedded (reported by Kevin Ushey).
</p>
</li>
<li><p> Accent keys now work in GraphApp Unicode windows, which are
used by <code>Rgui</code> whenever running in a multibyte locale (so
also in UTF-8, hence fixing a regression in <span class="rlang"><b>R</b></span> 4.2.0 for users of
systems where <span class="rlang"><b>R</b></span> 4.1 used a single-byte locale).
</p>
</li>
<li><p> Completion in <code>Rgui</code> now works also with
non-ASCII characters.
</p>
</li>
<li> <p><code>Rgui</code> no longer truncates usage information with
<span class="option">--help</span>.
</p>
</li>
<li><p> Text injection from external applications via
<code>SendInput</code> now works in GraphApp Unicode windows, fixing a
regression in <span class="rlang"><b>R</b></span> 4.2.0 for <code>Rgui</code> users of systems where
<span class="rlang"><b>R</b></span> 4.1 used a single-byte locale but <span class="rlang"><b>R</b></span> 4.2.0 uses UTF-8.
</p>
</li>
<li><p> Performance of <code>txtProgressBar()</code> in <code>Rgui</code> when
running in a multi-byte locale has been improved (fixing a
performance regression in <span class="rlang"><b>R</b></span> 4.2.0 for users of systems where <span class="rlang"><b>R</b></span>
4.1 used a single-byte locale).
</p>
</li>
<li><p> The script editor in <code>Rgui</code> now works also on
systems using UTF-8 as the native encoding. Users of the script
editor have to convert their scripts with non-ASCII characters to
UTF-8 before reading them in <span class="rlang"><b>R</b></span> 4.2.1 or newer (on recent Windows
where UTF-8 is used). This fixes a regression in <span class="rlang"><b>R</b></span> 4.2.0, which
prevented some operations with scripts when they contained
non-ASCII characters.
</p>
</li></ul>
<h3><img src="../help/figures/../../html/Rlogo.svg" class="toplogo" alt="[R logo]"> CHANGES IN R 4.2.0</h3>
<h4>SIGNIFICANT USER-VISIBLE CHANGES</h4>
<ul>
<li><p> The <code>formula</code> method of <code>aggregate()</code> now matches
the generic in naming its first argument <code>x</code> (resolving
<a href="https://bugs.R-project.org/show_bug.cgi?id=18299">PR#18299</a> by Thomas Soeiro).
</p>
<p>This means that calling <code>aggregate()</code> with a formula as a
named first argument requires name <code>formula</code> in earlier
versions of <span class="rlang"><b>R</b></span> and name <code>x</code> now, so portable code should not
name the argument (code in many packages did).
</p>
</li>
<li><p> Calling <code>&&</code> or <code>||</code> with either argument of
length greater than one now gives a warning (which it is intended
will become an error).
</p>
</li>
<li><p> Calling <code>if()</code> or <code>while()</code> with a condition of
length greater than one gives an error rather than a warning.
Consequently, environment variable
<span class="env">_R_CHECK_LENGTH_1_CONDITION_</span> no longer has any effect.
</p>
</li>
<li><p> Windows users should consult the WINDOWS section below for
some profound changes including
</p>
<ul>
<li><p> Support for 32-bit builds has been dropped.
</p>
</li>
<li><p> UTF-8 locales are used where available.
</p>
</li>
<li><p> The default locations for the <span class="rlang"><b>R</b></span> installation and personal
library folder have been changed.
</p>
</li></ul>
<p>Thanks to Tomas Kalibera for months of work on the Windows port
for this release.
</p>
</li></ul>
<h4>NEW FEATURES</h4>
<ul>
<li> <p><code>matrix(x, n, m)</code> now warns in more cases where
<code>length(x)</code> differs from <code>n * m</code>, as suggested by
Abby Spurdle and Wolfgang Huber in Feb 2021 on the R-devel
mailing list.
</p>
<p>This warning can be turned into an error by setting environment
variable <span class="env">_R_CHECK_MATRIX_DATA_</span> to ‘<span class="samp">⁠TRUE⁠</span>’: <code>R
CMD check --as-cran</code> does so unless it is already set.
</p>
</li>
<li><p> Function <code>file_test()</code> in package <span class="pkg">utils</span> gains
tests for symlinks, readability and writability.
</p>
</li>
<li> <p><code>capabilities("libxml")</code> is now false.
</p>
<p>The description of <code>capabilities("http/ftp")</code> now reflects
that it refers to the default method, no longer the internal one.
</p>
</li>
<li> <p><code>simplify2array()</code> gains an <code>except</code> argument for
controlling the exceptions used by <code>sapply()</code>.
</p>
</li>
<li><p> Environment variables <span class="env">R_LIBS_USER</span> and
<span class="env">R_LIBS_SITE</span> are both now set to the <span class="rlang"><b>R</b></span> system default if
unset or empty, and can be set to <code>NULL</code> to indicate an empty
list of user or site library directories.
</p>
</li>
<li><p> The warning for <code>axis()</code>(-like) calls in cases of relatively
small ranges (typically in log-scale situations) is slightly improved
<em>and</em> suppressed from explicit calls to <code>.axisPars()</code> as
has always been the intention.
</p>
</li>
<li><p> The <code>contrasts</code> setter function <code>`contrasts<-`</code>
gains an explicit default <code>how.many = NULL</code> rather than just
using <code>missing(how.many)</code>.
</p>
</li>
<li> <p><code>grid.pretty()</code> gains a new optional argument <code>n = 5</code>.
</p>
</li>
<li><p> There is a new function <code>.pretty()</code> with option
<code>bounds</code> as a technical-utility version of <code>pretty()</code>. It
and <code>pretty()</code> gain a new argument <code>f.min</code> with a better
than back-compatible default.
</p>
</li>
<li><p> Function <code>grDevices::axisTicks()</code> and related functions
such as <code>graphics::axis()</code> work better, notably for the log
scale; partly because of the <code>pretty()</code> improvements, but also
because care is taken e.g., when <code>ylim</code> is finite but
<code>diff(ylim)</code> is infinite.
</p>
</li>
<li> <p><code>nclass.FD()</code> gains a <code>digits</code> option.
</p>
</li>
<li><p> The R Mathlib internal C function <code>bd0()</code> (called
indirectly from a dozen probability density and distribution
functions such as <code>dpois()</code>, <code>dbinom()</code>,
<code>dgamma()</code>, <code>pgamma()</code> <em>etc</em>) has been complemented
by a more sophisticated and (mostly) more accurate C function
<code>ebd0()</code>, currently called only by internal
<code>dpois_raw()</code> improving accuracy for <span class="rlang"><b>R</b></span> level <code>dpois()</code>
and potentially others calling it such as <code>dnbinom()</code>,
<code>dgamma()</code> or <code>pgamma()</code>. (Thanks to Morten Welinder's
<a href="https://bugs.R-project.org/show_bug.cgi?id=15628">PR#15628</a>.)
</p>
</li>
<li> <p><code>write.ftable()</code> gains <code>sep = " "</code> argument as
suggested by Thomas Soeiro.
</p>
</li>
<li><p> The names of the locale categories supported by <span class="rlang"><b>R</b></span>'s
<code>Sys.getlocale()</code> and <code>Sys.setlocale()</code> are now provided
by variable <code>.LC.categories</code> in the <code>base</code> namespace.
</p>
</li>
<li><p> The <code>Date</code> and <code>POSIXt</code> methods for <code>hist()</code>
and the <code>histogram</code> method for <code>plot()</code> now also use the
new default <code>col = "lightgray"</code> in consistency with the
corresponding change to <code>hist()</code>'s default for <span class="rlang"><b>R</b></span> 4.0.0.
</p>
</li>
<li> <p><code>hist.default()</code> gains new <code>fuzz</code> argument, and the
histogram <code>plot</code> method no longer uses fractional axis ticks
when displaying counts (<code>"Frequency"</code>).
</p>
</li>
<li> <p><code>mapply()</code> and hence <code>Map()</code> now also obey the
“max-or-0-if-any” recycling rule, such that, e.g.,
<code>Map(`+`, 1:3, 1[0])</code> is valid now.
</p>
</li>
<li> <p><code>as.character(<obj>)</code> for <code>"hexmode"</code> or
<code>"octmode"</code> objects now fulfils the important basic rule
<code>as.character(x)[j] === as.character(x[j])</code>.
</p>
</li>
<li><p> The set utility functions, notably <code>intersect()</code> have been
tweaked to be more consistent and symmetric in their two set
arguments, also preserving a common <code>mode</code>.
</p>
</li>
<li> <p><code>substr(ch, start,end) <- new</code> now e.g., preserves
<code>names(ch)</code>; ditto for <code>substring()</code>, thanks to a patch
from Brodie Gaslam.
</p>
</li>
<li> <p><code>plot(<lm>)</code> gains a <code>extend.ylim.f</code> argument, in
partial response to <a href="https://bugs.R-project.org/show_bug.cgi?id=15285">PR#15285</a>; further <a href="https://bugs.R-project.org/show_bug.cgi?id=17784">PR#17784</a> is fixed thanks to
several contributors and a patch by Elin Waring.
The Cook's dist contours get customizable via <code>cook.col</code> and
<code>cook.lty</code> with a different default color and their legend is
nicer by default and customizable via <code>cook.legendChanges</code>.
</p>
</li>
<li><p> Attempting to subset an object that is not subsettable now
signals an error of class <code>notSubsettableError</code>. The
non-subsettable object is contained in the <code>object</code> field of
the error condition.
</p>
</li>
<li><p> Subscript-out-of-bounds errors are now signaled as errors of
class <code>subscriptOutOfBoundsError</code>.
</p>
</li>
<li><p> Stack-overflow errors are now signaled as errors inheriting
from class <code>stackOverflowError</code>. See
<code>?stackOverflowError</code> for more details.
</p>
</li>
<li><p> New partly experimental <code>Sys.setLanguage()</code> utility,
solving the main problem of <a href="https://bugs.R-project.org/show_bug.cgi?id=18055">PR#18055</a>.
</p>
</li>
<li> <p><code>gettext()</code> and <code>gettextf()</code> get a new option
<code>trim = TRUE</code> which when set to false allows translations for
strings such as <code>"Execution halted\n"</code> typical for C code.
</p>
</li>
<li><p> An experimental implementation of hash tables is now
available. See <code>?hashtab</code> for more details.
</p>
</li>
<li> <p><code>identical()</code> gains a <code>extptr.as.ref</code> argument for
requesting that external pointer objects be compared as reference
objects.
</p>
</li>
<li> <p><code>reorder()</code> gets an argument <code>decreasing</code> which it
passes to <code>sort()</code> for level creation; based on the wish and
patch by Thomas Soeiro in <a href="https://bugs.R-project.org/show_bug.cgi?id=18243">PR#18243</a>.
</p>
</li>
<li> <p><code>as.vector()</code> gains a <code>data.frame</code> method which
returns a simple named list, also clearing a long-standing
‘FIXME’ to enable <code>as.vector(<data.frame>,
mode="list")</code>. This breaks code relying on
<code>as.vector(<data.frame>)</code> to return the unchanged data frame.
</p>
</li>
<li> <p><code>legend()</code> is now vectorized for arguments <code>cex</code>,
<code>x.intersp</code>, and <code>text.width</code>.
The latter can now also be specified as a vector (one element for
each column of the legend) or as <code>NA</code> for computing a proper
column wise maximum value of <code>strwidth(legend)</code>.
The argument <code>y.intersp</code> can be specified as a vector with
one entry for each row of the legend.
</p>
<p><code>legend()</code> also gains new arguments <code>title.cex</code> and
<code>title.font</code>.
Thanks to Swetlana Herbrandt.
</p>
</li>
<li><p> Deparsing no longer remaps attribute names <code>dim</code>,
<code>dimnames</code>, <code>levels</code>, <code>names</code> and <code>tsp</code> to
historical S-compatible names (which <code>structure()</code> maps back).
</p>
</li>
<li> <p><code>sample()</code> and <code>sample.int()</code> have additional
sanity checks on their <code>size</code> and <code>n</code> arguments.
</p>
<p><code>all.equal.numeric()</code> gains a sanity check on its
<code>tolerance</code> argument – calling <code>all.equal(a, b, c)</code> for
three numeric vectors is a surprisingly common error.
</p>
<p><code>mean(na.rm =)</code>, <code>rank(na.last =)</code>,
<code>barplot(legend.text =)</code>, <code>boxplot()</code>,
<code>contour(drawlabels =)</code>, <code>polygon(border =)</code> and
<code>methods::is(class2 =)</code> have more robust sanity checks on
their arguments.
</p>
<p><code>R CMD Rd2pdf</code> (used by <code>R CMD check</code>) has a more
robust sanity check on the format of <code>\alias{}</code> commands.
</p>
</li>
<li> <p><code>psigamma(x, deriv)</code> for negative <code>x</code> now also works
for <code>deriv = 4</code> and <code>5</code>; their underlying C level
<code>dpsifn()</code> is documented in ‘Writing R Extensions’.
</p>
</li>
<li><p> The HTML help system now uses HTML5 (wish of <a href="https://bugs.R-project.org/show_bug.cgi?id=18149">PR#18149</a>).
</p>
</li>
<li> <p><code>ks.test()</code> now provides exact p-values also with ties
and MC p-values in the two-sample (Smirnov) case.
By Torsten Hothorn.
</p>
</li>
<li> <p><code>ks.test()</code> gains a formula interface, with <code>y ~ 1</code>
for the one-sample (Kolmogorov) test and <code>y ~ group</code> for the
two-sample (Smirnov) test. Contributed by Torsten Hothorn.
</p>
</li>
<li><p> The return value from <code>ks.test()</code> now has class
<code>c("ks.test", "htest")</code> – packages using <code>try()</code> need
to take care to use <code>inherits()</code> and not <code>==</code> on the class.
</p>
</li>
<li><p> New functions <code>psmirnov()</code>, <code>qsmirnov()</code> and
<code>rsmirnov()</code> in package <span class="pkg">stats</span> implementing the
asymptotic and exact distributions of the two-sample Smirnov statistic.
</p>
</li>
<li> <p><code>iconv()</code> now allows <code>sub = "c99"</code> to use C99-style
escapes for UTF-8 inputs which cannot be converted to encoding <code>to</code>.
</p>
</li>
<li><p> In a forward pipe <code>|></code> expression it is now possible to
use a named argument with the placeholder <code>_</code> in
the <code>rhs</code> call to specify where the <code>lhs</code> is to be
inserted. The placeholder can only appear once on the <code>rhs</code>.
</p>
</li>
<li><p> The included LAPACK sources have been updated to version 3.10.0,
except for the four Fortran 77 routines which 3.10.0 has
re-implemented in Fortran 90 (where the older versions have been
retained as the <span class="rlang"><b>R</b></span> build process does not support Fortran 90).
</p>
</li>
<li> <p><code>path.expand()</code> and most other uses of tilde expansion now
warn if a path would be too long if expanded. (An exception is
<code>file.exists()</code>, which silently returns false.)
</p>
</li>
<li> <p><code>trunc(<Date>, *)</code> now supports <code>units = "months"</code>
or <code>"years"</code> for consistency with the <code>POSIXt</code> method,
thanks to Dirk Eddelbuettel's proposal in <a href="https://bugs.R-project.org/show_bug.cgi?id=18099">PR#18099</a>.
</p>
</li>
<li> <p><code>list2DF()</code> now checks that its arguments are of the
same length, rather than use recycling.
</p>
</li>
<li><p> The HTML help system has several new features: LaTeX-like
math can be typeset using either <a href="https://katex.org/">KaTeX</a>
or <a href="https://www.mathjax.org/">MathJax</a>, usage and example
code is highlighted using <a href="https://prismjs.com">Prism</a>, and
for dynamic help the output of examples and demos can be shown
within the browser if the <a href="https://CRAN.R-project.org/package=knitr"><span class="pkg">knitr</span></a> package is
installed. These features can be disabled by setting the
environment variable <code>_R_HELP_ENABLE_ENHANCED_HTML_</code> to a
false value.
</p>
</li></ul>
<h4>GRAPHICS</h4>
<ul>
<li><p> The graphics engine version, <code>R_GE_version</code>, has been
bumped to <code>15</code> and so packages that provide graphics devices
should be reinstalled.
</p>
</li>
<li><p> The <span class="pkg">grid</span> package now allows the user to specify a
“vector” of pattern fills. The <code>fill</code> argument
to <code>gpar()</code> accepts a list of gradients and/or patterns and
the functions <code>linearGradient()</code>, <code>radialGradient()</code>,
and <code>pattern()</code> have a new <code>group</code> argument.
</p>
<p>Points grobs (data symbols) can now also have a pattern fill.
</p>
<p>The <code>grobCoords()</code> function now returns a more informative
and complex result.
</p>
</li>
<li><p> The <span class="pkg">grid</span> package has new functions for drawing
isolated groups: <code>grid.group()</code>, <code>grid.define()</code>, and
<code>grid.use()</code>. These functions add compositing operators and
affine transformations to R's graphics capabilities.
</p>
<p>The <span class="pkg">grid</span> package also has new functions for stroking
and filling paths: <code>grid.stroke()</code>, <code>grid.fill()</code>,
and <code>grid.fillStroke()</code>.
</p>
<p>A new function <code>as.path()</code> allows the user to specify the
fill rule for a path that is to be used for clipping, stroking, or
filling; available options are <code>"winding"</code> and
<code>"evenodd"</code>. A new function <code>as.mask()</code> allows the user
to specify the type of a mask; available options are
<code>"alpha"</code> and <code>"luminance"</code>.
</p>
<p>These new features are only supported so far (at most) on the
Cairo-based graphics devices and on the <code>pdf()</code> device.
</p>
</li>
<li> <p><code>dev.capabilities()</code> reports on device support
for the new features.
</p>
</li>
<li> <p><code>par()</code> now warns about unnamed non-character arguments
to prevent misuse such as <code>{usr <- par("usr"); par(usr)}</code>.
</p>
</li></ul>
<h4>WINDOWS</h4>
<ul>
<li> <p><span class="rlang"><b>R</b></span> uses UTF-8 as the native encoding on recent Windows
systems (at least Windows 10 version 1903, Windows Server 2022 or
Windows Server 1903). As a part of this change, R uses <abbr>UCRT</abbr> as
the C runtime. <abbr>UCRT</abbr> should be installed manually on systems older
than Windows 10 or Windows Server 2016 before installing <span class="rlang"><b>R</b></span>.
</p>
</li>
<li><p> The default personal library on Windows, folder
‘<span class="file">R\win-library\x.y</span>’ where ‘<span class="file">x.y</span>’ stands for <span class="rlang"><b>R</b></span> release
‘<span class="file">x.y.z</span>’, is now a subdirectory of Local Application Data
directory (usually a hidden directory
‘<span class="file">C:\Users\username\AppData\Local</span>’). Use
<code>shell.exec(.libPaths()[1])</code> from <span class="rlang"><b>R</b></span> to open the personal
library in Explorer when it is first in the list (<a href="https://bugs.R-project.org/show_bug.cgi?id=17842">PR#17842</a>).
</p>
</li>
<li> <p><span class="rlang"><b>R</b></span> uses a new 64-bit Tcl/Tk bundle. The previous
32-bit/64-bit bundle had a different layout and can no longer be
used.
</p>
</li>
<li><p> Make files and installer scripts for Windows have been
tailored to ‘<span class="file">Rtools42</span>’, the newly recommended 64-bit
<code>gcc</code> 10.3 MinGW-W64 <abbr>UCRT</abbr> toolchain.
</p>
</li>
<li> <p>‘<span class="file">Rtools42</span>’ by default uses the Windows security
features ASLR and DEP; hence <abbr>CRAN</abbr> builds of <span class="rlang"><b>R</b></span> and packages also
do.
</p>
</li>
<li> <p><span class="rlang"><b>R</b></span> now supports files ‘<span class="file">Makevars.ucrt</span>’,
‘<span class="file">Makefile.ucrt</span>’, ‘<span class="file">configure.ucrt</span>’ and
‘<span class="file">cleanup.ucrt</span>’ in packages, which are used in preference to
the ‘<span class="file">.win</span>’ variants. This allows keeping the ‘<span class="file">.win</span>’
files around to support older versions of <span class="rlang"><b>R</b></span>. This feature will
be removed in the future once support for older versions of <span class="rlang"><b>R</b></span>
would no longer be needed.
</p>
</li>
<li> <p><code>R.version</code> gains a new field <code>crt</code> (only on
Windows) to denote the C runtime. The value is <code>"ucrt"</code>.
</p>
</li>
<li><p> On Windows, <code>download.file(method = "auto")</code> and
<code>url(method = "default")</code> now follow Unix in using
<code>"libcurl"</code> for all except ‘<span class="samp">⁠file://⁠</span>’ <abbr>URI</abbr>s.
</p>
</li>
<li> <p>‘<span class="file">Rtools42</span>’ includes an unpatched Msys2 build of GNU
<code>tar</code>. Paths including drive letters can be made to work
by adding <span class="option">--force-local</span> to environment variable
<span class="env">TAR_OPTIONS</span>. (‘<span class="file">Rtools40</span>’ and earlier included a
patched version which defaulted to this option.)
</p>
</li>
<li><p> Installer builds of <span class="rlang"><b>R</b></span> automatically find the
‘<span class="file">Rtools42</span>’ software collection as well as the compiler
toolchain. No <span class="env">PATH</span> setting is required from the user.
</p>
</li>
<li><p> The default installation directory of R for a user-only
installation has been changed to the User Program Files directory
(usually a hidden directory
‘<span class="file">C:\Users\username\AppData\Local\Programs</span>’) to follow
Windows conventions. Use <code>shell.exec(R.home())</code> from <span class="rlang"><b>R</b></span> to
open the <span class="rlang"><b>R</b></span> installation directory in Explorer (<a href="https://bugs.R-project.org/show_bug.cgi?id=17842">PR#17842</a>).
</p>
</li>
<li> <p><span class="rlang"><b>R</b></span> now supports installation-time patching of packages.
Patches may be installed from a supplied URL or a local directory
or disabled. Patches are included into the installed packages for
reference. This experimental feature may be removed in the
future.
</p>
</li>
<li> <p><code>libcurl</code> is now required for building from source.
</p>
</li>
<li><p> The clipboard connection now works also with text in other
than the current native encoding (<a href="https://bugs.R-project.org/show_bug.cgi?id=18267">PR#18267</a>, with
Hiroaki Yutani). Text is always pasted to the clipboard in
UTF16-LE and the <code>encoding</code> argument is ignored.
</p>
</li>
<li><p> The internal case-changing functions are now used by default
on Windows – this circumvents problems (for example with E acute)
of the <abbr>UCRT</abbr> Windows' runtime.
</p>
</li>
<li> <p><span class="rlang"><b>R</b></span> on Windows now uses the system memory allocator. Doug
Lea's allocator was used since <span class="rlang"><b>R</b></span> 1.2.0 to mitigate performance
limitations seen with system allocators on earlier versions of
Windows.
</p>
</li>
<li> <p><code>memory.limit()</code> and <code>memory.size()</code> are now stubs on
Windows (as on Unix-alikes).
</p>
</li>
<li><p> Applications embedding <span class="rlang"><b>R</b></span> on Windows can now use additional
callbacks, which have so far only been available only on Unix
(<a href="https://bugs.R-project.org/show_bug.cgi?id=18286">PR#18286</a>).
</p>
</li></ul>
<h4>INSTALLATION</h4>
<ul>
<li><p> Facilities for accessing ‘<span class="samp">⁠ftp://⁠</span>’ sites are no longer
tested (except <em>pro tem</em> for <code>curlGetHeaders()</code>) as modern
browsers have removed support.
</p>
</li>
<li> <p><span class="rlang"><b>R</b></span> can now be built with ‘<span class="samp">⁠DEFS = -DSTRICT_R_HEADERS⁠</span>’ .
</p>
</li></ul>
<h4>PACKAGE INSTALLATION</h4>
<ul>
<li> <p><code>R CMD INSTALL</code> no longer tangles vignettes. This
completes an <code>R CMD build</code> change in <span class="rlang"><b>R</b></span> 3.0.0 and affects
packages built before <span class="rlang"><b>R</b></span> 3.0.2. Such packages should be re-made
with <code>R CMD build</code> to have the tangled <span class="rlang"><b>R</b></span> code of vignettes
shipped with the tarball.
</p>
</li>
<li> <p><code>USE_FC_LEN_T</code> will become the default: this uses the
correct prototypes for Fortran BLAS/LAPACK routines called from
C/C++, and requires adjustment of most such calls – see
‘Writing R Extensions’ §6.6.1. (This has been supported
since <span class="rlang"><b>R</b></span> 3.6.2.)
</p>
</li>
<li><p> Package installation speed for packages installed with
<code>keep.source</code> has been improved. This resolve the issue
reported by Ofek Shilon in <a href="https://bugs.R-project.org/show_bug.cgi?id=18236">PR#18236</a>.
</p>
</li></ul>
<h4>UTILITIES</h4>
<ul>
<li> <p><code>R CMD check</code> can optionally report
files/directories left behind in home, ‘<span class="file">/tmp</span>’ (even though
<span class="env">TMPDIR</span> is set) and other directories. See the “R
Internals” manual for details.
</p>
</li>
<li> <p><code>R CMD check</code> now reports byte-compilation errors
during installation. These are not usually fatal but may result
in parts of the package not being byte-compiled.
</p>
</li>
<li> <p><span class="env">_R_CHECK_DEPENDS_ONLY_</span> can be applied selectively to
examples, tests and/or vignettes in <code>R CMD check</code>: see the
“R Internals” manual.
</p>
</li>
<li> <p><span class="env">_R_CHECK_SRC_MINUS_W_IMPLICIT_</span> now defaults to true:
recent versions of Apple <code>clang</code> on macOS have made
implicit function declarations in C into a compilation error.
</p>
</li>
<li> <p><code>R CMD check --as-cran</code> makes use of the
environment variable <span class="env">AUTORECONF</span>. See the
“R Internals” manual §8 for further details.
</p>
</li>
<li> <p><code>R CMD check --use-valgrind</code> also uses
<code>valgrind</code> when re-building vignettes as some non-Sweave
vignettes unhelpfully comment out all their code when
<code>R CMD check</code> runs vignettes.
</p>
</li>
<li><p> Errors in re-building vignettes (unless there are LaTeX
errors) are reported by <code>R CMD check</code> as ‘<span class="samp">⁠ERROR⁠</span>’ rather
than ‘<span class="samp">⁠WARNING⁠</span>’ when running vignettes has been skipped (as it
frequently is in <abbr>CRAN</abbr> checks and by <span class="option">--as-cran</span>).
</p>
</li>
<li> <p><code>R CMD Rd2pdf</code> gains a <span class="option">--quiet</span> option that is
used by <code>R CMD build</code> when building the PDF package manual.
</p>
</li>
<li> <p><code>R CMD Rd2pdf</code> now always runs LaTeX in batch mode,
consistent with Texinfo <code class="reqn">\ge</code> 6.7. The <span class="option">--batch</span>
option is ignored.
</p>
</li>
<li> <p><code>R CMD build</code> and <code>R CMD check</code> now include
the Rd file name and line numbers in the error message of an
<code style="white-space: pre;">⁠\Sexpr⁠</code> evaluation failure.
</p>
</li>
<li><p> For packages using the <code style="white-space: pre;">⁠\doi⁠</code> Rd macro (now an
install-time <code style="white-space: pre;">⁠\Sexpr⁠</code>) but no other dynamic Rd content,
<code>R CMD build</code> now produces a smaller tarball and is
considerably faster – skipping temporary package installation.
</p>
</li>
<li> <p><code>R CMD check</code> can optionally (but included in
<span class="option">--as-cran</span>) validate the HTML produced from the packages
‘<span class="file">.Rd</span>’ files. See
<a href="https://blog.r-project.org/2022/04/08/enhancements-to-html-documentation/">https://blog.r-project.org/2022/04/08/enhancements-to-html-documentation/</a>:
this needs a fairly recent version of HTML Tidy to be available.
</p>
</li></ul>
<h4>C-LEVEL FACILITIES</h4>
<ul>
<li><p> The non-API header ‘<span class="file">R_ext/R-ftp-http.h</span>’ is no longer
provided, as the entry points it covered are now all defunct.
</p>
</li>
<li><p> A number of non-API declarations and macro definitions have
been moved from the installed header ‘<span class="file">Rinternals.h</span>’ to the
internal header ‘<span class="file">Defn.h</span>’. Packages that only use entry points
and definitions documented to be part of the API as specified in
‘Writing R Extensions’ §6 should not be affected.
</p>
</li>
<li><p> The macro <code>USE_RINTERNALS</code> no longer has any effect
when compiling package code. Packages which also use
<code>R_NO_REMAP</code> will need to ensure that the remapped names are
used for calls to API functions that were formerly also made
available as macros.
</p>
</li>
<li><p> The deprecated legacy S-compatibility macros <code>PROBLEM</code>,
<code>MESSAGE</code>, <code>ERROR</code>, <code>WARN</code>, <code>WARNING</code>,
<code>RECOVER</code>, ... are no longer defined in
‘<span class="file">R_ext/RS.h</span>’ (included by ‘<span class="file">R.h</span>’). Replace these by
calls to <code>Rf_error</code> and <code>Rf_warning</code> (defined in header
‘<span class="file">R_ext/Error.h</span>’ included by ‘<span class="file">R.h</span>’).
</p>
<p>Header ‘<span class="file">R_ext/RS.h</span>’ no longer includes ‘<span class="file">R_ext/Error.h</span>’.
</p>
</li>
<li><p> Header ‘<span class="file">R_ext/Constants.h</span>’ (included by ‘<span class="file">R.h</span>’)
when included from C++ now includes the C++ header ‘<span class="file">cfloat</span>’
rather than the C header ‘<span class="file">float.h</span>’ (now possible as C++11 is
required).
</p>
</li>
<li><p> The legacy S-compatibility macros <code>DOUBLE_*</code> in
‘<span class="file">R_ext/Constants.h</span>’ (included by ‘<span class="file">R.h</span>’) are deprecated.
</p>
</li>
<li><p> The deprecated S-compatibility macros <code>SINGLE_*</code> in
‘<span class="file">R_ext/Constants.h</span>’ (included by ‘<span class="file">R.h</span>’) have been
removed.
</p>
</li>
<li> <p><code>R_Calloc</code>, <code>R_Free</code> and <code>R_Realloc</code> are
preferred to their unprefixed forms and error messages now use the
prefix. These forms were introduced in <span class="rlang"><b>R</b></span> 3.4.0 and are available
even when <code>STRICT_R_HEADERS</code> is defined.
</p>
</li>
<li> <p><code>rmultinom</code> has been documented in ‘Writing R
Extensions’ §6 so is now part of the <span class="rlang"><b>R</b></span> API.
</p>
</li>
<li><p> Similarly, <code>Rtanpi</code>, called from <span class="rlang"><b>R</b></span> level <code>tanpi()</code>
is now part of the <span class="rlang"><b>R</b></span> API.
</p>
</li>
<li><p> The long-deprecated, undocumented and non-API entry point
<code>call_R</code> is no longer declared in ‘<span class="file">R_ext/RS.h</span>’ (included
by ‘<span class="file">R.h</span>’).
</p>
</li>
<li><p> The header ‘<span class="file">S.h</span>’ which has been unsupported since Jan
2016 has been removed. Use ‘<span class="file">R.h</span>’ instead.
</p>
</li></ul>
<h4>DEPRECATED AND DEFUNCT</h4>
<ul>
<li><p> The (non-default and deprecated) <code>method = "internal"</code>
for <code>download.file()</code> and <code>url()</code> no longer supports
‘<span class="samp">⁠http://⁠</span>’ nor ‘<span class="samp">⁠ftp://⁠</span>’ <abbr>URI</abbr>s. (It is used only for
‘<span class="samp">⁠file://⁠</span>’ <abbr>URI</abbr>s.)
</p>
<p>On Windows, <code>download.file(method = "wininet")</code> no longer
supports ‘<span class="samp">⁠ftp://⁠</span>’ <abbr>URI</abbr>s. (It is no longer the default method,
which is <code>"libcurl"</code> and does.)
</p>
<p>On Windows, the deprecated <code>method = "wininet"</code> now gives a
warning for ‘<span class="samp">⁠http://⁠</span>’ and ‘<span class="samp">⁠https://⁠</span>’ <abbr>URI</abbr>s for both
<code>download.file()</code> and <code>url()</code>. (It is no longer the default
method.)
</p>
</li>
<li><p> On Windows, the command-line option <span class="option">--max-mem-size</span>
and environment variable <span class="env">R_MAX_MEM_SIZE</span> are defunct. The
memory allocation limit was important for 32-bit builds,
but these are no longer supported.
</p>
</li>
<li> <p><code>default.stringsAsFactors()</code> is now formally deprecated,
where that was only mentioned on its regular help page,
previously. So it now gives a warning if called.
</p>
</li>
<li> <p><code>unix.time()</code> is defunct now; it had been deprecated since
<span class="rlang"><b>R</b></span> 3.4.0.
</p>
</li></ul>
<h4>BUG FIXES</h4>
<ul>
<li><p> Setting <code>digits = 0</code> in <code>format()</code>,
<code>print.default()</code> (and hence typically <code>print()</code>) or
<code>options()</code> is again invalid. Its behaviour was
platform-dependent, and it is unclear what “zero
significant digits” should mean (<a href="https://bugs.R-project.org/show_bug.cgi?id=18098">PR#18098</a>).
</p>
</li>
<li><p> Messages from C code in the ‘<span class="file">cairo</span>’ section of package
<span class="pkg">grDevices</span> are now also offered for translation, thanks to
Michael Chirico's <a href="https://bugs.R-project.org/show_bug.cgi?id=18123">PR#18123</a>.
</p>
</li>
<li> <p><code>mean(x)</code> with finite <code>x</code> now is finite also without
"long.double" capability.
</p>
</li>
<li> <p><code>R CMD Rd2pdf</code> no longer leaves an empty build
directory behind when it aborts due to an already existing output
file. (Thanks to Sebastian Meyer's <a href="https://bugs.R-project.org/show_bug.cgi?id=18141">PR#18141</a>.)
</p>
</li>
<li> <p><code>density(x, weights = w, na.rm = TRUE)</code> when <code>anyNA(x)</code>
is true, now removes weights “in parallel” to <code>x</code>, fixing
<a href="https://bugs.R-project.org/show_bug.cgi?id=18151">PR#18151</a>, reported by Matthias Gondan.
Additionally, it gets a <code>subdensity</code> option.
</p>
</li>
<li><p> Conversion of <code style="white-space: pre;">⁠\Sexpr[]{<expR>}⁠</code> to LaTeX or HTML no longer
produces long blocks of empty lines when <code><expR></code> itself
contains several lines all producing empty output. Thanks to a
report and patch by Ivan Krylov posted to R-devel.
</p>
</li>
<li> <p><code>R CMD build</code> no longer fails if a package vignette
uses child documents and ‘<span class="file">inst/doc</span>’ exists. (Thanks to
Sebastian Meyer's <a href="https://bugs.R-project.org/show_bug.cgi?id=18156">PR#18156</a>.)
</p>
</li>
<li><p> When an R documentation (‘help’ source) file
‘<span class="file">man/foo.Rd</span>’ in a package has <code style="white-space: pre;">⁠\donttest{..}⁠</code> examples
with a syntax error, it is now signalled as ERROR and with correct
line numbers relating to the ‘<span class="file">*-Ex.R</span>’ file, thanks to Duncan
Murdoch and Sebastian Meyer's reports and patch proposals in
<a href="https://bugs.R-project.org/show_bug.cgi?id=17501">PR#17501</a>.
</p>
</li>
<li><p> Improved determination of the correct translation domain in
non-base packages, addressing the combination of <a href="https://bugs.R-project.org/show_bug.cgi?id=18092">PR#18092</a> and
<a href="https://bugs.R-project.org/show_bug.cgi?id=17998">PR#17998</a> (<code>#c6</code>) with reports and <em>augmented</em> patch
#2904 by Suharto Anggono.
</p>
<p>Note that <code>"R-base"</code> is no longer the default domain e.g.,
for top-level calls to <code>gettext()</code>; rather translation needs
explicit <code>domain = *</code> specification in such cases.
</p>
</li>
<li> <p><code>identical(attrib.as.set=FALSE)</code> now works correctly with
data frames with default row names. (Thanks to Charlie Gao's
<a href="https://bugs.R-project.org/show_bug.cgi?id=18179">PR#18179</a>.)
</p>
</li>
<li> <p><code>txtProgressBar()</code> now enforces a non-zero width for
argument <code>char</code>, without which no progress can be visible.
</p>
</li>
<li> <p><code>dimnames(table(d))</code> is more consistent in the case where
<code>d</code> is a list with a single component, thanks to Thomas Soeiro's
report to R-devel.
</p>
<p>Further, <code>table(d1, d2)</code> now gives an error when <code>d1</code> and
<code>d2</code> are data frames as suggested by Thomas in <a href="https://bugs.R-project.org/show_bug.cgi?id=18224">PR#18224</a>.
</p>
</li>
<li><p> Fix for drawing semi-transparent lines and fills on the
native Windows graphics device (<a href="https://bugs.R-project.org/show_bug.cgi?id=18219">PR#18219</a> and <a href="https://bugs.R-project.org/show_bug.cgi?id=16694">PR#16694</a>).
Thanks to Nick Ray for helpful diagnosis on Bugzilla.
</p>
</li>
<li><p> The deparser now wraps sub-expressions such as <code>if(A) .. </code>
with parentheses when needed; thanks to Duncan Murdoch's <a href="https://bugs.R-project.org/show_bug.cgi?id=18232">PR#18232</a>
and Lionel Henry's patches there.
</p>
</li>
<li> <p><code>remove.packages()</code> no longer tries to uninstall
<code>Priority: base</code> packages, thanks to a report and suggestions
by Colin Fay in <a href="https://bugs.R-project.org/show_bug.cgi?id=18227">PR#18227</a>.
</p>
</li>
<li> <p><code>win.metafile()</code> now has <code>xpinch</code> and
<code>ypinch</code> arguments so that the user can override Windows'
(potentially wrong) guess at device dimensions.
</p>
</li>
<li> <p><code>x[i]</code> and <code>x[[i]]</code> for non-integer <code>i</code>
should now behave in all cases as always documented: the index used is
equivalent to <code>as.integer(i)</code> unless that would overflow where
<code>trunc(i)</code> is used instead; thanks to Suharto Anggono's report
and patch proposals in <a href="https://bugs.R-project.org/show_bug.cgi?id=17977">PR#17977</a>.
</p>
</li>
<li> <p><code>asOneSidedFormula()</code> now associates the resulting
formula with the global environment rather than the evaluation
environment created for the call.
</p>
</li>
<li> <p><code><bibentry>$name</code> now matches the field name
case-insensitively, consistent with <code>bibentry()</code> creation and
the replacement method.
</p>
</li>
<li> <p><code>cbind()</code> failed to detect some length mismatches with
a mixture of time-series and non-time-series inputs.
</p>
</li>
<li><p> The default LaTeX style file ‘<span class="file">Sweave.sty</span>’ used by the
<code>RweaveLatex</code> driver no longer loads the obsolete ‘<span class="samp">⁠ae⁠</span>’
package; thanks to a report by Thomas Soeiro in <a href="https://bugs.R-project.org/show_bug.cgi?id=18271">PR#18271</a>.
Furthermore, it now skips ‘<span class="samp">⁠\usepackage[T1]{fontenc}⁠</span>’ for
engines other than pdfTeX (if detected) or if the new
‘<span class="samp">⁠[nofontenc]⁠</span>’ option is used.
</p>
</li>
<li> <p><code>smooth.spline()</code> now stores its logical <code>cv</code>
argument more safely, fixing a rare bug when printing, and also
stores <code>n</code>.
</p>
</li>
<li> <p><code>smooth.spline(x,y,*)</code> now computes the <code>cv.crit</code>
statistic correctly, also when <code>is.unsorted(x)</code>, fixing
<a href="https://bugs.R-project.org/show_bug.cgi?id=18294">PR#18294</a>.
</p>
</li>
<li><p> The <code>data.frame</code> method of <code>rbind()</code> now warns
when binding not-wholly-recycling vectors, by analogy to the default
method (for matrices).
</p>
</li>
<li> <p><code>setAs()</code> finds the correct class for name <code>to</code>
when multiple packages define a class with that name. Thanks to
Gabor Csardi for the report.
</p>
</li>
<li><p> Fix for detaching a package when two classes of the same name
are present in method signatures for the same generic. Thanks to
Gabor Csardi for the report.
</p>
</li>
<li> <p><code>match.arg("", c("", "a", "B"))</code> gives a better error
message, in part from <a href="https://bugs.R-project.org/show_bug.cgi?id=17959">PR#17959</a>, thanks to Elin Waring.
</p>
</li>
<li> <p><code>R CMD Sweave --clean</code> no longer removes
pre-existing files or subdirectories (<a href="https://bugs.R-project.org/show_bug.cgi?id=18242">PR#18242</a>).
</p>
</li>
<li><p> The <code>quartz()</code> device no longer splits polylines into
subpaths. That has caused narrowly-spaced lines with many points
to always look solid even when dashed line type was used due to
dash phase restarts.
</p>
</li>
<li><p> Deparsing constructs such as <code>quote(1 + `!`(2) + 3)</code> works
again as before R 3.5.0, thanks to the report and patch in <a href="https://bugs.R-project.org/show_bug.cgi?id=18284">PR#18284</a>
by Suharto Anggono.
</p>
</li>
<li> <p><code>as.list(f)</code> for a <code>factor</code> <code>f</code> now keeps
<code>names(f)</code>, fixing <a href="https://bugs.R-project.org/show_bug.cgi?id=18309">PR#18309</a>.
</p>
</li>
<li> <p><code>qbeta(.001, .9, .009)</code> and analogous <code>qf()</code> calls now
return a correct value instead of <code>NaN</code> or wrongly <code>1</code>, all
with a warning; thanks to the report by Ludger Goeminne in <a href="https://bugs.R-project.org/show_bug.cgi?id=18302">PR#18302</a>.
</p>
</li>
<li> <p><code>plot.lm()</code> failed to produce the plot of residuals vs.
factor levels (i.e., <code>which=5</code> when leverages are constant)
for models with character predictors (<a href="https://bugs.R-project.org/show_bug.cgi?id=17840">PR#17840</a>).
</p>
</li>
<li> <p><code>interaction.plot(..., xtick = TRUE)</code> misplaced the
x-axis line (<a href="https://bugs.R-project.org/show_bug.cgi?id=18305">PR#18305</a>).
</p>
</li>
<li><p> Not strictly fixing a bug, <code>format()</code>ing and
<code>print()</code>ing of non-finite <code>Date</code> and <code>POSIXt</code>
values <code>NaN</code> and <code class="reqn">\pm</code><code>Inf</code> no longer show as
<code>NA</code> but the respective string, e.g., <code>Inf</code>, for
consistency with numeric vector's behaviour, fulfilling the wish
of <a href="https://bugs.R-project.org/show_bug.cgi?id=18308">PR#18308</a>.
</p>
</li>
<li> <p><code>R CMD check</code> no longer runs test scripts generated
from corresponding ‘<span class="file">.Rin</span>’ files twice and now signals an
ERROR if processing an ‘<span class="file">.Rin</span>’ script fails.
</p>
</li>
<li> <p><code>tools::Rd2txt()</code> used for plain-text help pages now renders
<code style="white-space: pre;">⁠\href⁠</code>s (if <code>tools::Rd2txt_options(showURLs = TRUE)</code>)
and <code style="white-space: pre;">⁠\url⁠</code>s with percent-encoding and standards-compliant
delimiting style (angle brackets and no ‘<span class="samp">⁠URL: ⁠</span>’ prefix).
<code style="white-space: pre;">⁠\email⁠</code> is now rendered with a ‘<span class="samp">⁠mailto:⁠</span>’ prefix.
</p>
</li></ul>
<h3><img src="../help/figures/../../html/Rlogo.svg" class="toplogo" alt="[R logo]"> CHANGES IN R 4.1.3</h3>
<h4>NEW FEATURES</h4>
<ul>
<li><p> The default version of Bioconductor has been changed to
3.14. (This is used by <code>setRepositories</code> and the menus in
GUIs.)
</p>
</li></ul>
<h4>UTILITIES</h4>
<ul>
<li> <p><code>R CMD check --as-cran</code> has a workaround for a bug
in versions of <code>file</code> up to at least 5.41 which
mis-identify <abbr>DBF</abbr> files last changed in 2022 as executables.
</p>
</li></ul>
<h4>C-LEVEL FACILITIES</h4>
<ul>
<li><p> The legacy S-compatibility macros <code>SINGLE_*</code> in
‘<span class="file">R_ext/Constants.h</span>’ (included by ‘<span class="file">R.h</span>’) are deprecated
and will be removed in <span class="rlang"><b>R</b></span> 4.2.0.
</p>
</li></ul>
<h4>BUG FIXES</h4>
<ul>
<li><p> Initialization of self-starting <code>nls()</code> models with
initialization functions following the pre-R-4.1.0 API
(without the <code>...</code> argument) works again for now, with a
deprecation warning.
</p>
</li>
<li><p> Fixed quoting of <code>~autodetect~</code> in Java setting defaults
to avoid inadvertent user lookup due to leading <code>~</code>, reported
in <a href="https://bugs.R-project.org/show_bug.cgi?id=18231">PR#18231</a> by Harold Gutch.
</p>
</li>
<li> <p><code>substr(., start, stop) <- v</code> now treats <em>negative</em>
<code>stop</code> values correctly. Reported with a patch in <a href="https://bugs.R-project.org/show_bug.cgi?id=18228">PR#18228</a> by
Brodie Gaslam.
</p>
</li>
<li><p> Subscripting an array <code>x</code> without dimnames by a
<code>length(dim(x))</code>-column character matrix gave "random"
non-sense, now an error; reported in <a href="https://bugs.R-project.org/show_bug.cgi?id=18244">PR#18244</a> by Mikael Jagan.
</p>
</li>
<li> <p><code>...names()</code> now matches <code>names(list(...))</code> closely,
fixing <a href="https://bugs.R-project.org/show_bug.cgi?id=18247">PR#18247</a>.
</p>
</li>
<li> <p><code>all.equal(*, scale = s)</code> now works as intended when
<code>length(s) > 1</code>, partly thanks to Michael Chirico's <a href="https://bugs.R-project.org/show_bug.cgi?id=18272">PR#18272</a>.
</p>
</li>
<li> <p><code>print(x)</code> for long vectors <code>x</code> now also works for
named atomic vectors or lists and prints the correct number when
reaching the <code>getOption("max.print")</code> limit; partly thanks to a
report and proposal by Hugh Parsonage to the R-devel list.
</p>
</li>
<li> <p><code>all.equal(<selfStart>, *)</code> no longer signals a deprecation
warning.
</p>
</li>
<li> <p><code>reformulate(*, response=r)</code> gives a helpful error message
now when <code>length(r) > 1</code>, thanks to Bill Dunlap's <a href="https://bugs.R-project.org/show_bug.cgi?id=18281">PR#18281</a>.
</p>
</li>
<li><p> Modifying <code>globalCallingHandlers</code> inside
<code>withCallingHandlers()</code> now works or fails correctly, thanks to
Henrik Bengtsson's <a href="https://bugs.R-project.org/show_bug.cgi?id=18257">PR#18257</a>.
</p>
</li>
<li> <p><code>hist(<Date>, breaks = "days")</code> and
<code>hist(<POSIXt>, breaks = "secs")</code>
no longer fail for inputs of length 1.
</p>
</li>
<li> <p><code>qbeta(.001, .9, .009)</code> and similar cases now converge
correctly thanks to Ben Bolker's report in <a href="https://bugs.R-project.org/show_bug.cgi?id=17746">PR#17746</a>.
</p>
</li>
<li> <p><code>window(x, start, end)</code> no longer wrongly signals
“'start' cannot be after 'end'”, fixing <a href="https://bugs.R-project.org/show_bug.cgi?id=17527">PR#17527</a> and
<a href="https://bugs.R-project.org/show_bug.cgi?id=18291">PR#18291</a>.
</p>
</li>
<li> <p><code>data()</code> now checks that its (rarely used) <code>list</code>
argument is a character vector – a couple of packages passed other
types and gave incorrect results.
</p>
</li>
<li> <p><code>which()</code> now checks its <code>arr.ind</code> argument is
TRUE rather coercing to logical and taking the first element –
which gave incorrect results in package code.
</p>
</li>
<li> <p><code>model.weights()</code> and <code>model.offset()</code> more carefully
extract their model components, thanks to Ben Bolker and Tim Taylor's
R-devel post.
</p>
</li>
<li> <p><code>list.files(recursive = TRUE)</code> now shows all broken
symlinks (previously, some of them may have been omitted, <a href="https://bugs.R-project.org/show_bug.cgi?id=18296">PR#18296</a>).
</p>
</li></ul>
<h3><img src="../help/figures/../../html/Rlogo.svg" class="toplogo" alt="[R logo]"> CHANGES IN R 4.1.2</h3>
<h4>C-LEVEL FACILITIES</h4>
<ul>
<li><p> The workaround in headers ‘<span class="file">R.h</span>’ and ‘<span class="file">Rmath.h</span>’
(<code>using namespace std;</code>) for the Oracle Developer Studio
compiler is no longer needed now C++11 is required so has been
removed. A couple more usages of <code>log()</code> (which should have
been <code>std::log()</code>) with an <code>int</code> argument are reported on
Solaris.
</p>
</li>
<li><p> The undocumented limit of 4095 bytes on messages from the
S-compatibility macros <code>PROBLEM</code> and <code>MESSAGE</code> is now
documented and longer messages will be silently truncated rather
than potentially causing segfaults.
</p>
</li>
<li><p> If the <code>R_NO_SEGV_HANDLER</code> environment variable is
non-empty, the signal handler for SEGV/ILL/BUS signals (which
offers recovery user interface) is not set. This allows more
reliable debugging of crashes that involve the console.
</p>
</li></ul>
<h4>DEPRECATED AND DEFUNCT</h4>
<ul>
<li><p> The legacy S-compatibility macros <code>PROBLEM</code>,
<code>MESSAGE</code>, <code>ERROR</code>, <code>WARN</code>, <code>WARNING</code>,
<code>RECOVER</code>, ... are deprecated and will be hidden in <span class="rlang"><b>R</b></span>
4.2.0. <span class="rlang"><b>R</b></span>'s native interface of <code>Rf_error</code> and
<code>Rf_warning</code> has long been preferred.
</p>
</li></ul>
<h4>BUG FIXES</h4>
<ul>
<li> <p><code>.mapply(F, dots, .)</code> no longer segfaults when
<code>dots</code> is not a <code>list</code> and uses <code>match.fun(F)</code> as
always documented; reported by Andrew Simmons in <a href="https://bugs.R-project.org/show_bug.cgi?id=18164">PR#18164</a>.
</p>
</li>
<li> <p><code>hist(<Date>, ...)</code> and <code>hist(<POSIXt>, ...)</code>
no longer pass arguments for <code>rect()</code> (such as <code>col</code> and
<code>density</code>) to <code>axis()</code>. (Thanks to Sebastian Meyer's
<a href="https://bugs.R-project.org/show_bug.cgi?id=18171">PR#18171</a>.)
</p>
</li>
<li> <p><code style="white-space: pre;">⁠\Sexpr{ch}⁠</code> now preserves <code>Encoding(ch)</code>. (Thanks to
report and patch by Jeroen Ooms in <a href="https://bugs.R-project.org/show_bug.cgi?id=18152">PR#18152</a>.)
</p>
</li>
<li><p> Setting the RNG to <code>"Marsaglia-Multicarry"</code> e.g., by
<code>RNGkind()</code>, now warns in more places, thanks to
André Gillibert's report and patch in <a href="https://bugs.R-project.org/show_bug.cgi?id=18168">PR#18168</a>.
</p>
</li>
<li> <p><code>gray(numeric(), alpha=1/2)</code> no longer segfaults, fixing
<a href="https://bugs.R-project.org/show_bug.cgi?id=18183">PR#18183</a>, reported by Till Krenz.
</p>
</li>
<li><p> Fixed <code>dnbinom(x, size=<very_small>, .., log=TRUE)</code>
regression, reported by Martin Morgan.
</p>
</li>
<li> <p><code>as.Date.POSIXlt(x)</code> now keeps <code>names(x)</code>, thanks to
Davis Vaughan's report and patch in <a href="https://bugs.R-project.org/show_bug.cgi?id=18188">PR#18188</a>.
</p>
</li>
<li> <p><code>model.response()</code> now strips an <code>"AsIs"</code> class typically,
thanks to Duncan Murdoch's report and other discussants in <a href="https://bugs.R-project.org/show_bug.cgi?id=18190">PR#18190</a>.
</p>
</li>
<li> <p><code>try()</code> is considerably faster in case of an error and
long call, as e.g., from some <code>do.call()</code>. Thanks to
Alexander Kaever's suggestion posted to R-devel.
</p>
</li>
<li> <p><code>qqline(y = <object>)</code> such as <code>y=I(.)</code>, now works,
see also <a href="https://bugs.R-project.org/show_bug.cgi?id=18190">PR#18190</a>.
</p>
</li>
<li><p> Non-integer <code>mgp</code> <code>par()</code> settings are now handled
correctly in <code>axis()</code> and <code>mtext()</code>, thanks to Mikael
Jagan and Duncan Murdoch's report and suggestion in <a href="https://bugs.R-project.org/show_bug.cgi?id=18194">PR#18194</a>.
</p>
</li>
<li> <p><code>formatC(x)</code> returns length zero <code>character()</code> now,
rather than <code>""</code> when <code>x</code> is of length zero, as documented,
thanks to Davis Vaughan's post to R-devel.
</p>
</li>
<li> <p><code>removeSource(fn)</code> now retains (other) <code>attributes(fn)</code>.
</p>
</li></ul>
<h3><img src="../help/figures/../../html/Rlogo.svg" class="toplogo" alt="[R logo]"> CHANGES IN R 4.1.1</h3>
<h4>NEW FEATURES</h4>
<ul>
<li> <p><code>require(<var>pkg</var>, quietly = TRUE)</code> is quieter and in
particular does not warn if the package is not found.
</p>
</li></ul>
<h4>DEPRECATED AND DEFUNCT</h4>
<ul>
<li><p> Use of ‘<span class="samp">⁠ftp://⁠</span>’ <abbr>URI</abbr>s should be regarded as
deprecated, with on-going support confined to <code>method =
"libcurl"</code> and not routinely tested. (Nowadays no major browser
supports them.)
</p>
</li>
<li><p> The non-default <code>method = "internal"</code> is deprecated for
‘<span class="samp">⁠http://⁠</span>’ and ‘<span class="samp">⁠ftp://⁠</span>’ <abbr>URI</abbr>s for both
<code>download.file</code> and <code>url</code>.
</p>
</li>
<li><p> On Windows, <code>method = "wininet"</code> is deprecated for
‘<span class="samp">⁠http://⁠</span>’, ‘<span class="samp">⁠https://⁠</span>’ and ‘<span class="samp">⁠ftp://⁠</span>’ <abbr>URI</abbr>s for both
<code>download.file</code> and <code>url</code>. (A warning is only given for
‘<span class="samp">⁠ftp://⁠</span>’.)
</p>
<p>For ‘<span class="samp">⁠ftp://⁠</span>’ <abbr>URI</abbr>s the default method is now <code>"libcurl"</code>
if available (which it is on <abbr>CRAN</abbr> builds).
</p>
<p><code>method = "wininet"</code> remains the default for ‘<span class="samp">⁠http://⁠</span>’
and ‘<span class="samp">⁠https://⁠</span>’ <abbr>URI</abbr>s but if <code>libcurl</code> is available, using
<code>method = "libcurl"</code> is preferred.
</p>
</li></ul>
<h4>INSTALLATION</h4>
<ul>
<li> <p><code>make check</code> now works also without a LaTeX
installation. (Thanks to Sebastian Meyer's <a href="https://bugs.R-project.org/show_bug.cgi?id=18103">PR#18103</a>.)
</p>
</li></ul>
<h4>BUG FIXES</h4>
<ul>
<li> <p><code>make check-devel</code> works again in an <span class="rlang"><b>R</b></span> build
configured with <span class="option">--without-recommended-packages</span>.
</p>
</li>
<li> <p><code>qnbinom(p, size, mu)</code> for large <code>size/mu</code> is correct
now in a range of cases (<a href="https://bugs.R-project.org/show_bug.cgi?id=18095">PR#18095</a>); similarly for the <code>(size,
prob)</code> parametrization of the negative binomial. Also <code>qpois()</code>
and <code>qbinom()</code> are better and or faster for extreme cases. The
underlying C code has been modularized and is common to all four cases
of discrete distributions.
</p>
</li>
<li> <p><code>gap.axis</code> is now part of the <code>axis()</code> arguments which
are passed from <code>bxp()</code>, and hence <code>boxplot()</code>. (Thanks to
Martin Smith's report and suggestions in <a href="https://bugs.R-project.org/show_bug.cgi?id=18109">PR#18109</a>.)
</p>
</li>
<li> <p><code>.First</code> and <code>.Last</code> can again be set from the site
profile.
</p>
</li>
<li> <p><code>seq.int(from, to, *)</code> and <code>seq.default(..)</code> now work
better in large range cases where <code>from-to</code> is infinite where
the two boundaries are finite.
</p>
</li>
<li> <p><code>all.equal(x,y)</code> now returns <code>TRUE</code> correctly also
when several entries of <code>abs(x)</code> and <code>abs(y)</code> are close to
<code>.Machine$double.xmax</code>, the largest finite <code>numeric</code>.
</p>
</li>
<li> <p><code>model.frame()</code> now clears the object bit when removing the
<code>class</code> attribute of a value via <code>na.action</code> (<a href="https://bugs.R-project.org/show_bug.cgi?id=18100">PR#18100</a>).
</p>
</li>
<li> <p><code>charClass()</code> now works with multi-character
strings on Windows (<a href="https://bugs.R-project.org/show_bug.cgi?id=18104">PR#18104</a>, fixed by Bill Dunlap).
</p>
</li>
<li> <p><code>encodeString()</code> on Solaris now works again in Latin-1
encoding on characters represented differently in UTF-8. Support for
surrogate pairs on Solaris has been improved.
</p>
</li>
<li> <p><code>file.show()</code> on Windows now works with non-ASCII path
names representable in the current native encoding (<a href="https://bugs.R-project.org/show_bug.cgi?id=18132">PR#18132</a>).
</p>
</li>
<li><p> Embedded <span class="rlang"><b>R</b></span> on Windows can now find <span class="rlang"><b>R</b></span> home directory via the
registry even when installed only for the current user (<a href="https://bugs.R-project.org/show_bug.cgi?id=18135">PR#18135</a>).
</p>
</li>
<li> <p><code>pretty(x)</code> with finite <code>x</code> now returns finite values
also in the case where the extreme <code>x</code> values are close in size
to the maximal representable number <code>.Machine$double.xmax</code>.
</p>
<p>Also, it's been tweaked for very small ranges and when a boundary is
close (or equal) to zero; e.g., <code>pretty(c(0,1e-317))</code> no longer
has negative numbers, currently still warning about a very small
range, and <code>pretty(2^-(1024 - 2^-1/(c(24,10))))</code> is more accurate.
</p>
</li>
<li><p> The error message for not finding vignette files when weaving
has correct file sizes now. (Thanks to Sebastian Meyer's <a href="https://bugs.R-project.org/show_bug.cgi?id=18154">PR#18154</a>.)
</p>
</li>
<li> <p><code>dnbinom(20, <large>, 1)</code> now correctly gives 0, and
similar cases are more accurate with underflow precaution.
(Reported by Francisco Vera Alcivar in <a href="https://bugs.R-project.org/show_bug.cgi?id=18072">PR#18072</a>.)
</p>
</li></ul>
<h3><img src="../help/figures/../../html/Rlogo.svg" class="toplogo" alt="[R logo]"> CHANGES IN R 4.1.0</h3>
<h4>FUTURE DIRECTIONS</h4>
<ul>
<li><p> It is planned that the 4.1.x series will be the last to
support 32-bit Windows, with production of binary packages for
that series continuing until early 2023.
</p>
</li></ul>
<h4>SIGNIFICANT USER-VISIBLE CHANGES</h4>
<ul>
<li><p> Data set <code>esoph</code> in package <span class="pkg">datasets</span> now provides
the correct numbers of controls; previously it had the numbers of
cases added to these. (Reported by Alexander Fowler in <a href="https://bugs.R-project.org/show_bug.cgi?id=17964">PR#17964</a>.)
</p>
</li></ul>
<h4>NEW FEATURES</h4>
<ul>
<li> <p>‘<span class="samp">⁠www.omegahat.net⁠</span>’ is no longer one of the repositories
known by default to <code>setRepositories()</code>. (Nowadays it only
provides source packages and is often unavailable.)
</p>
</li>
<li><p> Function <code>package_dependencies()</code> (in package
<span class="pkg">tools</span>) can now use different dependency types for direct and
recursive dependencies.
</p>
</li>
<li><p> The checking of the size of tarball in
<code>R CMD check --as-cran <pkg></code> may be tweaked via the new
environment variable
<span class="env">_R_CHECK_CRAN_INCOMING_TARBALL_THRESHOLD_</span>, as suggested in
<a href="https://bugs.R-project.org/show_bug.cgi?id=17777">PR#17777</a> by Jan Gorecki.
</p>
</li>
<li><p> Using <code>c()</code> to combine a factor with other factors now
gives a factor, an ordered factor when combining ordered factors
with identical levels.
</p>
</li>
<li> <p><code>apply()</code> gains a <code>simplify</code> argument to allow
disabling of simplification of results.
</p>
</li>
<li><p> The <code>format()</code> method for class <code>"ftable"</code> gets a
new option <code>justify</code>. (Suggested by Thomas Soeiro.)
</p>
</li>
<li><p> New <code>...names()</code> utility. (Proposed by Neal Fultz in
<a href="https://bugs.R-project.org/show_bug.cgi?id=17705">PR#17705</a>.)
</p>
</li>
<li> <p><code>type.convert()</code> now warns when its <code>as.is</code> argument
is not specified, as the help file always said it <em>should</em>. In
that case, the default is changed to <code>TRUE</code> in line with its
change in <code>read.table()</code> (related to <code>stringsAsFactors</code>) in
<span class="rlang"><b>R</b></span> 4.0.0.
</p>
</li>
<li><p> When printing list arrays, classed objects are now shown
<em>via</em> their <code>format()</code> value if this is a short enough
character string, or by giving the first elements of their class
vector and their length.
</p>
</li>
<li> <p><code>capabilities()</code> gets new entry <code>"Rprof"</code> which is
<code>TRUE</code> when <span class="rlang"><b>R</b></span> has been configured with the equivalent of
<code>--enable-R-profiling</code> (as it is by default). (Related to
Michael Orlitzky's report <a href="https://bugs.R-project.org/show_bug.cgi?id=17836">PR#17836</a>.)
</p>
</li>
<li> <p><code>str(xS4)</code> now also shows extraneous attributes of an
S4 object <code>xS4</code>.
</p>
</li>
<li><p> Rudimentary support for vi-style tags in <code>rtags()</code> and
<code>R CMD rtags</code> has been added. (Based on a patch from
Neal Fultz in <a href="https://bugs.R-project.org/show_bug.cgi?id=17214">PR#17214</a>.)
</p>
</li>
<li> <p><code>checkRdContents()</code> is now exported from <span class="pkg">tools</span>; it
and also <code>checkDocFiles()</code> have a new option <code>chkInternal</code>
allowing to check Rd files marked with keyword <code>"internal"</code> as
well. The latter can be activated for <code>R CMD check</code> via
environment variable <span class="env">_R_CHECK_RD_INTERNAL_TOO_</span>.
</p>
</li>
<li><p> New functions <code>numToBits()</code> and <code>numToInts()</code>
extend the <code>raw</code> conversion utilities to (double precision)
<code>numeric</code>.
</p>
</li>
<li><p> Functions <code>URLencode()</code> and <code>URLdecode()</code> in
package <span class="pkg">utils</span> now work on vectors of <abbr>URI</abbr>s.
(Based on patch from Bob Rudis submitted with <a href="https://bugs.R-project.org/show_bug.cgi?id=17873">PR#17873</a>.)
</p>
</li>
<li> <p><code>path.expand()</code> can expand ‘<span class="samp">⁠~user⁠</span>’ on most
Unix-alikes even when <code>readline</code> is not in use. It tries
harder to expand ‘<span class="samp">⁠~⁠</span>’, for example should environment variable
<span class="env">HOME</span> be unset.
</p>
</li>
<li><p> For HTML help (both dynamic and static), Rd file links to
help pages in external packages are now treated as references to
topics rather than file names, and fall back to a file link only
if the topic is not found in the target package. The earlier rule
which prioritized file names over topics can be restored by
setting the environment variable <span class="env">_R_HELP_LINKS_TO_TOPICS_</span> to
a false value.
</p>
</li>
<li> <p><code>c()</code> now removes <code>NULL</code> arguments before
dispatching to methods, thus simplifying the implementation of
<code>c()</code> methods, <em>but</em> for back compatibility keeps
<code>NULL</code> when it is the first argument. (From a report and
patch proposal by Lionel Henry in <a href="https://bugs.R-project.org/show_bug.cgi?id=17900">PR#17900</a>.)
</p>
</li>
<li> <p><code>Vectorize()</code>'s result function's environment no longer
keeps unneeded objects.
</p>
</li>
<li><p> Function <code>...elt()</code> now propagates visibility
consistently with <code>..n</code>. (Thanks to Lionel Henry's
<a href="https://bugs.R-project.org/show_bug.cgi?id=17905">PR#17905</a>.)
</p>
</li>
<li> <p><code>capture.output()</code> no longer uses non-standard
evaluation to evaluate its arguments. This makes evaluation of
functions like <code>parent.frame()</code> more consistent. (Thanks to
Lionel Henry's <a href="https://bugs.R-project.org/show_bug.cgi?id=17907">PR#17907</a>.)
</p>
</li>
<li> <p><code>packBits(bits, type="double")</code> now works as inverse of
<code>numToBits()</code>. (Thanks to Bill Dunlap's proposal in
<a href="https://bugs.R-project.org/show_bug.cgi?id=17914">PR#17914</a>.)
</p>
</li>
<li> <p><code>curlGetHeaders()</code> has two new arguments,
<code>timeout</code> to specify the timeout for that call (overriding
<code>getOption("timeout")</code>) and <code>TLS</code> to specify the minimum
<abbr>TLS</abbr> protocol version to be used for <code>https://</code> <abbr>URI</abbr>s
(<em>inter alia</em> providing a means to check for sites using
deprecated <abbr>TLS</abbr> versions 1.0 and 1.1).
</p>
</li>
<li><p> For <code>nls()</code>, an optional constant <code>scaleOffset</code>
may be added to the denominator of the relative offset convergence
test for cases where the fit of a model is expected to be exact,
thanks to a proposal by John Nash. <code>nls(*, trace=TRUE)</code> now
also shows the convergence criterion.
</p>
</li>
<li><p> Numeric differentiation <em>via</em> <code>numericDeriv()</code>
gets new optional arguments <code>eps</code> and <code>central</code>, the
latter for taking central divided differences. The latter can be
activated for <code>nls()</code> via <code>nls.control(nDcentral =
TRUE)</code>.
</p>
</li>
<li> <p><code>nls()</code> now passes the <code>trace</code> and <code>control</code>
arguments to <code>getInitial()</code>, notably for all self-starting models,
so these can also be fit in zero-noise situations via a
<code>scaleOffset</code>. For this reason, the <code>initial</code> function of a
<code>selfStart</code> model must now have <code>...</code> in its argument list.
</p>
</li>
<li> <p><code>bquote(splice = TRUE)</code> can now splice expression
vectors with attributes: this makes it possible to splice the
result of <code>parse(keep.source = TRUE)</code>. (Report and patch
provided by Lionel Henry in <a href="https://bugs.R-project.org/show_bug.cgi?id=17869">PR#17869</a>.)
</p>
</li>
<li> <p><code>textConnection()</code> gets an optional <code>name</code> argument.
</p>
</li>
<li> <p><code>get()</code>, <code>exists()</code>, and <code>get0()</code> now signal
an error if the first argument has length greater than 1.
Previously additional elements were silently ignored. (Suggested
by Antoine Fabri on R-devel.)
</p>
</li>
<li> <p><span class="rlang"><b>R</b></span> now provides a shorthand notation for creating functions,
e.g. <code>\(x) x + 1</code> is parsed as <code>function(x) x + 1</code>.
</p>
</li>
<li> <p><span class="rlang"><b>R</b></span> now provides a simple native forward pipe syntax
<code>|></code>. The simple form of the forward pipe inserts the
left-hand side as the first argument in the right-hand side call.
The pipe implementation as a syntax transformation was motivated
by suggestions from Jim Hester and Lionel Henry.
</p>
</li>
<li> <p><code>all.equal(f, g)</code> for <code>function</code>s now by default also
compares their <code>environment(.)</code>s, notably via new
<code>all.equal</code> method for class <code>function</code>. Comparison of
<code>nls()</code> fits, e.g., may now need <code>all.equal(m1, m2,
check.environment = FALSE)</code>.
</p>
</li>
<li> <p><code>.libPaths()</code> gets a new option <code>include.site</code>,
allowing to <em>not</em> include the site library. (Thanks to
Dario Strbenac's suggestion and Gabe Becker's <a href="https://bugs.R-project.org/show_bug.cgi?id=18016">PR#18016</a>.)
</p>
</li>
<li><p> Lithuanian translations are now available. (Thanks to
Rimantas Žakauskas.)
</p>
</li>
<li> <p><code>names()</code> now works for <code>DOTSXP</code> objects. On the
other hand, in ‘<span class="file">R-lang</span>’, the R language manual, we now warn
against relying on the structure or even existence of such
dot-dot-dot objects.
</p>
</li>
<li> <p><code>all.equal()</code> no longer gives an error on <code>DOTSXP</code>
objects.
</p>
</li>
<li> <p><code>capabilities("cairo")</code> now applies only to the
file-based devices as it is now possible (if very unusual) to
build <span class="rlang"><b>R</b></span> with Cairo support for those but not for <code>X11()</code>.
</p>
</li>
<li><p> There is optional support for tracing the progress of
<code>loadNamespace()</code> — see its help.
</p>
</li>
<li><p> (Not Windows.)
<code>l10n_info()</code> reports an additional element, the name of the
encoding as reported by the OS (which may differ from the
encoding part (if any) of the result from
<code>Sys.getlocale("LC_CTYPE")</code>).
</p>
</li>
<li><p> New function <code>gregexec()</code> which generalizes <code>regexec()</code>
to find <em>all</em> disjoint matches and all substrings
corresponding to parenthesized subexpressions of the given regular
expression. (Contributed by Brodie Gaslam.)
</p>
</li>
<li><p> New function <code>charClass()</code> in package <span class="pkg">utils</span> to
query the wide-character classification functions in use (such as
<code>iswprint</code>).
</p>
</li>
<li><p> The names of <code>quantile()</code>'s result no longer depend on the
global <code>getOption("digits")</code>, but <code>quantile()</code> gets a new
optional argument <code>digits = 7</code> instead.
</p>
</li>
<li> <p><code>grep()</code>, <code>sub()</code>, <code>regexp</code> and variants work
considerably faster for long factors with few levels. (Thanks to
Michael Chirico's <a href="https://bugs.R-project.org/show_bug.cgi?id=18063">PR#18063</a>.)
</p>
</li>
<li><p> Provide grouping of <code>x11()</code> graphics windows within
a window manager such as <code>Gnome</code> or <code>Unity</code>; thanks to a
patch by Ivan Krylov posted to R-devel.
</p>
</li>
<li><p> The <code>split()</code> method for class <code>data.frame</code> now
allows the <code>f</code> argument to be specified as a formula.
</p>
</li>
<li> <p><code>sprintf</code> now warns on arguments unused by the format
string.
</p>
</li>
<li><p> New palettes <code>"Rocket"</code> and <code>"Mako"</code> for
<code>hcl.colors()</code> (approximating palettes of the same name
from the <span class="pkg">viridisLite</span> package).
</p>
<p>Contributed by Achim Zeileis.
</p>
</li>
<li><p> The base environment and its namespace are now locked (so
one can no longer add bindings to these or remove from these).
</p>
</li>
<li> <p><code>Rterm</code> handling of multi-byte characters has been
improved, allowing use of such characters when supported by the
current locale.
</p>
</li>
<li> <p><code>Rterm</code> now accepts <code>ALT+ +xxxxxxxx</code> sequences to
enter Unicode characters as hex digits.
</p>
</li>
<li><p> Environment variable <span class="env">LC_ALL</span> on Windows now takes
precedence over <span class="env">LC_CTYPE</span> and variables for other supported
categories, matching the POSIX behaviour.
</p>
</li>
<li> <p><code>duplicated()</code> and <code>anyDuplicated()</code> are now
optimized for integer and real vectors that are known to be sorted
via the ALTREP framework. Contributed by Gabriel Becker via <a href="https://bugs.R-project.org/show_bug.cgi?id=17993">PR#17993</a>.
</p>
</li></ul>
<h4>GRAPHICS</h4>
<ul>
<li><p> The graphics engine version, <code>R_GE_version</code>, has been
bumped to <code>14</code> and so packages that provide graphics devices
should be reinstalled.
</p>
</li>
<li><p> Graphics devices should now specify <code>deviceVersion</code> to
indicate what version of the graphics engine they support.
</p>
</li>
<li><p> Graphics devices can now specify <code>deviceClip</code>. If
<code>TRUE</code>, the graphics engine will never perform any clipping
of output itself.
</p>
<p>The clipping that the graphics engine does perform (for both
<code>canClip = TRUE</code> and <code>canClip = FALSE</code>) has been
improved to avoid producing unnecessary artifacts in clipped
output.
</p>
</li>
<li><p> The <span class="pkg">grid</span> package now allows <code>gpar(fill)</code> to be
a <code>linearGradient()</code>, a <code>radialGradient()</code>, or a
<code>pattern()</code>. The <code>viewport(clip)</code> can now also be
a grob, which defines a clipping path, and there is a new
<code>viewport(mask)</code> that can also be a grob, which defines
a mask.
</p>
<p>These new features are only supported so far on the Cairo-based
graphics devices and on the <code>pdf()</code> device.
</p>
</li>
<li><p> (Not Windows.)
A warning is given when a Cairo-based type is specified for a
<code>png()</code>, <code>jpeg()</code>, <code>tiff()</code> or <code>bmp()</code>
device but Cairo is unsupported (so <code>type = "Xlib"</code>
is tried instead).
</p>
</li>
<li> <p><code>grSoftVersion()</code> now reports the versions of FreeType
and FontConfig if they are used directly (not <em>via</em> Pango),
as is most commonly done on macOS.
</p>
</li></ul>
<h4>C-LEVEL FACILITIES</h4>
<ul>
<li><p> The <em>standalone</em> ‘<span class="file">libRmath</span>’ math library and <span class="rlang"><b>R</b></span>'s C
API now provide <code>log1pexp()</code> again as documented, and gain
<code>log1mexp()</code>.
</p>
</li></ul>
<h4>INSTALLATION on a UNIX-ALIKE</h4>
<ul>
<li> <p><code>configure</code> checks for a program <code>pkgconf</code>
if program <code>pkg-config</code> is not found. These are now only
looked for on the path (like almost all other programs) so if needed
specify a full path to the command in <code>PKG_CONFIG</code>, for example
in file ‘<span class="file">config.site</span>’.
</p>
</li>
<li><p> C99 function <code>iswblank</code> is required – it was last seen
missing ca 2003 so the workaround has been removed.
</p>
</li>
<li><p> There are new <code>configure</code> options
<span class="option">--with-internal-iswxxxxx</span>,
<span class="option">--with-internal-towlower</span> and
<span class="option">--with-internal-wcwidth</span> which allows the system functions
for wide-character classification, case-switching and width
(<code>wcwidth</code> and <code>wcswidth</code>) to be replaced by internal
ones. The first has long been used on macOS, AIX (and Windows)
but this enables it to be unselected there and selected for other
platforms (it is the new default on Solaris). The second is new
in this version of <span class="rlang"><b>R</b></span> and is selected by default on macOS and
Solaris. The third has long been the default and remains so as it
contains customizations for East Asian languages.
</p>
<p>System versions of these functions are often minimally implemented
(sometimes only for ASCII characters) and may not cover the full
range of Unicode points: for example Solaris (and Windows) only
cover the Basic Multilingual Plane.
</p>
</li>
<li><p> Cairo installations without X11 are more likely to be
detected by <code>configure</code>, when the file-based Cairo
graphics devices will be available but not <code>X11(type =
"cairo")</code>.
</p>
</li>
<li><p> There is a new <code>configure</code> option
<span class="option">--with-static-cairo</span> which is the default on macOS. This
should be used when only static cairo (and where relevant, Pango)
libraries are available.
</p>
</li>
<li> <p>Cairo-based graphics devices on platforms without Pango but
with FreeType/FontConfig will make use of the latter for font selection.
</p>
</li></ul>
<h4>LINK-TIME OPTIMIZATION on a UNIX-ALIKE</h4>
<ul>
<li><p> Configuring with flag <span class="option">--enable-lto=R</span> now also uses
<abbr>LTO</abbr> when installing the recommended packages.
</p>
</li>
<li> <p><code>R CMD INSTALL</code> and <code>R CMD SHLIB</code> have a new
flag <span class="option">--use-LTO</span> to use <abbr>LTO</abbr> when compiling code, for use
with <span class="rlang"><b>R</b></span> configured with <span class="option">--enable-lto=R</span>. For <span class="rlang"><b>R</b></span>
configured with <span class="option">--enable-lto</span>, they have the new flag
<span class="option">--no-use-LTO</span>.
</p>
<p>Packages can opt in or out of <abbr>LTO</abbr> compilation <em>via</em> a
‘<span class="samp">⁠UseLTO⁠</span>’ field in the ‘<span class="file">DESCRIPTION</span>’ file. (As usual this
can be overridden by the command-line flags.)
</p>
</li></ul>
<h4>BUILDING R on Windows</h4>
<ul>
<li><p> for GCC <code class="reqn">\ge</code> 8, <code>FC_LEN_T</code> is defined in
‘<span class="file">config.h</span>’ and hence character lengths are passed from C to
Fortran in <em>inter alia</em> BLAS and LAPACK calls.
</p>
</li>
<li><p> There is a new text file
‘<span class="file">src/gnuwin32/README.compilation</span>’, which outlines how C/Fortran
code compilation is organized and documents new features:
</p>
<ul>
<li> <p><span class="rlang"><b>R</b></span> can be built with Link-Time Optimization with a
suitable compiler – doing so with GCC 9.2 showed several
inconsistencies which have been corrected.
</p>
</li>
<li><p> There is support for cross-compiling the C and Fortran
code in <span class="rlang"><b>R</b></span> and standard packages on suitable (Linux) platforms.
This is mainly intended to allow developers to test later
versions of compilers – for example using GCC 9.2 or 10.x has
detected issues that GCC 8.3 in Rtools40 does not.
</p>
</li>
<li><p> There is experimental support for cross-building <span class="rlang"><b>R</b></span>
packages with C, C++ and/or Fortran code.
</p>
</li></ul>
</li>
<li><p> The R installer can now be optionally built to support a single
architecture (only 64-bit or only 32-bit).
</p>
</li></ul>
<h4>PACKAGE INSTALLATION</h4>
<ul>
<li><p> The default C++ standard has been changed to C++14 where
available (which it is on all currently checked platforms): if not
(as before) C++11 is used if available otherwise C++ is not
supported.
</p>
<p>Packages which specify C++11 will still be installed using C++11.
</p>
<p>C++14 compilers may give deprecation warnings, most often for
<code>std::random_shuffle</code> (deprecated in C++14 and removed in
C++17). Either specify C++11 (see ‘Writing R Extensions’)
or modernize the code and if needed specify C++14. The latter has
been supported since <span class="rlang"><b>R</b></span> 3.4.0 so the package's ‘<span class="file">DESCRIPTION</span>’
would need to include something like
</p>
<pre>
Depends: R (>= 3.4)
</pre>
</li></ul>
<h4>PACKAGE INSTALLATION on Windows</h4>
<ul>
<li> <p><code>R CMD INSTALL</code> and <code>R CMD SHLIB</code> make use
of their flag <span class="option">--use-LTO</span> when the ‘<span class="samp">⁠LTO_OPT⁠</span>’ make
macro is set in file ‘<span class="file">etc/${R_ARCH}/Makeconf</span>’ or in a
personal/site ‘<span class="file">Makevars</span>’ file. (For details see
‘Writing R Extensions’ §4.5.)
</p>
<p>This provides a valuable check on code consistency. It does work
with GCC 8.3 as in Rtools40, but that does not detect everything
the <abbr>CRAN</abbr> checks with current GCC do.
</p>
</li></ul>
<h4>PACKAGE INSTALLATION on macOS</h4>
<ul>
<li><p> The default personal library directory on builds with
<span class="option">--enable-aqua</span> (including <abbr>CRAN</abbr> builds) now
differs by CPU type, one of
</p>
<pre>
~/Library/R/x86_64/x.y/library
~/Library/R/arm64/x.y/library
</pre>
<p>This uses the CPU type <span class="rlang"><b>R</b></span> (and hence the packages) were built for,
so when a ‘<span class="samp">⁠x86_64⁠</span>’ build of R is run under Rosetta emulation on
an ‘<span class="samp">⁠arm64⁠</span>’ Mac, the first is used.
</p>
</li></ul>
<h4>UTILITIES</h4>
<ul>
<li> <p><code>R CMD check</code> can now scan package functions for
bogus <code>return</code> statements, which were possibly intended as
<code>return()</code> calls (wish of <a href="https://bugs.R-project.org/show_bug.cgi?id=17180">PR#17180</a>, patch by Sebastian
Meyer). This check can be activated via the new environment
variable <span class="env">_R_CHECK_BOGUS_RETURN_</span>, true for <code>--as-cran</code>.
</p>
</li>
<li> <p><code>R CMD build</code> omits tarballs and binaries of
previous builds from the top-level package directory.
(<a href="https://bugs.R-project.org/show_bug.cgi?id=17828">PR#17828</a>, patch by Sebastian Meyer.)
</p>
</li>
<li> <p><code>R CMD check</code> now runs sanity checks on the use of
‘<span class="samp">⁠LazyData⁠</span>’, for example that a ‘<span class="file">data</span>’ directory is
present and that ‘<span class="samp">⁠LazyDataCompression⁠</span>’ is not specified
without ‘<span class="samp">⁠LazyData⁠</span>’ and has a documented value. For packages
with large LazyData databases without specifying
‘<span class="samp">⁠LazyDataCompression⁠</span>’, there is a reference to the code given
in ‘Writing R Extensions’ §1.1.6 to test the choice of
compression (as in all the <abbr>CRAN</abbr> packages tested a
non-default method was preferred).
</p>
</li>
<li> <p><code>R CMD build</code> removes ‘<span class="samp">⁠LazyData⁠</span>’ and
‘<span class="samp">⁠LazyDataCompression⁠</span>’ fields from the ‘<span class="file">DESCRIPTION</span>’ file
of packages without a ‘<span class="file">data</span>’ directory.
</p>
</li></ul>
<h4>ENCODING-RELATED CHANGES</h4>
<ul>
<li><p> The parser now treats ‘<span class="samp">⁠\Unnnnnnnn⁠</span>’ escapes larger than
the upper limit for Unicode points (‘<span class="samp">⁠\U10FFFF⁠</span>’) as an error
as they cannot be represented by valid UTF-8.
</p>
<p>Where such escapes are used for outputting non-printable
(including unassigned) characters, 6 hex digits are used (rather
than 8 with leading zeros). For clarity, braces are used, for
example ‘<span class="samp">⁠\U{0effff}⁠</span>’.
</p>
</li>
<li><p> The parser now looks for non-ASCII spaces on Solaris (as
previously on most other OSes).
</p>
</li>
<li><p> There are warnings (including from the parser) on the use of
unpaired surrogate Unicode points such as ‘<span class="samp">⁠\uD834⁠</span>’. (These
cannot be converted to valid UTF-8.)
</p>
</li>
<li><p> Functions <code>nchar()</code>, <code>tolower()</code>, <code>toupper()</code>
and <code>chartr()</code> and those using regular expressions have more
support for inputs with a marked Latin-1 encoding.
</p>
</li>
<li><p> The character-classification functions used (by default) to
replace the system <code>iswxxxxx</code> functions on Windows, macOS and
AIX have been updated to Unicode 13.0.0.
</p>
<p>The character-width tables have been updated to include new
assignments in Unicode 13.0.0. This included treating all control
characters as having zero width.
</p>
</li>
<li><p> The code for evaluating default (extended) regular
expressions now uses the same character-classification functions
as the rest of <span class="rlang"><b>R</b></span> (previously they differed on Windows, macOS and
AIX).
</p>
</li>
<li><p> There is a build-time option to replace the system's
wide-character <code>wctrans</code> C function by tables shipped with
<span class="rlang"><b>R</b></span>: use <code>configure</code> option
<span class="option">--with-internal-towlower</span> or (on Windows)
‘<span class="samp">⁠-DUSE_RI18N_CASE⁠</span>’ in ‘<span class="samp">⁠CFLAGS⁠</span>’ when building <span class="rlang"><b>R</b></span>. This
may be needed to allow <code>tolower()</code> and <code>toupper()</code> to
work with Unicode characters beyond the Basic Multilingual Plane
where not supported by system functions (e.g. on Solaris where it
is the new default).
</p>
</li>
<li><p> R is more careful when truncating UTF-8 and other multi-byte
strings that are too long to be printed, passed to the system or
libraries or placed into an internal buffer. Truncation will no
longer produce incomplete multibyte characters.
</p>
</li></ul>
<h4>DEPRECATED AND DEFUNCT</h4>
<ul>
<li><p> Function <code>plclust()</code> from the package <span class="pkg">stats</span> and
<code>package.dependencies()</code>, <code>pkgDepends()</code>,
<code>getDepList()</code>, <code>installFoundDepends()</code>, and
<code>vignetteDepends()</code> from package <span class="pkg">tools</span> are defunct.
</p>
</li>
<li><p> Defunct functions <code>checkNEWS()</code> and <code>readNEWS()</code> from
package <span class="pkg">tools</span> and <code>CRAN.packages()</code> from <span class="pkg">utils</span> have
been removed.
</p>
</li>
<li> <p><code>R CMD config CXXCPP</code> is defunct (it was deprecated
in <span class="rlang"><b>R</b></span> 3.6.2).
</p>
</li>
<li> <p><code>parallel::detectCores()</code> drops support for IRIX
(retired in 2013).
</p>
</li>
<li><p> The <code>LINPACK</code> argument to <code>chol.default()</code>,
<code>chol2inv()</code>, <code>solve.default()</code> and <code>svd()</code> has
been defunct since <span class="rlang"><b>R</b></span> 3.1.0. It was silently ignored up to <span class="rlang"><b>R</b></span>
4.0.3 but now gives an error.
</p>
</li>
<li><p> Subsetting/indexing, such as <code>ddd[*]</code> or <code>ddd$x</code>
on a <code>DOTSXP</code> (dot-dot-dot) object <code>ddd</code> has been
disabled; it worked by accident only and was undocumented.
</p>
</li></ul>
<h4>BUG FIXES</h4>
<ul>
<li><p> Many more C-level allocations (mainly by <code>malloc</code> and
<code>strdup</code>) are checked for success with suitable alternative
actions.
</p>
</li>
<li><p> Bug fix for <code>replayPlot()</code>; this was turning off
graphics engine display list recording if a recorded plot was
replayed in the same session. The impact of the bug became
visible if resize the device after replay OR if attempted another
<code>savePlot()</code> after replay (empty display list means empty
screen on resize or empty saved plot).
</p>
</li>
<li> <p><code>R CMD check</code> etc now warn when a package exports
non-existing S4 classes or methods, also in case of no
“methods” presence. (Reported by Alex Bertram;
reproducible example and patch by Sebastian Meyer in <a href="https://bugs.R-project.org/show_bug.cgi?id=16662">PR#16662</a>.)
</p>
</li>
<li> <p><code>boxplot()</code> now also accepts <code>call</code>s for labels such
as <code>ylab</code>, the same as <code>plot()</code>.
(Reported by Marius Hofert.)
</p>
</li>
<li><p> The help page for <code>xtabs()</code> now correctly states that
<code>addNA</code> is setting <code>na.action = na.pass</code> among others.
(Reported as <a href="https://bugs.R-project.org/show_bug.cgi?id=17770">PR#17770</a> by Thomas Soeiro.)
</p>
</li>
<li><p> The <code>R CMD check <pkg></code> gives a longer and more
comprehensible message when ‘<span class="file">DESCRIPTION</span>’ misses dependencies,
e.g., in <code>Imports:</code>. (Thanks to the contributors of <a href="https://bugs.R-project.org/show_bug.cgi?id=17179">PR#17179</a>.)
</p>
</li>
<li> <p><code>update.default()</code> now calls the generic <code>update()</code>
on the formula to work correctly for models with extended formulas.
(As reported and suggested by Neal Fultz in <a href="https://bugs.R-project.org/show_bug.cgi?id=17865">PR#17865</a>.)
</p>
</li>
<li><p> The horizontal position of leaves in a dendrogram is now
correct also with <code>center = FALSE</code>. (<a href="https://bugs.R-project.org/show_bug.cgi?id=14938">PR#14938</a>, patch from
Sebastian Meyer.)
</p>
</li>
<li> <p><code>all.equal.POSIXt()</code> no longer warns about and
subsequently ignores inconsistent <code>"tzone"</code> attributes, but
describes the difference in its return value (<a href="https://bugs.R-project.org/show_bug.cgi?id=17277">PR#17277</a>).
This check can be disabled <em>via</em> the new argument
<code>check.tzone = FALSE</code> as suggested by Sebastian Meyer.
</p>
</li>
<li> <p><code>as.POSIXct()</code> now populates the <code>"tzone"</code>
attribute from its <code>tz</code> argument when <code>x</code> is a logical
vector consisting entirely of <code>NA</code> values.
</p>
</li>
<li> <p><code>x[[2^31]] <- v</code> now works. (Thanks to the report and
patch by Suharto Anggono in <a href="https://bugs.R-project.org/show_bug.cgi?id=17330">PR#17330</a>.)
</p>
</li>
<li><p> In log-scale graphics, <code>axis()</code> ticks and label positions
are now computed more carefully and symmetrically in their range,
typically providing <em>more</em> ticks, fulfilling wishes
in <a href="https://bugs.R-project.org/show_bug.cgi?id=17936">PR#17936</a>. The change really corresponds to an improved
<code>axisTicks()</code> (package <span class="pkg">grDevices</span>), potentially influencing
<span class="pkg">grid</span> and <span class="pkg">lattice</span>, for example.
</p>
</li>
<li> <p><code>qnorm(<very large negative>, log.p=TRUE)</code> is now correct
to at least five digits where it was catastrophically wrong,
previously.
</p>
</li>
<li> <p><code>sum(df)</code> and similar <code>"Summary"</code>- and
<code>"Math"</code>-group member functions now work for data frames
<code>df</code> with <code>logical</code> columns, notably also of zero
rows. (Reported to R-devel by Martin “b706”.)
</p>
</li>
<li> <p><code>unsplit()</code> had trouble with tibbles due to unsound use of
<code>rep(NA, len)</code>-indexing, which should use <code>NA_integer_</code>
(Reported to R-devel by Mario Annau.)
</p>
</li>
<li> <p><code>pnorm(x, log.p = TRUE)</code> underflows to <code>-Inf</code> slightly
later.
</p>
</li>
<li> <p><code>show(<hidden S4 generic>)</code> prints better and without
quotes for non-hidden S4 generics.
</p>
</li>
<li> <p><code>read.table()</code> and relatives treated an "NA" column name as
missing when <code>check.names = FALSE</code> <a href="https://bugs.R-project.org/show_bug.cgi?id=18007">PR#18007</a>.
</p>
</li>
<li><p> Parsing strings containing UTF-16 surrogate pairs such as
<code>"\uD834\uDD1E"</code> works better on some (uncommon) platforms.
<code>sprintf("%X", utf8ToInt("\uD834\uDD1E"))</code> should now give
<code>"1D11E"</code> on all platforms.
</p>
</li>
<li> <p><code>identical(x,y)</code> is no longer true for differing
<code>DOTSXP</code> objects, fixing <a href="https://bugs.R-project.org/show_bug.cgi?id=18032">PR#18032</a>.
</p>
</li>
<li> <p><code>str()</code> now works correctly for <code>DOTSXP</code> and related
exotics, even when these are doomed.
</p>
<p>Additionally, it no longer fails for <code>list</code>s with a <code>class</code> and
“irregular” method definitions such that e.g. <code>lapply(*)</code> will
necessarily fail, as currently for different <a href="https://CRAN.R-project.org/package=igraph"><span class="pkg">igraph</span></a> objects.
</p>
</li>
<li><p> Message translation domains, e.g., for errors and warnings, are
now correctly determined also when e.g., a <span class="pkg">base</span> function is
called from “top-level” function (i.e., defined in <code>globalenv()</code>),
thanks to a patch from Joris Goosen fixing <a href="https://bugs.R-project.org/show_bug.cgi?id=17998">PR#17998</a>.
</p>
</li>
<li><p> Too long lines in environment files (e.g., ‘<span class="file">Renviron</span>’) no
longer crash <span class="rlang"><b>R</b></span>. This limit has been increased to 100,000 bytes.
(<a href="https://bugs.R-project.org/show_bug.cgi?id=18001">PR#18001</a>.)
</p>
</li>
<li><p> There is a further workaround for FreeType giving
incorrect italic font faces with cairo-based graphics devices on
macOS.
</p>
</li>
<li> <p><code>add_datalist(*, force = TRUE)</code> (from package
<span class="pkg">tools</span>) now actually updates an existing ‘<span class="file">data/datalist</span>’
file for new content. (Thanks to a report and patch by Sebastian
Meyer in <a href="https://bugs.R-project.org/show_bug.cgi?id=18048">PR#18048</a>.)
</p>
</li>
<li> <p><code>cut.Date()</code> and <code>cut.POSIXt()</code> could produce an
empty last interval for <code>breaks = "months"</code> or <code>breaks =
"years"</code>. (Reported as <a href="https://bugs.R-project.org/show_bug.cgi?id=18053">PR#18053</a> by Christopher Carbone.)
</p>
</li>
<li><p> Detection of the encoding of ‘regular’ macOS locales
such as ‘<span class="samp">⁠en_US⁠</span>’ (which is UTF-8) had been broken by a macOS
change: fortunately these are now rarely used with
‘<span class="samp">⁠en_US.UTF-8⁠</span>’ being preferred.
</p>
</li>
<li> <p><code>sub()</code> and <code>gsub(pattern, repl, x, *)</code> now keep
attributes of <code>x</code> such as <code>names()</code> also when
<code>pattern</code> is <code>NA</code> (<a href="https://bugs.R-project.org/show_bug.cgi?id=18079">PR#18079</a>).
</p>
</li>
<li><p> Time differences (<code>"difftime"</code> objects) get a replacement
and a <code>rep()</code> method to keep <code>"units"</code> consistent.
(Thanks to a report and patch by Nicolas Bennett in <a href="https://bugs.R-project.org/show_bug.cgi?id=18066">PR#18066</a>.)
</p>
</li>
<li><p> The <code style="white-space: pre;">⁠\RdOpts⁠</code> macro, setting defaults for <code style="white-space: pre;">⁠\Sexpr⁠</code>
options in an Rd file, had been ineffective since <span class="rlang"><b>R</b></span> 2.12.0: it
now works again.
(Thanks to a report and patch by Sebastian Meyer in <a href="https://bugs.R-project.org/show_bug.cgi?id=18073">PR#18073</a>.)
</p>
</li>
<li> <p><code>mclapply</code> and <code>pvec</code> no longer accidentally terminate
parallel processes started before by <code>mcparallel</code> or related
calls in package <span class="pkg">parallel</span> (<a href="https://bugs.R-project.org/show_bug.cgi?id=18078">PR#18078</a>).
</p>
</li>
<li> <p><code>grep</code> and other functions for evaluating (extended)
regular expressions handle in Unicode also strings not explicitly
flagged UTF-8, but flagged native when running in UTF-8 locale.
</p>
</li>
<li><p> Fixed a crash in <code>fifo</code> implementation on Windows
(<a href="https://bugs.R-project.org/show_bug.cgi?id=18031">PR#18031</a>).
</p>
</li>
<li><p> Binary mode in <code>fifo</code> on Windows is now properly detected
from argument <code>open</code> (<a href="https://bugs.R-project.org/show_bug.cgi?id=15600">PR#15600</a>, <a href="https://bugs.R-project.org/show_bug.cgi?id=18031">PR#18031</a>).
</p>
</li></ul>
<h3><img src="../help/figures/../../html/Rlogo.svg" class="toplogo" alt="[R logo]"> CHANGES IN R 4.0.5</h3>
<h4>BUG FIXES</h4>
<ul>
<li><p> The change to the internal table in <span class="rlang"><b>R</b></span> 4.0.4 for
<code>iswprint</code> has been reverted: it contained some errors in
printability of ‘East Asian’ characters.
</p>
</li>
<li><p> For packages using ‘<span class="samp">⁠LazyData⁠</span>’, <code>R CMD build</code>
ignored the <span class="option">--resave-data</span> option and the
‘<span class="samp">⁠BuildResaveData⁠</span>’ field of the ‘<span class="file">DESCRIPTION</span>’ file (in <span class="rlang"><b>R</b></span>
versions 4.0.0 to 4.0.4).
</p>
</li></ul>
<h3><img src="../help/figures/../../html/Rlogo.svg" class="toplogo" alt="[R logo]"> CHANGES IN R 4.0.4</h3>
<h4>NEW FEATURES</h4>
<ul>
<li><p> File ‘<span class="file">share/texmf/tex/latex/jss.cls</span>’ has been updated
to work with LaTeX versions since Oct 2020.
</p>
</li>
<li><p> Unicode character width tables (as used by
<code>nchar(, type = "w")</code>) have been updated to Unicode 12.1
by Brodie Gaslam (<a href="https://bugs.R-project.org/show_bug.cgi?id=17781">PR#17781</a>), including many emoji.
</p>
</li>
<li><p> The internal table for <code>iswprint</code> (used on Windows,
macOS and AIX) has been updated to include many recent Unicode
characters.
</p>
</li></ul>
<h4>INSTALLATION on a UNIX-ALIKE</h4>
<ul>
<li><p> If an external BLAS is specified by <span class="option">--with-blas=foo</span>
or <em>via</em> environment variable <span class="env">BLAS_LIBS</span> is not found,
this is now a configuration error. The previous behaviour was not
clear from the documentation: it was to continue the search as if
<span class="option">--with-blas=yes</span> was specified.
</p>
</li></ul>
<h4>BUG FIXES</h4>
<ul>
<li> <p><code>all.equal(x,y)</code> now “sees” the two different
<code>NA</code>s in factors, thanks to Bill Dunlap and others in
<a href="https://bugs.R-project.org/show_bug.cgi?id=17897">PR#17897</a>.
</p>
</li>
<li> <p><code>(~ NULL)[1]</code> and similar formula subsetting now works,
thanks to a report and patch by Henrik Bengtsson in <a href="https://bugs.R-project.org/show_bug.cgi?id=17935">PR#17935</a>.
Additionally, subsetting leaving an empty formula now works too,
thanks to suggestions by Suharto Anggono.
</p>
</li>
<li> <p><code>.traceback(n)</code> keeps source references again, as before
<span class="rlang"><b>R</b></span> 4.0.0, fixing a regression; introduced by the <a href="https://bugs.R-project.org/show_bug.cgi?id=17580">PR#17580</a>, reported
including two patch proposals by Brodie Gaslam.
</p>
</li>
<li> <p><code>unlist(plst, recursive=FALSE)</code> no longer drops content
for pairlists with list components, thanks to the report and patch
by Suharto Anggono in <a href="https://bugs.R-project.org/show_bug.cgi?id=17950">PR#17950</a>.
</p>
</li>
<li> <p><code>iconvlist()</code> now also works on MUSL based (Linux)
systems, from a report and patch suggestion by Wesley Chan in
<a href="https://bugs.R-project.org/show_bug.cgi?id=17970">PR#17970</a>.
</p>
</li>
<li> <p><code>round()</code> and <code>signif()</code> no longer tolerate wrong
argument names, notably in 1-argument calls; reported by Shane
Mueller on R-devel (mailing list); later reported as <a href="https://bugs.R-project.org/show_bug.cgi?id=17976">PR#17976</a>.
</p>
</li>
<li> <p><code>.Machine</code> has <code>longdouble.*</code> elements only if
<code>capabilities("long.double")</code> is true, as documented.
(Previously they were included if the platform had <code>long
double</code> identical to <code>double</code>, as ARM does.)
</p>
</li>
<li> <p><code>p.adjust(numeric(), n=0)</code> now works, fixing <a href="https://bugs.R-project.org/show_bug.cgi?id=18002">PR#18002</a>.
</p>
</li>
<li> <p><code>identical(x,y)</code> no longer prints "Unknown Type .." for
<code>typeof(x) == "..."</code> objects.
</p>
</li>
<li><p> Fix (auto-)<code>print()</code>ing of named complex vectors, see
<a href="https://bugs.R-project.org/show_bug.cgi?id=17868">PR#17868</a> and <a href="https://bugs.R-project.org/show_bug.cgi?id=18019">PR#18019</a>.
</p>
</li>
<li> <p><code>all.equal(<language>, <...>)</code> now works, fixing <a href="https://bugs.R-project.org/show_bug.cgi?id=18029">PR#18029</a>.
</p>
</li>
<li> <p><code>as.data.frame.list(L, row.names=NULL)</code> now behaves in line
with <code>data.frame()</code>, disregarding names of components of
<code>L</code>, fixing <a href="https://bugs.R-project.org/show_bug.cgi?id=18034">PR#18034</a>, reported by Kevin Tappe.
</p>
</li>
<li> <p><code>checkRdaFiles(ff)$version</code> is now correct also when
<code>ff</code> contains files of different versions, thanks to a report
and patch from Sebastian Meyer in <a href="https://bugs.R-project.org/show_bug.cgi?id=18041">PR#18041</a>.
</p>
</li>
<li><p> macOS: Quartz device live drawing could fail (no plot is shown)
if the system changes the drawing context after view update (often
the case since macOS Big Sur). System log may show
"CGContextDelegateCreateForContext: invalid context" error.
</p>
</li></ul>
<h3><img src="../help/figures/../../html/Rlogo.svg" class="toplogo" alt="[R logo]"> CHANGES IN R 4.0.3</h3>
<h4>NEW FEATURES</h4>
<ul>
<li><p> On platforms using <code>configure</code> option
<span class="option">--with-internal-tzcode</span>, additional values
<code>"internal"</code> and (on macOS only) <code>"macOS"</code> are accepted
for the environment variable <span class="env">TZDIR</span>. (See <code>?TZDIR</code>.)
</p>
<p>On macOS, <code>"macOS"</code> is used by default if the system timezone
database is a newer version than that in the <span class="rlang"><b>R</b></span> installation.
</p>
</li>
<li><p> When <code>install.packages(type = "source")</code> fails to find
a package in a repository it mentions package versions which are
excluded by their <span class="rlang"><b>R</b></span> version requirement and links to hints on
why a package might not be found.
</p>
</li>
<li><p> The default value for <code>options("timeout")</code> can be set
from environment variable <span class="env">R_DEFAULT_INTERNET_TIMEOUT</span>, still
defaulting to 60 (seconds) if that is not set or invalid.
</p>
<p>This may be needed when child <span class="rlang"><b>R</b></span> processes are doing downloads,
for example during the installation of source packages which
download jars or other forms of data.
</p>
</li></ul>
<h4>LINK-TIME OPTIMIZATION on a UNIX-ALIKE</h4>
<ul>
<li><p> There is now support for parallelized Link-Time Optimization
(<abbr>LTO</abbr>) with GCC and for ‘thin’ <abbr>LTO</abbr> with
<code>clang</code> <em>via</em> setting the ‘<span class="samp">⁠LTO⁠</span>’ macro.
</p>
</li>
<li><p> There is support for setting a different <abbr>LTO</abbr> flag for the
Fortran compiler, including to empty when mixing <code>clang</code>
and <code>gfortran</code> (as on macOS). See file ‘<span class="file">config.site</span>’.
</p>
</li>
<li><p> There is a new ‘<span class="samp">⁠LTO_LD⁠</span>’ macro to set linker options for
<abbr>LTO</abbr> compilation, for example to select an alternative linker or
to parallelize thin <abbr>LTO</abbr>.
</p>
</li></ul>
<h4>DEPRECATED AND DEFUNCT</h4>
<ul>
<li><p> The <code>LINPACK</code> argument to <code>chol.default()</code>,
<code>chol2inv()</code>, <code>solve.default()</code> and <code>svd()</code> has been
defunct since <span class="rlang"><b>R</b></span> 3.1.0. Using it now gives a warning which will
become an error in <span class="rlang"><b>R</b></span> 4.1.0.
</p>
</li></ul>
<h4>BUG FIXES</h4>
<ul>
<li><p> The code mitigating stack overflow with PCRE regexps on very
long strings is enabled for PCRE2 < 10.30 also when <abbr>JIT</abbr> is enabled,
since stack overflows have been seen in that case.
</p>
</li>
<li><p> Fix to correctly show the group labels in <code>dotchart()</code>
(which where lost in the <code>ylab</code> improvement for <span class="rlang"><b>R</b></span> 4.0.0).
</p>
</li>
<li> <p><code>addmargins(*, ..)</code> now also works when <code>fn()</code> is a
local function, thanks to bug report and patch <a href="https://bugs.R-project.org/show_bug.cgi?id=17124">PR#17124</a> from Alex
Bertram.
</p>
</li>
<li> <p><code>rank(x)</code> and hence <code>sort(x)</code> now work when <code>x</code>
is an object (as per <code>is.object(x)</code>) of type <code>"raw"</code>
<em>and</em> provides a valid <code>`[`</code> method, e.g., for
<code>gmp::as.bigz(.)</code> numbers.
</p>
</li>
<li> <p><code>chisq.test(*, simulate.p.value=TRUE)</code> and
<code>r2dtable()</code> now work correctly for large table entries (in the
millions). Reported by Sebastian Meyer and investigated by more
helpers in <a href="https://bugs.R-project.org/show_bug.cgi?id=16184">PR#16184</a>.
</p>
</li>
<li><p> Low-level socket read/write operations have been fixed to
correctly signal communication errors. Previously, such errors could
lead to a segfault due to invalid memory access. Reported
and debugged by Dmitriy Selivanov in <a href="https://bugs.R-project.org/show_bug.cgi?id=17850">PR#17850</a>.
</p>
</li>
<li> <p><code>quantile(x, pr)</code> works more consistently for <code>pr</code>
values slightly outside [0,1], thanks to Suharto Anggono's <a href="https://bugs.R-project.org/show_bug.cgi?id=17891">PR#17891</a>.
</p>
<p>Further, <code>quantile(x, prN, names=FALSE)</code> now works even when
<code>prN</code> contains <code>NA</code>s, thanks to Anggono's <a href="https://bugs.R-project.org/show_bug.cgi?id=17892">PR#17892</a>.
Ditto for ordered factors or <code>Date</code> objects
when <code>type = 1</code> or <code>3</code>, thanks to <a href="https://bugs.R-project.org/show_bug.cgi?id=17899">PR#17899</a>.
</p>
</li>
<li><p> Internet access based on libcurl, including
<code>curlGetHeaders()</code>, was not respecting the <code>"timeout"</code>
option. If this causes unanticipated timeouts, consider
increasing the default by setting <span class="env">R_DEFAULT_INTERNET_TIMEOUT</span>.
</p>
</li>
<li> <p><code>as.Date(<char>)</code> now also works with an initial
<code>""</code>, thanks to Michael Chirico's <a href="https://bugs.R-project.org/show_bug.cgi?id=17909">PR#17909</a>.
</p>
</li>
<li> <p><code>isS3stdGeneric(f)</code> now detects an S3 generic also when
it is <code>trace()</code>d, thanks to Gabe Becker's <a href="https://bugs.R-project.org/show_bug.cgi?id=17917">PR#17917</a>.
</p>
</li>
<li> <p><code>R_allocLD()</code> has been fixed to return memory aligned for
long double type <a href="https://bugs.R-project.org/show_bug.cgi?id=16534">PR#16534</a>.
</p>
</li>
<li> <p><code>fisher.test()</code> no longer segfaults when called again after
its internal stack has been exceeded <a href="https://bugs.R-project.org/show_bug.cgi?id=17904">PR#17904</a>.
</p>
</li>
<li><p> Accessing a long vector represented by a compact integer
sequence no longer segfaults (reported and debugged by Hugh
Parsonage).
</p>
</li>
<li> <p><code>duplicated()</code> now works also for strings with multiple
encodings inside a single vector <a href="https://bugs.R-project.org/show_bug.cgi?id=17809">PR#17809</a>.
</p>
</li>
<li> <p><code>phyper(11, 15, 0, 12, log.p=TRUE)</code> no longer gives
<code>NaN</code>; reported as <a href="https://bugs.R-project.org/show_bug.cgi?id=17271">PR#17271</a> by Alexey Stukalov.
</p>
</li>
<li><p> Fix incorrect calculation in <code>logLik.nls()</code> <a href="https://bugs.R-project.org/show_bug.cgi?id=16100">PR#16100</a>, patch
from Sebastian Meyer.
</p>
</li>
<li><p> A very old bug could cause a segfault in <code>model.matrix()</code>
when terms involved logical variables. Part of <a href="https://bugs.R-project.org/show_bug.cgi?id=17879">PR#17879</a>.
</p>
</li>
<li> <p><code>model.frame.default()</code> allowed <code>data = 1</code>, leading to
involuntary variable capture (rest of <a href="https://bugs.R-project.org/show_bug.cgi?id=17879">PR#17879</a>).
</p>
</li>
<li> <p><code>tar()</code> no longer skips non-directory files, thanks to a
patch by Sebastian Meyer, fixing the remaining part of <a href="https://bugs.R-project.org/show_bug.cgi?id=16716">PR#16716</a>.
</p>
</li></ul>
<h3><img src="../help/figures/../../html/Rlogo.svg" class="toplogo" alt="[R logo]"> CHANGES IN R 4.0.2</h3>
<h4>UTILITIES</h4>
<ul>
<li> <p><code>R CMD check</code> skips vignette re-building (with a
warning) if the ‘<span class="samp">⁠VignetteBuilder⁠</span>’ package(s) are not available.
</p>
</li></ul>
<h4>BUG FIXES</h4>
<ul>
<li><p> Paths with non-ASCII characters caused problems for
package loading on Windows <a href="https://bugs.R-project.org/show_bug.cgi?id=17833">PR#17833</a>.
</p>
</li>
<li><p> Using <span class="pkg">tcltk</span> widgets no longer crashes R on
Windows.
</p>
</li>
<li> <p><code>source(*, echo=TRUE)</code> no longer fails in some cases with
empty lines; reported by Bill Dunlap in <a href="https://bugs.R-project.org/show_bug.cgi?id=17769">PR#17769</a>.
</p>
</li>
<li> <p><code>on.exit()</code> now correctly matches named arguments, thanks
to <a href="https://bugs.R-project.org/show_bug.cgi?id=17815">PR#17815</a> (including patch) by Brodie Gaslam.
</p>
</li>
<li> <p><code>regexpr(*, perl=TRUE)</code> no longer returns incorrect
positions into text containing characters outside of the Unicode
Basic Multilingual Plane on Windows.
</p>
</li></ul>
<h3><img src="../help/figures/../../html/Rlogo.svg" class="toplogo" alt="[R logo]"> CHANGES IN R 4.0.1</h3>
<h4>NEW FEATURES</h4>
<ul>
<li> <p><code>paste()</code> and <code>paste0()</code> gain a new optional
argument <code>recycle0</code>. When set to true, zero-length
arguments are recycled leading to <code>character(0)</code> after the
<code>sep</code>-concatenation, i.e., to the empty string <code>""</code> if
<code>collapse</code> is a string and to the zero-length value
<code>character(0)</code> when <code>collapse = NULL</code>.
</p>
<p>A package whose code uses this should depend on ‘<span class="samp">⁠R (>= 4.0.1)⁠</span>’.
</p>
</li>
<li><p> The <code>summary(<warnings>)</code> method now maps the counts
correctly to the warning messages.
</p>
</li></ul>
<h4>BUG FIXES</h4>
<ul>
<li> <p><code>aov(frml, ...)</code> now also works where the <code>formula</code>
deparses to more than 500 characters, thanks to a report and patch
proposal by Jan Hauffa.
</p>
</li>
<li><p> Fix a dozen places (code, examples) as <code>Sys.setlocale()</code>
returns the new rather than the previous setting.
</p>
</li>
<li><p> Fix for adding two complex <span class="pkg">grid</span> units via <code>sum()</code>.
Thanks to Gu Zuguang for the report and Thomas Lin Pedersen for
the patch.
</p>
</li>
<li><p> Fix <code>parallel::mclapply(..., mc.preschedule=FALSE)</code>
to handle raw vector results correctly. <a href="https://bugs.R-project.org/show_bug.cgi?id=17779">PR#17779</a>
</p>
</li>
<li><p> Computing the <code>base</code> value, i.e., 2, “everywhere”,
now uses <code>FLT_RADIX</code>, as the original ‘<span class="file">machar</span>’ code looped
indefinitely on the ppc64 architecture for the <code>longdouble</code> case.
</p>
</li>
<li><p> In <span class="rlang"><b>R</b></span> 4.0.0, <code>sort.list(x)</code> when <code>is.object(x)</code> was
true, e.g., for <code>x <- I(letters)</code>, was accidentally using
<code>method = "radix"</code>. Consequently, e.g., <code>merge(<data.frame>)</code>
was much slower than previously; reported in <a href="https://bugs.R-project.org/show_bug.cgi?id=17794">PR#17794</a>.
</p>
</li>
<li> <p><code>plot(y ~ x, ylab = quote(y[i]))</code> now works, as e.g., for
<code>xlab</code>; related to <a href="https://bugs.R-project.org/show_bug.cgi?id=10525">PR#10525</a>.
</p>
</li>
<li> <p><code>parallel::detect.cores(all.tests = TRUE)</code> tries a
matching OS name before the other tests (which were intended only
for unknown OSes).
</p>
</li>
<li><p> Parse data for raw strings is now recorded correctly. Reported
by Gabor Csardi.
</p>
</li></ul>
<h3><img src="../help/figures/../../html/Rlogo.svg" class="toplogo" alt="[R logo]"> CHANGES IN R 4.0.0</h3>
<h4>SIGNIFICANT USER-VISIBLE CHANGES</h4>
<ul>
<li><p> Packages need to be (re-)installed under this version
(4.0.0) of <span class="rlang"><b>R</b></span>.
</p>
</li>
<li> <p><code>matrix</code> objects now also inherit from class
<code>"array"</code>, so e.g., <code>class(diag(1))</code> is <code>c("matrix",
"array")</code>. This invalidates code incorrectly assuming that
<code>class(matrix_obj))</code> has length one.
</p>
<p>S3 methods for class <code>"array"</code> are now dispatched for
<code>matrix</code> objects.
</p>
</li>
<li><p> There is a new syntax for specifying <em>raw</em> character
constants similar to the one used in C++: <code>r"(...)"</code> with
<code>...</code> any character sequence not containing the sequence
‘<span class="samp">⁠)"⁠</span>’.
This makes it easier to write strings that contain backslashes or
both single and double quotes. For more details see <code>?Quotes</code>.
</p>
</li>
<li> <p><span class="rlang"><b>R</b></span> now uses a ‘<span class="samp">⁠stringsAsFactors = FALSE⁠</span>’ default, and
hence by default no longer converts strings to factors in calls
to <code>data.frame()</code> and <code>read.table()</code>.
</p>
<p>A large number of packages relied on the previous behaviour and
so have needed/will need updating.
</p>
</li>
<li><p> The <code>plot()</code> S3 generic function is now in package
<span class="pkg">base</span> rather than package <span class="pkg">graphics</span>, as it is
reasonable to have methods that do not use the <span class="pkg">graphics</span>
package. The generic is currently re-exported from the
<span class="pkg">graphics</span> namespace to allow packages importing it from
there to continue working, but this may change in future.
</p>
<p>Packages which define S4 generics for <code>plot()</code> should be
re-installed and package code using such generics from other
packages needs to ensure that they are imported rather than rely
on their being looked for on the search path (as in a namespace,
the base namespace has precedence over the search path).
</p>
</li></ul>
<h4>REFERENCE COUNTING</h4>
<ul>
<li><p> Reference counting is now used instead of the <code>NAMED</code>
mechanism for determining when objects can be safely mutated in
base C code. This reduces the need for copying in some cases and
should allow further optimizations in the future. It should
help make the internal code easier to maintain.
</p>
<p>This change is expected to have almost no impact on packages
using supported coding practices in their C/C++ code.
</p>
</li></ul>
<h4>MIGRATION TO PCRE2</h4>
<ul>
<li><p> This version of <span class="rlang"><b>R</b></span> is built against the PCRE2 library for
Perl-like regular expressions, if available. (On non-Windows
platforms PCRE1 can optionally be used if PCRE2 is not available
at build time.) The version of PCRE in use can be obtained
<em>via</em> <code>extSoftVersion()</code>: PCRE1 (formerly known as
‘PCRE’) has versions <= 8, PCRE2 versions >= 10.
</p>
</li>
<li><p> Making PCRE2 available when building <span class="rlang"><b>R</b></span> from source is
strongly recommended (preferably version 10.30 or later) as PCRE1
is no longer developed: version 8.44 is
‘likely to be the final release’.
</p>
</li>
<li><p> PCRE2 reports errors for some regular expressions that were
accepted by PCRE1. A hyphen now has to be escaped in a character
class to be interpreted as a literal (unless first or last in the
class definition). ‘<span class="samp">⁠\R⁠</span>’, ‘<span class="samp">⁠\B⁠</span>’ and ‘<span class="samp">⁠\X⁠</span>’ are no
longer allowed in character classes (PCRE1 treated these as
literals).
</p>
</li>
<li><p> Option <code>PCRE_study</code> is no longer used with PCRE2, and is
reported as <code>FALSE</code> when that is in use.
</p>
</li></ul>
<h4>NEW FEATURES</h4>
<ul>
<li> <p><code>assertError()</code> and <code>assertWarning()</code> (in package
<span class="pkg">tools</span>) can now check for <em>specific</em> error or warning
classes <em>via</em> the new optional second argument <code>classes</code>
(which is not back compatible with previous use of an unnamed second
argument).
</p>
</li>
<li> <p><code>DF2formula()</code>, the utility for the data frame method of
<code>formula()</code>, now works without parsing and explicit evaluation,
starting from Suharto Anggono's suggestion in <a href="https://bugs.R-project.org/show_bug.cgi?id=17555">PR#17555</a>.
</p>
</li>
<li> <p><code>approxfun()</code> and <code>approx()</code> gain a new argument
<code>na.rm</code> defaulting to true. If set to false, missing
<code>y</code> values now propagate into the interpolated values.
</p>
</li>
<li><p> Long vectors are now supported as the <code>seq</code> argument of
a <code>for()</code> loop.
</p>
</li>
<li> <p><code>str(x)</code> gets a new <code>deparse.lines</code> option with a
default to speed it up when <code>x</code> is a large <code>call</code> object.
</p>
</li>
<li><p> The internal traceback object produced when an error is
signalled (<code>.Traceback</code>), now contains the <code>call</code>s
rather than the <em><code>deparse()</code>d</em> calls, deferring the
deparsing to the user-level functions <code>.traceback()</code> and
<code>traceback()</code>. This fulfils the wish of <a href="https://bugs.R-project.org/show_bug.cgi?id=17580">PR#17580</a>, reported
including two patch proposals by Brodie Gaslam.
</p>
</li>
<li> <p><code>data.matrix()</code> now converts character columns to
factors and from this to integers.
</p>
</li>
<li> <p><code>package.skeleton()</code> now explicitly lists all exports
in the ‘<span class="file">NAMESPACE</span>’ file.
</p>
</li>
<li><p> New function <code>.S3method()</code> to register S3 methods in R
scripts.
</p>
</li>
<li> <p><code>file.path()</code> has some support for file paths not in
the session encoding, e.g. with UTF-8 inputs in a
non-UTF-8 locale the output is marked as UTF-8.
</p>
</li>
<li><p> Most functions with file-path inputs will give an explicit
error if a file-path input in a marked encoding cannot be
translated (to the native encoding or in some cases on Windows to
UTF-8), rather than translate to a different file path using
escapes. Some (such as <code>dir.exists()</code>, <code>file.exists()</code>,
<code>file.access()</code>, <code>file.info()</code>, <code>list.files()</code>,
<code>normalizePath()</code> and <code>path.expand()</code>) treat this like
any other non-existent file, often with a warning.
</p>
</li>
<li><p> There is a new help document accessed by
<code>help("file path encoding")</code> detailing how file paths with
marked encodings are handled.
</p>
</li>
<li><p> New function <code>list2DF()</code> for creating data frames from
lists of variables.
</p>
</li>
<li> <p><code>iconv()</code> has a new option <code>sub = "Unicode"</code> to
translate UTF-8 input invalid in the ‘<span class="samp">⁠to⁠</span>’ encoding using
‘<span class="samp">⁠<U+xxxx>⁠</span>’ escapes.
</p>
</li>
<li><p> There is a new function <code>infoRDS()</code> providing information
about the serialization format of a serialized object.
</p>
</li>
<li><p> S3 method lookup now by default skips the elements of the
search path between the global and base environments.
</p>
</li>
<li><p> Added an argument <code>add_datalist(*, small.size = 0)</code> to
allow the creation of a ‘<span class="file">data/datalist</span>’ file even when the
total size of the data sets is small.
</p>
</li>
<li><p> The backquote function <code>bquote()</code> has a new argument
<code>splice</code> to enable splicing a computed list of values into an
expression, like <code>,@</code> in <abbr>LISP</abbr>'s backquote.
</p>
</li>
<li><p> The formula interface to <code>t.test()</code> and
<code>wilcox.test()</code> has been extended to handle one-sample and
paired tests.
</p>
</li>
<li><p> The <code>palette()</code> function has a new default set of
colours (which are less saturated and have better accessibility
properties). There are also some new built-in palettes, which
are listed by the new <code>palette.pals()</code> function. These
include the old default palette under the name <code>"R3"</code>. Finally,
the new <code>palette.colors()</code> function allows a subset of
colours to be selected from any of the built-in palettes.
</p>
</li>
<li> <p><code>n2mfrow()</code> gains an option <code>asp = 1</code> to specify the
aspect ratio, fulfilling the wish and extending the proposal of
Michael Chirico in <a href="https://bugs.R-project.org/show_bug.cgi?id=17648">PR#17648</a>.
</p>
</li>
<li><p> For <code>head(x, n)</code> and <code>tail()</code> the default and
other S3 methods notably for <em>vector</em> <code>n</code>, e.g. to get a
“corner” of a matrix, has been extended to <code>array</code>'s
of higher dimension thanks to the patch proposal by Gabe Becker in
<a href="https://bugs.R-project.org/show_bug.cgi?id=17652">PR#17652</a>. Consequently, optional argument <code>addrownums</code> is
deprecated and replaced by the (more general) argument
<code>keepnums</code>. An invalid second argument <code>n</code> now leads
to typically more easily readable error messages.
</p>
</li>
<li><p> New function <code>.class2()</code> provides the full character
vector of class names used for S3 method dispatch.
</p>
</li>
<li><p> Printing <code>methods(..)</code> now uses a new <code>format()</code> method.
</p>
</li>
<li> <p><code>sort.list(x)</code> now works for non-atomic objects
<code>x</code> and <code>method = "auto"</code> (the default) or
<code>"radix"</code> in cases <code>order(x)</code> works, typically via a
<code>xtfrm()</code> method.
</p>
</li>
<li><p> Where they are available, <code>writeBin()</code> allows
long vectors.
</p>
</li>
<li><p> New function <code>deparse1()</code> produces one string, wrapping
<code>deparse()</code>, to be used typically in
<code>deparse1(substitute(*))</code>, e.g., to fix <a href="https://bugs.R-project.org/show_bug.cgi?id=17671">PR#17671</a>.
</p>
</li>
<li> <p><code>wilcox.test()</code> enhancements: In the (non-paired)
two-sample case, <code>Inf</code> values are treated as very large for
robustness consistency. If exact computations are used, the
result now has <code>"exact"</code> in the <code>method</code> element of its
return value. New arguments <code>tol.root</code> and
<code>digits.rank</code> where the latter may be used for stability to
treat very close numbers as ties.
</p>
</li>
<li> <p><code>readBin()</code> and <code>writeBin()</code> now report an error
for an invalid <code>endian</code> value. The affected code needs to be
fixed with care as the old undocumented behavior was to swap
endianness in such cases.
</p>
</li>
<li> <p><code>sequence()</code> is now an S3 generic with an internally
implemented default method, and gains arguments to generate more
complex sequences. Based on code from the <span class="pkg">S4Vectors</span>
Bioconductor package and the advice of Hervé Pagès.
</p>
</li>
<li> <p><code>print()</code>'s default method and many other methods (by
calling the default eventually and passing <code>...</code>) now make
use of a new optional <code>width</code> argument, avoiding the need for
the user to set and reset <code>options("width")</code>.
</p>
</li>
<li> <p><code>memDecompress()</code> supports the RFC 1952 format
(e.g. in-memory copies of <code>gzip</code>-compressed files)
as well as RFC 1950.
</p>
</li>
<li> <p><code>memCompress()</code> and <code>memDecompress()</code> support long
raw vectors for types <code>"gzip"</code> and <code>"zx"</code>.
</p>
</li>
<li> <p><code>sweep()</code> and <code>slice.index()</code> can now use names
of dimnames for their <code>MARGIN</code> argument (<code>apply</code> has
had this for almost a decade).
</p>
</li>
<li><p> New function <code>proportions()</code> and
<code>marginSums()</code>. These should replace the unfortunately named
<code>prop.table()</code> and <code>margin.table()</code>. They are drop-in
replacements, but also add named-margin functionality. The old
function names are retained as aliases for back-compatibility.
</p>
</li>
<li><p> Functions <code>rbinom()</code>, <code>rgeom()</code>, <code>rhyper()</code>,
<code>rpois()</code>, <code>rnbinom(),</code> <code>rsignrank()</code> and
<code>rwilcox()</code> which have returned integer since <span class="rlang"><b>R</b></span> 3.0.0 and hence
<code>NA</code> when the numbers would have been outside the integer range,
now return double vectors (without NAs, typically) in these cases.
</p>
</li>
<li> <p><code>matplot(x,y)</code> (and hence <code>matlines()</code> and
<code>matpoints()</code>) now call the corresponding methods of
<code>plot()</code> and <code>lines()</code>, e.g, when <code>x</code> is a
<code>"Date"</code> or <code>"POSIXct"</code> object; prompted by Spencer Graves'
suggestion.
</p>
</li>
<li> <p><code>stopifnot()</code> now allows customizing error messages via
argument names, thanks to a patch proposal by Neal Fultz in <a href="https://bugs.R-project.org/show_bug.cgi?id=17688">PR#17688</a>.
</p>
</li>
<li> <p><code>unlink()</code> gains a new argument <code>expand</code> to disable
wildcard and tilde expansion. Elements of <code>x</code> of value
<code>"~"</code> are now ignored.
</p>
</li>
<li> <p><code>mle()</code> in the <span class="pkg">stats4</span> package has had its
interface extended so that arguments to the negative
log-likelihood function can be one or more vectors, with similar
conventions applying to bounds, start values, and parameter values
to be kept fixed. This required a minor extension to class
<code>"mle"</code>, so saved objects from earlier versions may need to
be recomputed.
</p>
</li>
<li><p> The default for <code>pdf()</code> is now
<code>useDingbats = FALSE</code>.
</p>
</li>
<li><p> The default fill colour for <code>hist()</code> and
<code>boxplot()</code> is now <code>col = "lightgray"</code>.
</p>
</li>
<li><p> The default order of the levels on the y-axis for
<code>spineplot()</code> and <code>cdplot()</code> has been reversed.
</p>
</li>
<li><p> If the <span class="env">R_ALWAYS_INSTALL_TESTS</span> environment variable is
set to a true value, <code>R CMD INSTALL</code> behaves as if
the <span class="option">--install-tests</span> option is always specified. Thanks to
Reinhold Koch for the suggestion.
</p>
</li>
<li><p> New function <code>R_user_dir()</code> in package <span class="pkg">tools</span>
suggests paths appropriate for storing <span class="rlang"><b>R</b></span>-related user-specific
data, configuration and cache files.
</p>
</li>
<li> <p><code>capabilities()</code> gains a new logical option <code>Xchk</code>
to avoid warnings about X11-related capabilities.
</p>
</li>
<li><p> The internal implementation of <span class="pkg">grid</span> units has changed,
but the only visible effects at user-level should be
</p>
<ul>
<li><p> a slightly different print format for some units
(especially unit arithmetic),
</p>
</li>
<li><p> faster performance (for unit operations) and
</p>
</li>
<li><p> two new functions <code>unitType()</code> and <code>unit.psum()</code>.
</p>
</li></ul>
<p>Based on code contributed by Thomas Lin Pedersen.
</p>
</li>
<li><p> When internal dispatch for <code>rep.int()</code>
and <code>rep_len()</code> fails, there is an attempt to dispatch on the
equivalent call to <code>rep()</code>.
</p>
</li>
<li><p> Object <code>.Machine</code> now contains new <code>longdouble.*</code>
entries (when <span class="rlang"><b>R</b></span> uses long doubles internally).
</p>
</li>
<li> <p><code>news()</code> has been enhanced to cover the news on <span class="rlang"><b>R</b></span> 3.x
and 2.x.
</p>
</li>
<li><p> For consistency, <code>N <- NULL; N[[1]] <- val</code> now turns
<code>N</code> into a <code>list</code> also when <code>val)</code> has length one.
This enables <code>dimnames(r1)[[1]] <- "R1"</code> for a 1-row matrix
<code>r1</code>, fixing <a href="https://bugs.R-project.org/show_bug.cgi?id=17719">PR#17719</a> reported by Serguei Sokol.
</p>
</li>
<li> <p><code>deparse(..)</code>, <code>dump(..)</code>, and <code>dput(x,
control = "all")</code> now include control option <code>"digits17"</code>
which typically ensures 1:1 invertibility. New option
<code>control = "exact"</code> ensures numeric exact invertibility
via <code>"hexNumeric"</code>.
</p>
</li>
<li><p> When loading data sets via <code>read.table()</code>,
<code>data()</code> now uses ‘<span class="samp">⁠LC_COLLATE=C⁠</span>’ to ensure
locale-independent results for possible string-to-factor
conversions.
</p>
</li>
<li><p> A server socket connection, a new connection type
representing a listening server socket, is created via
<code>serverSocket()</code> and can accept multiple socket connections
via <code>socketAccept()</code>.
</p>
</li>
<li><p> New function <code>socketTimeout()</code> changes the connection
timeout of a socket connection.
</p>
</li>
<li><p> The time needed to start a homogeneous ‘<span class="samp">⁠PSOCK⁠</span>’ cluster on
‘<span class="samp">⁠localhost⁠</span>’ with many nodes has been significantly reduced
(package <span class="pkg">parallel</span>).
</p>
</li>
<li><p> New <code>globalCallingHandlers()</code> function to establish
global condition handlers. This allows registering default
handlers for specific condition classes. Developed in
collaboration with Lionel Henry.
</p>
</li>
<li><p> New function <code>tryInvokeRestart()</code> to invoke a specified
restart if one is available and return without signaling an error
if no such restart is found. Contributed by Lionel Henry in
<a href="https://bugs.R-project.org/show_bug.cgi?id=17598">PR#17598</a>.
</p>
</li>
<li> <p><code>str(x)</code> now shows the length of <code>attributes</code> in some
cases for a data frame <code>x</code>.
</p>
</li>
<li> <p><code>Rprof()</code> gains a new argument <code>filter.callframes</code>
to request that intervening call frames due to lazy evaluation or
explicit <code>eval()</code> calls be omitted from the recorded profile
data. Contributed by Lionel Henry in <a href="https://bugs.R-project.org/show_bug.cgi?id=17595">PR#17595</a>.
</p>
</li>
<li><p> The handling of <code>${FOO-bar}</code> and <code>${FOO:-bar}</code>
in ‘<span class="file">Renviron</span>’ files now follows POSIX shells (at least on a
Unix-alike), so the first treats empty environment variables as
set and the second does not. Previously both ignored empty
variables. There are several uses of the first form in
‘<span class="file">etc/Renviron</span>’.
</p>
</li>
<li><p> New <code>classes</code> argument for <code>suppressWarnings()</code>
and <code>suppressMessages()</code> to selectively suppress only
warnings or messages that inherit from particular classes.
Based on patch from Lionel Henry submitted with <a href="https://bugs.R-project.org/show_bug.cgi?id=17619">PR#17619</a>.
</p>
</li>
<li><p> New function <code>activeBindingFunction()</code> retrieves the
function of an active binding.
</p>
</li>
<li><p> New <code>"cairoFT"</code> and <code>"pango"</code> components in the
output of <code>grSoftVersion()</code>.
</p>
</li>
<li><p> New argument <code>symbolfamily</code> in cairo-based graphics
devices and new function <code>cairoSymbolFont()</code> that can be used
to provide the value for that argument.
</p>
</li></ul>
<h4>Windows</h4>
<ul>
<li> <p><code>Rterm</code> now works also when invoked from <abbr>MSYS2</abbr>
terminals. Line editing is possible when command <code>winpty</code> is
installed.
</p>
</li>
<li> <p><code>normalizePath()</code> now resolves symbolic links and
normalizes case of long names of path elements in case-insensitive
folders (<a href="https://bugs.R-project.org/show_bug.cgi?id=17165">PR#17165</a>).
</p>
</li>
<li> <p><code>md5sum()</code> supports UTF-8 file names with characters
that cannot be translated to the native encoding (<a href="https://bugs.R-project.org/show_bug.cgi?id=17633">PR#17633</a>).
</p>
</li>
<li> <p><code>Rterm</code> gains a new option <span class="option">--workspace</span> to
specify the workspace to be restored. This allows equals to be
part of the name when opening <em>via</em> Windows file associations
(reported by Christian Asseburg).
</p>
</li>
<li> <p><code>Rterm</code> now accepts <code>ALT+xxx</code> sequences also
with NumLock on. Tilde can be pasted with an Italian keyboard
(<a href="https://bugs.R-project.org/show_bug.cgi?id=17679">PR#17679</a>).
</p>
</li>
<li> <p><span class="rlang"><b>R</b></span> falls back to copying when junction creation fails during
package checking (patch from Duncan Murdoch).
</p>
</li></ul>
<h4>DEPRECATED AND DEFUNCT</h4>
<ul>
<li><p> Make macro ‘<span class="samp">⁠F77_VISIBILITY⁠</span>’ has been removed
and replaced by ‘<span class="samp">⁠F_VISIBILITY⁠</span>’.
</p>
</li>
<li><p> Make macros ‘<span class="samp">⁠F77⁠</span>’, ‘<span class="samp">⁠FCPIFCPLAGS⁠</span>’ and
‘<span class="samp">⁠SHLIB_OPENMP_FCFLAGS⁠</span>’ have been removed and replaced by
‘<span class="samp">⁠FC⁠</span>’, ‘<span class="samp">⁠FPICFLAGS⁠</span>’ and ‘<span class="samp">⁠SHLIB_OPENMP_FFLAGS⁠</span>’
respectively. (Most <code>make</code> programs will set ‘<span class="samp">⁠F77⁠</span>’
to the value of ‘<span class="samp">⁠FC⁠</span>’, which is set for package compilation.
But portable code should not rely on this.)
</p>
</li>
<li><p> The deprecated support for specifying C++98 for package
installation has been removed.
</p>
</li>
<li> <p><code>R CMD config</code> no longer knows about the
unused settings ‘<span class="samp">⁠F77⁠</span>’ and ‘<span class="samp">⁠FCPIFCPLAGS⁠</span>’, nor
‘<span class="samp">⁠CXX98⁠</span>’ and similar.
</p>
</li>
<li><p> Either PCRE2 or PCRE1 >= 8.32 (Nov 2012) is required: the
deprecated provision for 8.20–8.31 has been removed.
</p>
</li>
<li><p> Defunct functions <code>mem.limits()</code>, <code>.readRDS()</code>,
<code>.saveRDS()</code>, <code>.find.package()</code>, and <code>.path.package()</code>
from package <span class="pkg">base</span>
and <code>allGenerics()</code>, <code>getAccess()</code>, <code>getAllMethods()</code>,
<code>getClassName()</code>, <code>getClassPackage()</code>, <code>getExtends()</code>,
<code>getProperties()</code>, <code>getPrototype()</code>,
<code>getSubclasses()</code>, <code>getVirtual()</code>, <code>mlistMetaName()</code>,
<code>removeMethodsObject()</code>, <code>seemsS4Object()</code>,
<code>traceOff()</code>, and <code>traceOn()</code> from <span class="pkg">methods</span> have been
removed.
</p>
</li></ul>
<h4>C-LEVEL FACILITIES</h4>
<ul>
<li> <p><code>installChar</code> is now remapped in ‘<span class="file">Rinternals.h</span>’ to
<code>installTrChar</code>, of which it has been a wrapper since
<span class="rlang"><b>R</b></span> 3.6.0. Neither are part of the API, but packages using
<code>installChar</code> can replace it if they depend on ‘<span class="samp">⁠R >= 3.6.2⁠</span>’.
</p>
</li>
<li><p> Header ‘<span class="file">R_ext/Print.h</span>’ defines ‘<span class="samp">⁠R_USE_C99_IN_CXX⁠</span>’
and hence exposes <code>Rvprintf</code> and <code>REvprintf</code> if used
with a C++11 (or later) compiler.
</p>
</li>
<li><p> There are new Fortran subroutines <code>dblepr1</code>,
<code>realpr1</code> and <code>intpr1</code> to print a scalar variable
(<code>gfortran</code> 10 enforces the distinction between scalars
and length-one arrays). Also <code>labelpr</code> to print just a label.
</p>
</li>
<li> <p><code>R_withCallingErrorHandler</code> is now available for
establishing a calling handler in C code for conditions inheriting
from class <code>error</code>.
</p>
</li></ul>
<h4>INSTALLATION on a UNIX-ALIKE</h4>
<ul>
<li><p> User-set ‘<span class="samp">⁠DEFS⁠</span>’ (e.g., in ‘<span class="file">config.site</span>’) is now
used for compiling packages (including base packages).
</p>
</li>
<li><p> There is a new variant option <span class="option">--enable-lto=check</span>
for checking consistency of BLAS/LAPACK/LINPACK calls — see
‘Writing R Extensions’.
</p>
</li>
<li><p> A C++ compiler default is set only if the C++11 standard is
supported: it no longer falls back to C++98.
</p>
</li>
<li><p> PCRE2 is used if available. To make use of PCRE1 if PCRE2
is unavailable, configure with option <span class="option">--with-pcre1</span>.
</p>
</li>
<li><p> The minimum required version of <code>libcurl</code> is now 7.28.0
(Oct 2012).
</p>
</li>
<li><p> New make target <code>distcheck</code> checks
</p>
<ul>
<li> <p><span class="rlang"><b>R</b></span> can be rebuilt from the tarball created by
<code>make dist</code>,
</p>
</li>
<li><p> the build from the tarball passes <code>make check-all</code>,
</p>
</li>
<li><p> the build installs and uninstalls,
</p>
</li>
<li><p> the source files are properly cleaned by <code>make distclean</code>.
</p>
</li></ul>
</li></ul>
<h4>UTILITIES</h4>
<ul>
<li> <p><code>R --help</code> now mentions the option <code>--no-echo</code>
(renamed from <code>--slave</code>) and its previously undocumented
short form <code>-s</code>.
</p>
</li>
<li> <p><code>R CMD check</code> now optionally checks
<code>configure</code> and <code>cleanup</code> scripts for
non-Bourne-shell code (‘bashisms’).
</p>
</li>
<li> <p><code>R CMD check --as-cran</code> now runs <code style="white-space: pre;">⁠\donttest⁠</code>
examples (which are run by <code>example()</code>) instead of
instructing the tester to do so. This can be temporarily
circumvented during development by setting environment variable
<span class="env">_R_CHECK_DONTTEST_EXAMPLES_</span> to a false value.
</p>
</li></ul>
<h4>PACKAGE INSTALLATION</h4>
<ul>
<li><p> There is the beginnings of support for the recently approved
C++20 standard, specified analogously to C++14 and C++17. There is
currently only limited support for this in compilers, with flags
such as <span class="option">-std=c++20</span> and <span class="option">-std=c++2a</span>. For the time
being the <code>configure</code> test is of accepting one of these
flags and compiling C++17 code.
</p>
</li></ul>
<h4>BUG FIXES</h4>
<ul>
<li> <p><code>formula(x)</code> with <code>length(x) > 1</code> character vectors,
is deprecated now. Such use has been rare, and has ‘worked’
as expected in some cases only. In other cases, wrong <code>x</code> have
silently been truncated, not detecting previous errors.
</p>
</li>
<li><p> Long-standing issue where the X11 device could lose events
shortly after startup has been addressed (<a href="https://bugs.R-project.org/show_bug.cgi?id=16702">PR#16702</a>).
</p>
</li>
<li><p> The <code>data.frame</code> method for <code>rbind()</code> no longer
drops <code><NA></code> levels from factor columns by default
(<a href="https://bugs.R-project.org/show_bug.cgi?id=17562">PR#17562</a>).
</p>
</li>
<li> <p><code>available.packages()</code> and hence <code>install.packages()</code>
now pass their <code>...</code> argument to <code>download.file()</code>,
fulfilling the wish of <a href="https://bugs.R-project.org/show_bug.cgi?id=17532">PR#17532</a>; subsequently,
<code>available.packages()</code> gets new argument <code>quiet</code>, solving
<a href="https://bugs.R-project.org/show_bug.cgi?id=17573">PR#17573</a>.
</p>
</li>
<li> <p><code>stopifnot()</code> gets new argument <code>exprObject</code> to allow
an <span class="rlang"><b>R</b></span> object of class <code>expression</code> (or other ‘language’)
to work more consistently, thanks to suggestions by Suharto Anggono.
</p>
</li>
<li> <p><code>conformMethod()</code> now works correctly in cases containing
a “<code>&&</code> logic” bug, reported by Henrik Bengtsson. It now
creates methods with <code>"missing"</code> entries in the signature.
Consequently, <code>rematchDefinition()</code> is amended to use
appropriate <code>.local()</code> calls with named arguments where needed.
</p>
</li>
<li> <p><code>format.default(*, scientific = FALSE)</code> now corresponds to
a practically most extreme <code>options(scipen = n)</code> setting rather
than arbitrary <code>n = 100</code>.
</p>
</li>
<li> <p><code>format(as.symbol("foo"))</code> now works (returning <code>"foo"</code>).
</p>
</li>
<li> <p><code>postscript(.., title = *)</code> now signals an error when
the title string contains a character which would produce corrupt
PostScript, thanks to <a href="https://bugs.R-project.org/show_bug.cgi?id=17607">PR#17607</a> by Daisuko Ogawa.
</p>
</li>
<li><p> Certain <code>Ops</code> (notably comparison such as <code>==</code>) now
also work for 0-length data frames, after reports by Hilmar Berger.
</p>
</li>
<li> <p><code>methods(class = class(glm(..)))</code> now warns more usefully
and only once.
</p>
</li>
<li> <p><code>write.dcf()</code> no longer mangles field names (<a href="https://bugs.R-project.org/show_bug.cgi?id=17589">PR#17589</a>).
</p>
</li>
<li><p> Primitive replacement functions no longer mutate a
referenced first argument when used outside of a complex
assignment context.
</p>
</li>
<li><p> A better error message for <code>contour(*, levels = Inf)</code>.
</p>
</li>
<li><p> The return value of <code>contourLines()</code> is no longer
<code>invisible()</code>.
</p>
</li>
<li><p> The Fortran code for calculating the <code>coefficients</code>
component in <code>lm.influence()</code> was very inefficient. It has
(for now) been replaced with much faster <span class="rlang"><b>R</b></span> code (<a href="https://bugs.R-project.org/show_bug.cgi?id=17624">PR#17624</a>).
</p>
</li>
<li> <p><code>cm.colors(n)</code> <em>etc</em> no longer append the code for
<code>alpha = 1</code>, <code>"FF"</code>, to all colors. Hence all eight
<code>*.colors()</code> functions and <code>rainbow()</code> behave
consistently and have the same non-explicit default (<a href="https://bugs.R-project.org/show_bug.cgi?id=17659">PR#17659</a>).
</p>
</li>
<li> <p><code>dnorm</code> had a problematic corner case with <code>sd ==
-Inf</code> or negative <code>sd</code> which was not flagged as an error in
all cases. Thanks to Stephen D. Weigand for reporting and
Wang Jiefei for analyzing this; similar change has been made in
<code>dlnorm()</code>.
</p>
</li>
<li><p> The optional <code>iter.smooth</code> argument of
<code>plot.lm()</code>, (the <code>plot()</code> method for <code>lm</code> and
<code>glm</code> fits) now defaults to <code>0</code> for all <code>glm</code> fits.
Especially for binary observations with high or low fitted
probabilities, this effectively deleted all observations of 1 or
0. Also, the type of residuals used in the <code>glm</code> case has
been switched to <code>"pearson"</code> since deviance residuals do not
in general have approximately zero mean.
</p>
</li>
<li><p> In <code>plot.lm</code>, Cook's distance was computed from unweighted
residuals, leading to inconsistencies. Replaced with usual weighted
version. (<a href="https://bugs.R-project.org/show_bug.cgi?id=16056">PR#16056</a>)
</p>
</li>
<li><p> Time-series <code>ts(*, start, end, frequency)</code> with
fractional <code>frequency</code> are supported more consistently;
thanks to a report from Johann Kleinbub and analysis and patch by
Duncan Murdoch in <a href="https://bugs.R-project.org/show_bug.cgi?id=17669">PR#17669</a>.
</p>
</li>
<li><p> In case of errors <code>mcmapply()</code> now preserves attributes
of returned <code>"try-error"</code> objects and avoids simplification,
overriding <code>SIMPLIFY</code> to <code>FALSE</code>. (<a href="https://bugs.R-project.org/show_bug.cgi?id=17653">PR#17653</a>)
</p>
</li>
<li> <p><code>as.difftime()</code> gets new optional <code>tz = "UTC"</code>
argument which should fix behaviour during
daylight-savings-changeover days, fixing <a href="https://bugs.R-project.org/show_bug.cgi?id=16764">PR#16764</a>, thanks to
proposals and analysis by Johannes Ranke and Kirill Müller.
</p>
</li>
<li> <p><code>round()</code> does a better job of rounding
<em>“to nearest”</em> by <em>measuring</em> and
<em>“to even”</em>; thanks to a careful algorithm originally
prompted by the report from Adam Wheeler and then others, in
<a href="https://bugs.R-project.org/show_bug.cgi?id=17668">PR#17668</a>. <br> <code>round(x, dig)</code> for <em>negative</em> digits
is much more rational now, notably for large <code class="reqn">|dig|</code>.
</p>
</li>
<li><p> Inheritance information on S4 classes is maintained more
consistently, particularly in the case of class unions (in part
due to <a href="https://bugs.R-project.org/show_bug.cgi?id=17596">PR#17596</a> and a report from Ezra Tucker).
</p>
</li>
<li> <p><code>is()</code> behaves more robustly when its argument
<code>class2</code> is a <code>classRepresentation</code> object.
</p>
</li>
<li><p> The warning message when attempting to export an nonexistent
class is now more readable; thanks to Thierry Onkelinx for
recognizing the problem.
</p>
</li>
<li> <p><code>choose()</code> misbehaved in corner cases where it switched
<code>n - k</code> for <code>k</code> and <code>n</code> was only <em>nearly</em> integer
(report from Erik Scott Wright).
</p>
</li>
<li> <p><code>mle()</code> in the <span class="pkg">stats4</span> package had problems
combining use of box constraints and fixed starting values (in
particular, confidence intervals were affected).
</p>
</li>
<li><p> Operator <code>?</code> now has lower precedence than <code>=</code> to
work as documented, so <code>=</code> behaves like <code><-</code> in help
expressions (<a href="https://bugs.R-project.org/show_bug.cgi?id=16710">PR#16710</a>).
</p>
</li>
<li> <p><code>smoothEnds(x)</code> now returns <code>integer</code> type in
<em>both</em> cases when <code>x</code> is <code>integer</code>, thanks to a
report and proposal by Bill Dunlap <a href="https://bugs.R-project.org/show_bug.cgi?id=17693">PR#17693</a>.
</p>
</li>
<li><p> The <span class="pkg">methods</span> package does a better job of tracking
inheritance relationships across packages.
</p>
</li>
<li> <p><code>norm(diag(c(1, NA)), "2")</code> now works.
</p>
</li>
<li> <p><code>subset()</code> had problems with 0-col dataframes (reported
by Bill Dunlap, <a href="https://bugs.R-project.org/show_bug.cgi?id=17721">PR#17721</a>).
</p>
</li>
<li><p> Several cases of integer overflow detected by the
‘undefined behaviour sanitizer’ of <code>clang</code> 10 have
been circumvented. One in <code>rhyper()</code> may change the
generated value for large input values.
</p>
</li>
<li> <p><code>dotchart()</code> now places the y-axis label (<code>ylab</code>)
much better, not overplotting labels, thanks to a report and
suggestion by Alexey Shipunov.
</p>
</li>
<li><p> A rare C-level array overflow in <code>chull()</code> has been
worked around.
</p>
</li>
<li><p> Some invalid specifications of the day-of-the-year
(<em>via</em> <code>%j</code>, e.g. day 366 in 2017) or week
plus day-of-the-week are now detected by <code>strptime()</code>.
They now return <code>NA</code> but give a warning as they may have
given random results or corrupted memory in earlier versions of <span class="rlang"><b>R</b></span>.
</p>
</li>
<li> <p><code>socketConnection(server = FALSE)</code> now respects the
connection timeout also on Linux.
</p>
</li>
<li> <p><code>socketConnection(server = FALSE)</code> no longer leaks a
connection that is available right away without waiting (e.g. on
‘<span class="samp">⁠localhost⁠</span>’).
</p>
</li>
<li><p> Socket connections are now robust against spurious readability
and spurious availability of an incoming connection.
</p>
</li>
<li> <p><code>blocking = FALSE</code> is now respected also on the server side
of a socket connection, allowing non-blocking read operations.
</p>
</li>
<li> <p><code>anova.glm()</code> and <code>anova.glmlist()</code> computed
incorrect score (Rao) tests in no-intercept cases. (André
Gillibert, <a href="https://bugs.R-project.org/show_bug.cgi?id=17735">PR#17735</a>)
</p>
</li>
<li> <p><code>summaryRprof()</code> now should work correctly for the
<code>Rprof(*, memory.profiling=TRUE)</code> case with small chunk size (and
<code>"tseries"</code> or similar) thanks to a patch proposal by
Benjamin Tyner, in <a href="https://bugs.R-project.org/show_bug.cgi?id=15886">PR#15886</a>.
</p>
</li>
<li> <p><code>xgettext()</code> ignores strings passed to
<code>ngettext()</code>, since the latter is handled by
<code>xngettext()</code>. Thanks to Daniele Medri for the report and all
the recent work he has done on the Italian translations.
</p>
</li>
<li> <p><code>data(package = "P")</code> for <code>P</code> in <span class="pkg">base</span> and
<span class="pkg">stats</span> no longer reports the data sets from package
<span class="pkg">datasets</span> (which it did for back compatibility for 16 years),
fixing <a href="https://bugs.R-project.org/show_bug.cgi?id=17730">PR#17730</a>.
</p>
</li>
<li> <p><code>x[[Inf]]</code> (returning <code>NULL</code>) no longer leads to
undefined behavior, thanks to a report by Kirill Müller in
<a href="https://bugs.R-project.org/show_bug.cgi?id=17756">PR#17756</a>. Further, <code>x[[-Inf]]</code> and <code>x[[-n]]</code> now give
more helpful error messages.
</p>
</li>
<li> <p><code>Gamma()</code> family sometimes had trouble storing
link name <a href="https://bugs.R-project.org/show_bug.cgi?id=15891">PR#15891</a>
</p>
</li></ul>
<h4>BUG FIXES (Windows)</h4>
<ul>
<li> <p><code>Sys.glob()</code> now supports all characters
from the Unicode Basic Multilingual Plane, no longer corrupting
some (less commonly used) characters (<a href="https://bugs.R-project.org/show_bug.cgi?id=17638">PR#17638</a>).
</p>
</li>
<li> <p><code>Rterm</code> now correctly displays
multi-byte-coded characters representable in the current native
encoding (at least on Windows 10 they were sometimes omitted,
<a href="https://bugs.R-project.org/show_bug.cgi?id=17632">PR#17632</a>).
</p>
</li>
<li> <p><code>scan()</code> issues with UTF-8 data when running in a <abbr>DBCS</abbr>
locale have been resolved (<a href="https://bugs.R-project.org/show_bug.cgi?id=16520">PR#16520</a>, <a href="https://bugs.R-project.org/show_bug.cgi?id=16584">PR#16584</a>).
</p>
</li>
<li> <p><code>Rterm</code> now accepts enhanced/arrow keys also with
ConPTY.
</p>
</li>
<li> <p><span class="rlang"><b>R</b></span> can now be started <em>via</em> the launcher icon in a
user documents directory whose path is not representable in the
system encoding.
</p>
</li>
<li> <p><code>socketConnection(server = FALSE)</code> now returns instantly
also on Windows when connection failure is signalled.
</p>
</li>
<li><p> Problems with UTF-16 surrogate pairs have been fixed in
several functions, including <code>tolower()</code> and
<code>toupper()</code> (<a href="https://bugs.R-project.org/show_bug.cgi?id=17645">PR#17645</a>).
</p>
</li></ul>
<h3>CHANGES in previous versions</h3>
<ul>
<li><p> Older news can be found in text format in files
<a href="../NEWS.0">NEWS.0</a>, <a href="../NEWS.1">NEWS.1</a>,
<a href="../NEWS.2">NEWS.2</a> and
<a href="../NEWS.3">NEWS.3</a>
in the ‘<span class="file">doc</span>’ directory. News in HTML format for
<span class="rlang"><b>R</b></span> versions 3.x and from 2.10.0 to 2.15.3 are available at
<a href="NEWS.3.html">NEWS.3.html</a>
and
<a href="NEWS.2.html">NEWS.2.html</a>.
</p>
</li></ul>
</main>
</div>
</body></html>
|