Strange behaviour of list in R -
this question has reply here:
why , \n newline characters getting introduced c()? 1 replyi ran on unusual behaviour. trying evaluate rather long list (generated code).
list( 'food', 100, 199, 'food', 200, 299, 'food', 700, 799, 'food', 910, 919, 'food', 2000, 2009, 'food', 2010, 2019, 'food', 2020, 2029, 'food', 2030, 2039, 'food', 2040, 2046, 'food', 2048, 2048, 'food', 2050, 2059, 'food', 2060, 2063, 'food', 2064, 2068, 'food', 2070, 2079, 'food', 2086, 2086, 'food', 2087, 2087, 'food', 2090, 2092, 'food', 2095, 2095, 'food', 2096, 2096, 'food', 2097, 2097, 'food', 2098, 2099, 'food', 5800, 5819, 'food', 5820, 5829, 'food', 5890, 5899, 'food', 7000, 7000, 'food', 7010, 7019, 'food', 7040, 7049, 'food', 7213, 7213, 'food', 2080, 2080, 'food', 2082, 2082, 'food', 2083, 2083, 'food', 2084, 2084, 'food', 2085, 2085, 'food', 2100, 2199, 'hlth', 2830, 2830, 'hlth', 2831, 2831, 'hlth', 2833, 2833, 'hlth', 2834, 2834, 'hlth', 2835, 2835, 'hlth', 2836, 2836, 'hlth', 3693, 3693, 'hlth', 3840, 3849, 'hlth', 3850, 3851, 'hlth', 8000, 8099, 'cnstr', 800, 899, 'cnstr', 1500, 1511, 'cnstr', 1520, 1529, 'cnstr', 1530, 1539, 'cnstr', 1540, 1549, 'cnstr', 1600, 1699, 'cnstr', 1700, 1799, 'cnstr', 2400, 2439, 'cnstr', 2450, 2459, 'cnstr', 2490, 2499, 'cnstr', 2660, 2661, 'cnstr', 2950, 2952, 'cnstr', 3200, 3200, 'cnstr', 3210, 3211, 'cnstr', 3240, 3241, 'cnstr', 3250, 3259, 'cnstr', 3261, 3261, 'cnstr', 3264, 3264, 'cnstr', 3270, 3275, 'cnstr', 3280, 3281, 'cnstr', 3290, 3293, 'cnstr', 3295, 3299, 'cnstr', 3420, 3429, 'cnstr', 3430, 3433, 'cnstr', 3440, 3441, 'cnstr', 3442, 3442, 'cnstr', 3446, 3446, 'cnstr', 3448, 3448, 'cnstr', 3449, 3449, 'cnstr', 3450, 3451, 'cnstr', 3452, 3452, 'cnstr', 3490, 3499, 'cnstr', 3996, 3996, 'cnstr', 3400, 3400, 'cnstr', 3443, 3443, 'cnstr', 3444, 3444, 'cnstr', 3460, 3469, 'cnstr', 3470, 3479, 'cnstr', 3510, 3519, 'cnstr', 3520, 3529, 'cnstr', 3530, 3530, 'cnstr', 3531, 3531, 'cnstr', 3532, 3532, 'cnstr', 3533, 3533, 'cnstr', 3534, 3534, 'cnstr', 3535, 3535, 'cnstr', 3536, 3536, 'cnstr', 3538, 3538, 'cnstr', 3540, 3549, 'cnstr', 3550, 3559, 'cnstr', 3560, 3569, 'cnstr', 3580, 3580, 'cnstr', 3581, 3581, 'cnstr', 3582, 3582, 'cnstr', 3585, 3585, 'cnstr', 3586, 3586, 'cnstr', 3589, 3589, 'cnstr', 3590, 3599, 'cnstr', 3300, 3300, 'cnstr', 3310, 3317, 'cnstr', 3320, 3325, 'cnstr', 3330, 3339, 'cnstr', 3340, 3341, 'cnstr', 3350, 3357, 'cnstr', 3360, 3369, 'cnstr', 3370, 3379, 'cnstr', 3390, 3399, 'cnstr', 3600, 3600, 'cnstr', 3610, 3613, 'cnstr', 3620, 3621, 'cnstr', 3623, 3629, 'cnstr', 3640, 3644, 'cnstr', 3645, 3645, 'cnstr', 3646, 3646, 'cnstr', 3648, 3649, 'cnstr', 3660, 3660, 'cnstr', 3690, 3690, 'cnstr', 3691, 3692, 'cnstr', 3699, 3699, 'ocm', 1300, 1300, 'ocm', 1310, 1319, 'ocm', 1320, 1329, 'ocm', 1330, 1339, 'ocm', 1370, 1379, 'ocm', 1380, 1380, 'ocm', 1381, 1381, 'ocm', 1382, 1382, 'ocm', 1389, 1389, 'ocm', 2900, 2912, 'ocm', 2990, 2999, 'ocm', 1200, 1299, 'ocm', 1000, 1009, 'ocm', 1010, 1019, 'ocm', 1020, 1029, 'ocm', 1030, 1039, 'ocm', 1040, 1049, 'ocm', 1050, 1059, 'ocm', 1060, 1069, 'ocm', 1070, 1079, 'ocm', 1080, 1089, 'ocm', 1090, 1099, 'ocm', 1100, 1119, 'ocm', 1400, 1499, 'ocm', 2800, 2809, 'ocm', 2810, 2819, 'ocm', 2820, 2829, 'ocm', 2850, 2859, 'ocm', 2860, 2869, 'ocm', 2870, 2879, 'ocm', 2890, 2899, 'util', 4900, 4900, 'util', 4910, 4911, 'util', 4920, 4922, 'util', 4923, 4923, 'util', 4924, 4925, 'util', 4930, 4931, 'util', 4932, 4932, 'util', 4939, 4939, 'util', 4940, 4942, 'it', 4800, 4800, 'it', 4810, 4813, 'it', 4820, 4822, 'it', 4830, 4839, 'it', 4840, 4841, 'it', 4880, 4889, 'it', 4890, 4890, 'it', 4891, 4891, 'it', 4892, 4892, 'it', 4899, 4899, 'it', 7370, 7372, 'it', 7374, 7374, 'it', 7375, 7375, 'it', 7376, 7376, 'it', 7377, 7377, 'it', 7378, 7378, 'it', 7379, 7379, 'it', 3669, 3669, 'it', 3670, 3679, 'it', 3680, 3680, 'it', 3681, 3681, 'it', 3682, 3682, 'it', 3683, 3683, 'it', 3684, 3684, 'it', 3685, 3685, 'it', 3686, 3686, 'it', 3687, 3687, 'it', 3688, 3688, 'it', 3689, 3689, 'it', 3695, 3695, 'it', 3810, 3810, 'it', 7373, 7373, 'it', 3570, 3579, 'it', 5063, 5063, 'it', 5734, 5734, 'it', 5045, 5045, 'it', 5995, 5995, 'servs', 7020, 7021, 'servs', 7030, 7033, 'servs', 7200, 7200, 'servs', 7210, 7212, 'servs', 7214, 7214, 'servs', 7215)
the interpreter cannot evaluate it. however, if remove 1 character lastly entry.
list( 'food', 100, 199, 'food', 200, 299, 'food', 700, 799, 'food', 910, 919, 'food', 2000, 2009, 'food', 2010, 2019, 'food', 2020, 2029, 'food', 2030, 2039, 'food', 2040, 2046, 'food', 2048, 2048, 'food', 2050, 2059, 'food', 2060, 2063, 'food', 2064, 2068, 'food', 2070, 2079, 'food', 2086, 2086, 'food', 2087, 2087, 'food', 2090, 2092, 'food', 2095, 2095, 'food', 2096, 2096, 'food', 2097, 2097, 'food', 2098, 2099, 'food', 5800, 5819, 'food', 5820, 5829, 'food', 5890, 5899, 'food', 7000, 7000, 'food', 7010, 7019, 'food', 7040, 7049, 'food', 7213, 7213, 'food', 2080, 2080, 'food', 2082, 2082, 'food', 2083, 2083, 'food', 2084, 2084, 'food', 2085, 2085, 'food', 2100, 2199, 'hlth', 2830, 2830, 'hlth', 2831, 2831, 'hlth', 2833, 2833, 'hlth', 2834, 2834, 'hlth', 2835, 2835, 'hlth', 2836, 2836, 'hlth', 3693, 3693, 'hlth', 3840, 3849, 'hlth', 3850, 3851, 'hlth', 8000, 8099, 'cnstr', 800, 899, 'cnstr', 1500, 1511, 'cnstr', 1520, 1529, 'cnstr', 1530, 1539, 'cnstr', 1540, 1549, 'cnstr', 1600, 1699, 'cnstr', 1700, 1799, 'cnstr', 2400, 2439, 'cnstr', 2450, 2459, 'cnstr', 2490, 2499, 'cnstr', 2660, 2661, 'cnstr', 2950, 2952, 'cnstr', 3200, 3200, 'cnstr', 3210, 3211, 'cnstr', 3240, 3241, 'cnstr', 3250, 3259, 'cnstr', 3261, 3261, 'cnstr', 3264, 3264, 'cnstr', 3270, 3275, 'cnstr', 3280, 3281, 'cnstr', 3290, 3293, 'cnstr', 3295, 3299, 'cnstr', 3420, 3429, 'cnstr', 3430, 3433, 'cnstr', 3440, 3441, 'cnstr', 3442, 3442, 'cnstr', 3446, 3446, 'cnstr', 3448, 3448, 'cnstr', 3449, 3449, 'cnstr', 3450, 3451, 'cnstr', 3452, 3452, 'cnstr', 3490, 3499, 'cnstr', 3996, 3996, 'cnstr', 3400, 3400, 'cnstr', 3443, 3443, 'cnstr', 3444, 3444, 'cnstr', 3460, 3469, 'cnstr', 3470, 3479, 'cnstr', 3510, 3519, 'cnstr', 3520, 3529, 'cnstr', 3530, 3530, 'cnstr', 3531, 3531, 'cnstr', 3532, 3532, 'cnstr', 3533, 3533, 'cnstr', 3534, 3534, 'cnstr', 3535, 3535, 'cnstr', 3536, 3536, 'cnstr', 3538, 3538, 'cnstr', 3540, 3549, 'cnstr', 3550, 3559, 'cnstr', 3560, 3569, 'cnstr', 3580, 3580, 'cnstr', 3581, 3581, 'cnstr', 3582, 3582, 'cnstr', 3585, 3585, 'cnstr', 3586, 3586, 'cnstr', 3589, 3589, 'cnstr', 3590, 3599, 'cnstr', 3300, 3300, 'cnstr', 3310, 3317, 'cnstr', 3320, 3325, 'cnstr', 3330, 3339, 'cnstr', 3340, 3341, 'cnstr', 3350, 3357, 'cnstr', 3360, 3369, 'cnstr', 3370, 3379, 'cnstr', 3390, 3399, 'cnstr', 3600, 3600, 'cnstr', 3610, 3613, 'cnstr', 3620, 3621, 'cnstr', 3623, 3629, 'cnstr', 3640, 3644, 'cnstr', 3645, 3645, 'cnstr', 3646, 3646, 'cnstr', 3648, 3649, 'cnstr', 3660, 3660, 'cnstr', 3690, 3690, 'cnstr', 3691, 3692, 'cnstr', 3699, 3699, 'ocm', 1300, 1300, 'ocm', 1310, 1319, 'ocm', 1320, 1329, 'ocm', 1330, 1339, 'ocm', 1370, 1379, 'ocm', 1380, 1380, 'ocm', 1381, 1381, 'ocm', 1382, 1382, 'ocm', 1389, 1389, 'ocm', 2900, 2912, 'ocm', 2990, 2999, 'ocm', 1200, 1299, 'ocm', 1000, 1009, 'ocm', 1010, 1019, 'ocm', 1020, 1029, 'ocm', 1030, 1039, 'ocm', 1040, 1049, 'ocm', 1050, 1059, 'ocm', 1060, 1069, 'ocm', 1070, 1079, 'ocm', 1080, 1089, 'ocm', 1090, 1099, 'ocm', 1100, 1119, 'ocm', 1400, 1499, 'ocm', 2800, 2809, 'ocm', 2810, 2819, 'ocm', 2820, 2829, 'ocm', 2850, 2859, 'ocm', 2860, 2869, 'ocm', 2870, 2879, 'ocm', 2890, 2899, 'util', 4900, 4900, 'util', 4910, 4911, 'util', 4920, 4922, 'util', 4923, 4923, 'util', 4924, 4925, 'util', 4930, 4931, 'util', 4932, 4932, 'util', 4939, 4939, 'util', 4940, 4942, 'it', 4800, 4800, 'it', 4810, 4813, 'it', 4820, 4822, 'it', 4830, 4839, 'it', 4840, 4841, 'it', 4880, 4889, 'it', 4890, 4890, 'it', 4891, 4891, 'it', 4892, 4892, 'it', 4899, 4899, 'it', 7370, 7372, 'it', 7374, 7374, 'it', 7375, 7375, 'it', 7376, 7376, 'it', 7377, 7377, 'it', 7378, 7378, 'it', 7379, 7379, 'it', 3669, 3669, 'it', 3670, 3679, 'it', 3680, 3680, 'it', 3681, 3681, 'it', 3682, 3682, 'it', 3683, 3683, 'it', 3684, 3684, 'it', 3685, 3685, 'it', 3686, 3686, 'it', 3687, 3687, 'it', 3688, 3688, 'it', 3689, 3689, 'it', 3695, 3695, 'it', 3810, 3810, 'it', 7373, 7373, 'it', 3570, 3579, 'it', 5063, 5063, 'it', 5734, 5734, 'it', 5045, 5045, 'it', 5995, 5995, 'servs', 7020, 7021, 'servs', 7030, 7033, 'servs', 7200, 7200, 'servs', 7210, 7212, 'servs', 7214, 7214, 'servs', 721)
it works!
any ideas? real list twice long one. running r 3.1.1 on ubuntu 14.04 x64
edit:
when first list pasted file , run interpreter using source() seems behave appropriatly. unusual behaviour seems occur when pasting code in interpreter.
you're hitting console character limit. separate list multiple lines @ of comma delimiters.
r
No comments:
Post a Comment