[{"data":1,"prerenderedAt":2610},["ShallowReactive",2],{"/sr":3,"/sr-surround":2600},{"id":4,"title":5,"body":6,"description":2574,"extension":2575,"meta":2576,"navigation":2593,"path":2597,"seo":2598,"stem":79,"__hash__":2599},"content/sr.md","Simple R Extension",{"type":7,"value":8,"toc":2502},"minimark",[9,22,32,52,59,90,97,100,282,285,292,302,305,316,319,322,330,339,346,469,478,510,619,847,1270,1515,1716,1947,1987,2030,2053,2106,2129,2138,2141,2150,2178,2375,2384,2387],[10,11,15],"h1",{"id":12,"className":13},"simple-r",[14],"section-heading",[16,17,21],"a",{"className":18,"href":20},[19],"section-anchor","#simple-r","Simple R",[23,24,27],"h2",{"id":25,"className":26},"using",[14],[16,28,31],{"className":29,"href":30},[19],"#using","Using",[33,34,35,36,40,41,44,45,51],"p",{},"To run R code you must install R and have the ",[37,38,39],"code",{},"R"," executable on your ",[37,42,43],{},"PATH",".\nYou can download R from ",[16,46,50],{"href":47,"rel":48},"https://www.r-project.org/",[49],"nofollow","their site",".",[33,53,54,55,58],{},"To use this extension, you must first include it at the top of your NetLogo\nmodel code in an ",[37,56,57],{},"extensions"," declaration.",[60,61,62],"pre",{},[37,63,64,70,71,74,75,80,74,82,87,89],{},[65,66,57],"span",{"className":67},[68,69],"token","keyword"," [",[72,73],"br",{},"  ",[65,76,79],{"className":77},[68,78],"variable","sr",[72,81],{},[65,83,86],{"className":84},[68,85],"comment","; ... your other extensions",[72,88],{},"]",[33,91,92,93,96],{},"You must then initialize the R environment with ",[37,94,95],{},"sr:setup",".\nThis only needs to be done once per session.\nAny subsequent calls will reset your R environment.",[33,98,99],{},"Here’s an example to get you started:",[60,101,102],{},[37,103,104,108,109,112,114,118,120,108,123,108,128,108,132,137,139,108,143,148,150,154,156,108,159,108,163,167,169,108,173,177,179,183,185,189,191,108,194,108,198,108,203,108,207,210,211,108,215,108,219,224,225,227,108,230,108,234,70,238,241,242,108,246,108,249,108,252,255,257,108,260,108,263,108,266,269,271,108,274,108,278],{},[65,105,107],{"className":106},[68,78],"observer>"," ",[65,110,95],{"className":111},[68,78],[72,113],{},[65,115,117],{"className":116},[68,85],";; sr:runresult evaluates R statements and returns the result back to NetLogo",[72,119],{},[65,121,107],{"className":122},[68,78],[65,124,127],{"className":125},[68,126],"command","show",[65,129,131],{"className":130},[68,78],"sr:runresult",[65,133,136],{"className":134},[68,135],"string","\"2 + 2\"",[72,138],{},[65,140,142],{"className":141},[68,78],"observer:",[65,144,147],{"className":145},[68,146],"number","4",[72,149],{},[65,151,153],{"className":152},[68,85],";; sr:run runs R code",[72,155],{},[65,157,107],{"className":158},[68,78],[65,160,162],{"className":161},[68,78],"sr:run",[65,164,166],{"className":165},[68,135],"\"cat('hello world')\"",[72,168],{},[65,170,172],{"className":171},[68,78],"hello",[65,174,176],{"className":175},[68,78],"world",[72,178],{},[65,180,182],{"className":181},[68,85],";; any standard output gets forwarded to the command center output",[72,184],{},[65,186,188],{"className":187},[68,85],";; sr:set sets R variables to values from NetLogo",[72,190],{},[65,192,107],{"className":193},[68,78],[65,195,197],{"className":196},[68,126],"ask",[65,199,202],{"className":200},[68,201],"reporter","patch",[65,204,206],{"className":205},[68,146],"0",[65,208,206],{"className":209},[68,146]," [ ",[65,212,214],{"className":213},[68,126],"set",[65,216,218],{"className":217},[68,201],"pcolor",[65,220,223],{"className":221},[68,222],"constant","red"," ]",[72,226],{},[65,228,107],{"className":229},[68,78],[65,231,233],{"className":232},[68,78],"sr:set",[65,235,237],{"className":236},[68,135],"\"center_patch_color\"",[65,239,218],{"className":240},[68,201],"] ",[65,243,245],{"className":244},[68,201],"of",[65,247,202],{"className":248},[68,201],[65,250,206],{"className":251},[68,146],[65,253,206],{"className":254},[68,146],[72,256],{},[65,258,107],{"className":259},[68,78],[65,261,127],{"className":262},[68,126],[65,264,131],{"className":265},[68,78],[65,267,237],{"className":268},[68,135],[72,270],{},[65,272,142],{"className":273},[68,78],[65,275,277],{"className":276},[68,146],"15",[65,279,281],{"className":280},[68,85],";; the NetLogo representation of the color red",[33,283,284],{},"See the documentation for each of the particular primitives for details on,\nfor instance, how to multi-line statements and how object type conversions work.",[33,286,287,288,291],{},"The extension also includes an interactive R console/REPL that is connected to\nthe same R environment as the main window’s NetLogo environment.\nIt is useful for executing longer blocks of R code or quickly examining or modifying\nR values.\nThis console can be opened via the menu bar under the SimpleR heading,\nor by using the ",[37,289,290],{},"sr:show-console"," command.",[293,294,297],"h3",{"id":295,"className":296},"error-handling",[14],[16,298,301],{"className":299,"href":300},[19],"#error-handling","Error handling",[33,303,304],{},"R errors will be reported in NetLogo as “Extension exceptions”. For instance, this code:",[60,306,307],{},[37,308,309,108,312],{},[65,310,162],{"className":311},[68,78],[65,313,315],{"className":314},[68,135],"\"stop('hi')\"",[33,317,318],{},"will result in the NetLogo error “Extension exception: hi” appearing in an\nerror  dialog.\n,## Citing Simple R in Research",[33,320,321],{},"If you use the Simple R extension in research, we ask that you cite us,",[33,323,324,325,329],{},"Hovet, J. Head, B. & Wilensky, U. (2022). “Simple R NetLogo extension”. ",[16,326,327],{"href":327,"rel":328},"https://github.com/NetLogo/SimpleR-Extension",[49]," Evanston, IL: Center for Connected Learning and Computer Based Modeling, Northwestern University.",[23,331,334],{"id":332,"className":333},"primitives",[14],[16,335,338],{"className":336,"href":337},[19],"#primitives","Primitives",[33,340,341,342,51],{},"Looking for the primitive reference for the Simple R extension? You can find ",[16,343,345],{"href":344},"/sr/dictionary","the full reference here",[347,348,352,353,359,360,365,366,359,372,365,375,359,381,365,384,359,390,365,393,359,400,365,403,359,410,365,413,359,420,365,423,359,430,365,433,359,440,365,443,359,450,365,453,359,460,365,463],"div",{"id":349,"className":350},"all",[351],"prose","\n  ",[16,354,357],{"className":355,"href":356},[37],"#setup",[37,358,95],{},"\n   ",[65,361,364],{"className":362},[363],"font-bold"," · "," \n  ",[16,367,370],{"className":368,"href":369},[37],"#run",[37,371,162],{},[65,373,364],{"className":374},[363],[16,376,379],{"className":377,"href":378},[37],"#runresult",[37,380,131],{},[65,382,364],{"className":383},[363],[16,385,388],{"className":386,"href":387},[37],"#set",[37,389,233],{},[65,391,364],{"className":392},[363],[16,394,397],{"className":395,"href":396},[37],"#set-agent",[37,398,399],{},"sr:set-agent",[65,401,364],{"className":402},[363],[16,404,407],{"className":405,"href":406},[37],"#set-agent-data-frame",[37,408,409],{},"sr:set-agent-data-frame",[65,411,364],{"className":412},[363],[16,414,417],{"className":415,"href":416},[37],"#set-data-frame",[37,418,419],{},"sr:set-data-frame",[65,421,364],{"className":422},[363],[16,424,427],{"className":425,"href":426},[37],"#set-list",[37,428,429],{},"sr:set-list",[65,431,364],{"className":432},[363],[16,434,437],{"className":435,"href":436},[37],"#set-named-list",[37,438,439],{},"sr:set-named-list",[65,441,364],{"className":442},[363],[16,444,447],{"className":445,"href":446},[37],"#set-plot-device",[37,448,449],{},"sr:set-plot-device",[65,451,364],{"className":452},[363],[16,454,457],{"className":455,"href":456},[37],"#r-home",[37,458,459],{},"sr:r-home",[65,461,364],{"className":462},[363],[16,464,467],{"className":465,"href":466},[37],"#show-console",[37,468,290],{},[293,470,473],{"id":471,"className":472},"all-primitives",[14],[16,474,477],{"className":475,"href":476},[19],"#all-primitives","All Primitives",[347,479,352,483,352,489,502],{"className":480,"id":482},[481],"dict_entry","setup",[293,484,486,487,352],{"id":485},"srsetup","\n    ",[16,488,95],{"href":356},[490,491,494],"h4",{"id":492,"className":493},"srsetup-1",[14],[16,495,486,498,352],{"className":496,"href":497},[19],"#----srsetup---1",[65,499,95],{"className":500},[501],"prim_example",[33,503,504,505,509],{},"Create the R session that this extension will use to execute code.\nThis command ",[506,507,508],"em",{},"must"," be run before running any other R extension primitive.\nRunning this command again will shutdown the current R environment and start a new one.",[347,511,352,514,352,519,543,546,549,614],{"className":512,"id":513},[481],"run",[293,515,486,517,352],{"id":516},"srrun",[16,518,162],{"href":369},[490,520,523],{"id":521,"className":522},"srrun-r-statement-srrun-r-statement-repeatable",[14],[16,524,486,527,486,535,352],{"className":525,"href":526},[19],"#----srrun-r-statement----srrun-r-statement-repeatable--",[65,528,530,531],{"className":529},[501],"sr:run ",[532,533,534],"i",{},"r-statement",[65,536,530,538,108,540],{"className":537},[501],[532,539,534],{},[532,541,542],{},"repeatable",[33,544,545],{},"Runs the given R statements in the current session.\nTo make multi-line R code easier to run, this command will take multiple strings,\neach of which will be interpreted as a separate line of R code. This requires\nputting the command in parentheses.",[33,547,548],{},"For instance:",[60,550,551],{},[37,552,553,554,557,74,559,563,74,565,569,74,571,575,74,577,581,74,583,587,74,589,593,74,595,599,74,601,605,74,607,611,613],{},"(",[65,555,162],{"className":556},[68,78],[72,558],{},[65,560,562],{"className":561},[68,135],"\"domain \u003C- seq(-3.14, 3.14, 0.01)\"",[72,564],{},[65,566,568],{"className":567},[68,135],"\"range \u003C- sin(domain)\"",[72,570],{},[65,572,574],{"className":573},[68,135],"\"png('my_file.png')\"",[72,576],{},[65,578,580],{"className":579},[68,135],"\"plot(domain, range, \"",[72,582],{},[65,584,586],{"className":585},[68,135],"\"     pch = 20,\"",[72,588],{},[65,590,592],{"className":591},[68,135],"\"     main = 'y = sin(x)',\"",[72,594],{},[65,596,598],{"className":597},[68,135],"\"     xlab = 'x',\"",[72,600],{},[65,602,604],{"className":603},[68,135],"\"     ylab = 'y')\"",[72,606],{},[65,608,610],{"className":609},[68,135],"\"dev.off()\"",[72,612],{},")",[33,615,616,618],{},[37,617,162],{}," will wait for the statements to finish before continuing.\nIf you have long-running R code, NetLogo may freeze for a bit while it runs.",[347,620,352,623,352,628,643,650,653,656,689,696,844],{"className":621,"id":622},[481],"runresult",[293,624,486,626,352],{"id":625},"srrunresult",[16,627,131],{"href":378},[490,629,632],{"id":630,"className":631},"srrunresult-r-expression",[14],[16,633,486,636,352],{"className":634,"href":635},[19],"#----srrunresult-r-expression--",[65,637,639,640],{"className":638},[501],"sr:runresult ",[532,641,642],{},"r-expression",[33,644,645,646,649],{},"Evaluates the given R expression and reports the result.\n",[37,647,648],{},"rs:runresult"," attempts to convert from R data types to NetLogo data types.",[33,651,652],{},"Numbers, strings, and booleans convert as you would expect, except for outliers\nlike Infinity and NaN which will be converted into the strings ‘Inf’ and ‘NaN’,\nrespectively.",[33,654,655],{},"R vectors and R lists will be converted to NetLogo lists. NA values will be\nconverted into the string ‘NA’.",[33,657,658,659,662,663,676,677,51],{},"R matrices will be flattened into one-dimensional lists using column-major order.\nIf you want to convert a matrix into a list of lists before sending it to NetLogo,\nuse the R ",[37,660,661],{},"asplit"," command.\nTo convert into a list of column lists, use ",[37,664,665,553,668,108,672,613],{},[65,666,661],{"className":667},[68,78],[65,669,671],{"className":670},[68,78],"\u003Cmatrix>,",[65,673,675],{"className":674},[68,146],"1",";\nfor a list of row lists, use ",[37,678,679,553,682,108,685,613],{},[65,680,661],{"className":681},[68,78],[65,683,671],{"className":684},[68,78],[65,686,688],{"className":687},[68,146],"2",[33,690,691,692,695],{},"An R DataFrame will be converted into a list of lists, where the first item in\neach sublist is the name of the column and the second item is a list containing\nall that row data.\nFor example, the first 6 rows of the ",[37,693,694],{},"iris"," dataset will be converted into NetLogo like so:",[60,697,698],{},[37,699,700,701,703,704,70,708,108,712,108,716,108,720,108,724,108,728,732,733,703,735,70,739,108,743,108,747,108,751,108,755,108,759,732,763,703,765,70,769,108,773,108,776,108,780,108,784,108,787,732,791,703,793,70,797,108,801,108,804,108,807,108,810,108,813,732,817,703,819,70,823,108,827,108,830,108,833,108,836,108,839,732,842,89],{},"[",[72,702],{},"  [",[65,705,707],{"className":706},[68,135],"\"Sepal.Length\"",[65,709,711],{"className":710},[68,146],"5.1",[65,713,715],{"className":714},[68,146],"4.9",[65,717,719],{"className":718},[68,146],"4.7",[65,721,723],{"className":722},[68,146],"4.6",[65,725,727],{"className":726},[68,146],"5",[65,729,731],{"className":730},[68,146],"5.4","]]",[72,734],{},[65,736,738],{"className":737},[68,135],"\"Sepal.Width\"",[65,740,742],{"className":741},[68,146],"3.5",[65,744,746],{"className":745},[68,146],"3",[65,748,750],{"className":749},[68,146],"3.2",[65,752,754],{"className":753},[68,146],"3.1",[65,756,758],{"className":757},[68,146],"3.6",[65,760,762],{"className":761},[68,146],"3.9",[72,764],{},[65,766,768],{"className":767},[68,135],"\"Petal.Length\"",[65,770,772],{"className":771},[68,146],"1.4",[65,774,772],{"className":775},[68,146],[65,777,779],{"className":778},[68,146],"1.3",[65,781,783],{"className":782},[68,146],"1.5",[65,785,772],{"className":786},[68,146],[65,788,790],{"className":789},[68,146],"1.7",[72,792],{},[65,794,796],{"className":795},[68,135],"\"Petal.Width\"",[65,798,800],{"className":799},[68,146],"0.2",[65,802,800],{"className":803},[68,146],[65,805,800],{"className":806},[68,146],[65,808,800],{"className":809},[68,146],[65,811,800],{"className":812},[68,146],[65,814,816],{"className":815},[68,146],"0.4",[72,818],{},[65,820,822],{"className":821},[68,135],"\"Species\"",[65,824,826],{"className":825},[68,135],"\"setosa\"",[65,828,826],{"className":829},[68,135],[65,831,826],{"className":832},[68,135],[65,834,826],{"className":835},[68,135],[65,837,826],{"className":838},[68,135],[65,840,826],{"className":841},[68,135],[72,843],{},[33,845,846],{},"Other objects will be converted to a string representation if possible and and may throw\nan error if not.",[347,848,352,850,352,855,873,876,879,979,982,991,999,1002,1267],{"className":849,"id":214},[481],[293,851,486,853,352],{"id":852},"srset",[16,854,233],{"href":387},[490,856,859],{"id":857,"className":858},"srset-variable-name-value",[14],[16,860,486,863,352],{"className":861,"href":862},[19],"#----srset-variable-name-value--",[65,864,866,867,108,870],{"className":865},[501],"sr:set ",[532,868,869],{},"variable-name",[532,871,872],{},"value",[33,874,875],{},"Sets a variable in the R session with the given name to the given NetLogo value.\nNetLogo objects will be converted to R objects as expected.",[33,877,878],{},"Note that lists in NetLogo are converted into lists in R if the elements are of different\ntypes.  If all the elements of a NetLogo list are of the identical number, boolean, or\nstring type then the data will be automatically converted into a vector in R.",[60,880,881],{},[37,882,883,108,886,108,890,894,896,108,899,108,903,907,909,108,912,70,916,108,919,108,922,89,925,927,108,930,108,934,938,940,108,943,108,947,951,953,108,956,108,960,964,966,108,969,108,972,108,975],{},[65,884,233],{"className":885},[68,78],[65,887,889],{"className":888},[68,135],"\"x\"",[65,891,893],{"className":892},[68,146],"42",[72,895],{},[65,897,162],{"className":898},[68,78],[65,900,902],{"className":901},[68,135],"\"print(x)\"",[65,904,906],{"className":905},[68,85],";; prints `[1] 42` to the command center",[72,908],{},[65,910,233],{"className":911},[68,78],[65,913,915],{"className":914},[68,135],"\"y\"",[65,917,675],{"className":918},[68,146],[65,920,688],{"className":921},[68,146],[65,923,746],{"className":924},[68,146],[72,926],{},[65,928,162],{"className":929},[68,78],[65,931,933],{"className":932},[68,135],"\"print(typeof(y))\"",[65,935,937],{"className":936},[68,85],";; prints `[1] \"double\"` to the command center",[72,939],{},[65,941,162],{"className":942},[68,78],[65,944,946],{"className":945},[68,135],"\"print(typeof(list(y)))\"",[65,948,950],{"className":949},[68,85],";; prints `[1] \"list\"` to the command center",[72,952],{},[65,954,162],{"className":955},[68,78],[65,957,959],{"className":958},[68,135],"\"print(y)\"",[65,961,963],{"className":962},[68,85],";; prints `[1] 1 2 3` to the command center",[72,965],{},[65,967,127],{"className":968},[68,126],[65,970,131],{"className":971},[68,78],[65,973,915],{"className":974},[68,135],[65,976,978],{"className":977},[68,85],";; reports [1 2 3]",[33,980,981],{},"Agents are converted into lists with named elements for each agent variable.",[33,983,984,985,987,988,990],{},"Agentsets are converted into a list of the above lists. If you want to convert\nagents to a data frame, see ",[37,986,409],{},".  If you want to use ",[37,989,233],{},"\nand do the conversion manually, try the following:",[60,992,997],{"className":993,"code":995,"language":39,"meta":996},[994],"language-R","my_data_frame \u003C- as.data.frame(do.call(rbind, \u003Cagentset-list-of-lists>))\n","",[37,998,995],{"__ignoreMap":996},[33,1000,1001],{},"For example:",[60,1003,1004],{},[37,1005,1006,70,1010,108,1014,89,1018,70,1024,224,1028,1030,108,1034,210,1037,108,1040,108,1044,224,1048,1050,108,1053,108,1056,210,1059,108,1062,108,1065,108,1068,108,1071,108,1075,89,1078,1080,108,1083,108,1086,210,1089,108,1092,108,1095,108,1099,108,1102,108,1105,89,1109,1111,1113,108,1116,108,1120,108,1123,1126,1128,108,1131,108,1135,1138,1140,108,1143,1147,1149,1153,1155,1159,1161,1165,1167,1171,1173,1177,1179,1183,1185,1189,1191,1193,108,1196,108,1200,1203,1205,108,1208,1212,1214,108,1217,1221,1223,1226,1228,1232,1234,1238,1240,1244,1246,1250,1252,1256,1258,1262,1264],{},[65,1007,1009],{"className":1008},[68,69],"breed",[65,1011,1013],{"className":1012},[68,78],"goats",[65,1015,1017],{"className":1016},[68,78],"goat",[65,1019,1021,1023],{"className":1020},[68,69],[72,1022],{},"goats-own",[65,1025,1027],{"className":1026},[68,78],"energy",[72,1029],{},[65,1031,1033],{"className":1032},[68,78],"create-goats",[65,1035,688],{"className":1036},[68,146],[65,1038,214],{"className":1039},[68,126],[65,1041,1043],{"className":1042},[68,201],"color",[65,1045,1047],{"className":1046},[68,146],"75",[72,1049],{},[65,1051,197],{"className":1052},[68,126],[65,1054,1017],{"className":1055},[68,78],[65,1057,206],{"className":1058},[68,146],[65,1060,214],{"className":1061},[68,126],[65,1063,1027],{"className":1064},[68,78],[65,1066,893],{"className":1067},[68,146],[65,1069,214],{"className":1070},[68,126],[65,1072,1074],{"className":1073},[68,201],"xcor",[65,1076,727],{"className":1077},[68,146],[72,1079],{},[65,1081,197],{"className":1082},[68,126],[65,1084,1017],{"className":1085},[68,78],[65,1087,675],{"className":1088},[68,146],[65,1090,214],{"className":1091},[68,126],[65,1093,1027],{"className":1094},[68,78],[65,1096,1098],{"className":1097},[68,146],"-42",[65,1100,214],{"className":1101},[68,126],[65,1103,1074],{"className":1104},[68,201],[65,1106,1108],{"className":1107},[68,146],"-5",[72,1110],{},[72,1112],{},[65,1114,233],{"className":1115},[68,78],[65,1117,1119],{"className":1118},[68,135],"\"goat\"",[65,1121,1017],{"className":1122},[68,78],[65,1124,206],{"className":1125},[68,146],[72,1127],{},[65,1129,162],{"className":1130},[68,78],[65,1132,1134],{"className":1133},[68,135],"\"print(typeof(goat))\"",[65,1136,950],{"className":1137},[68,85],[72,1139],{},[65,1141,162],{"className":1142},[68,78],[65,1144,1146],{"className":1145},[68,135],"\"print(goat)\"",[72,1148],{},[65,1150,1152],{"className":1151},[68,85],";; Should output:",[72,1154],{},[65,1156,1158],{"className":1157},[68,85],";; $WHO",[72,1160],{},[65,1162,1164],{"className":1163},[68,85],";; [1] 0",[72,1166],{},[65,1168,1170],{"className":1169},[68,85],";;",[72,1172],{},[65,1174,1176],{"className":1175},[68,85],";; $COLOR",[72,1178],{},[65,1180,1182],{"className":1181},[68,85],";; [1] 75",[72,1184],{},[65,1186,1188],{"className":1187},[68,85],";; (etc.)",[72,1190],{},[72,1192],{},[65,1194,233],{"className":1195},[68,78],[65,1197,1199],{"className":1198},[68,135],"\"goats_list_of_lists\"",[65,1201,1013],{"className":1202},[68,78],[72,1204],{},[65,1206,162],{"className":1207},[68,78],[65,1209,1211],{"className":1210},[68,135],"\"goats_data_frame \u003C- as.data.frame(do.call(rbind, goats_list_of_lists))\"",[72,1213],{},[65,1215,162],{"className":1216},[68,78],[65,1218,1220],{"className":1219},[68,135],"\"print(goats_data_frame)\"",[72,1222],{},[65,1224,1152],{"className":1225},[68,85],[72,1227],{},[65,1229,1231],{"className":1230},[68,85],";;   WHO COLOR HEADING XCOR YCOR   SHAPE LABEL LABEL-COLOR BREED HIDDEN? SIZE",[72,1233],{},[65,1235,1237],{"className":1236},[68,85],";; 1   0    75      82    5    0 default               9.9 GOATS   FALSE    1",[72,1239],{},[65,1241,1243],{"className":1242},[68,85],";; 2   1    75     200   -5    0 default               9.9 GOATS   FALSE    1",[72,1245],{},[65,1247,1249],{"className":1248},[68,85],";;   PEN-SIZE PEN-MODE ENERGY",[72,1251],{},[65,1253,1255],{"className":1254},[68,85],";; 1        1       up     42",[72,1257],{},[65,1259,1261],{"className":1260},[68,85],";; 2        1       up    -42",[72,1263],{},[65,1265,1170],{"className":1266},[68,85],[33,1268,1269],{},"Agents with variables containing references to agentsets will have those variables converted into the string representation of that agentset.",[347,1271,352,1274,352,1279,1313,1316],{"className":1272,"id":1273},[481],"set-agent",[293,1275,486,1277,352],{"id":1276},"srset-agent",[16,1278,399],{"href":396},[490,1280,1283],{"id":1281,"className":1282},"srset-agent-r-variable-name-agent-or-agentset-agent-variable-name-srset-agent-r-variable-name-agent-or-agentset-agent-variable-name1-agent-variable-name2",[14],[16,1284,486,1287,486,1300,352],{"className":1285,"href":1286},[19],"#----srset-agent-r-variable-name-agent-or-agentset-agent-variable-name----srset-agent-r-variable-name-agent-or-agentset-agent-variable-name1-agent-variable-name2--",[65,1288,1290,1291,108,1294,108,1297],{"className":1289},[501],"sr:set-agent ",[532,1292,1293],{},"r-variable-name",[532,1295,1296],{},"agent or agentset",[532,1298,1299],{},"agent-variable-name",[65,1301,1290,1303,108,1305,108,1307,108,1310],{"className":1302},[501],[532,1304,1293],{},[532,1306,1296],{},[532,1308,1309],{},"agent-variable-name1",[532,1311,1312],{},"agent-variable-name2...",[33,1314,1315],{},"Creates a new named list in R with the given variable name.  If you want multiple agent variables make sure to surround the command in parenthesis.",[60,1317,1318],{},[37,1319,1320,1324,1326,1329,1331,108,1335,1338,1340,108,1343,108,1347,210,1350,108,1353,108,1356,108,1359,108,1362,108,1365,89,1368,1370,108,1373,108,1376,210,1379,108,1382,108,1385,108,1389,108,1392,108,1395,89,1398,553,1400,108,1403,108,1407,108,1410,108,1413,108,1417,108,1421,108,1425,613,1429,1431,108,1434,1438,1440,1444,1446,108,1449,1453,1455,1459,1461,1464,1466,1469,1471,1475,1477,1481,1483,1486,1488,1492,1494,1498,1500,1503,1505,1509,1511],{},[65,1321,1323],{"className":1322},[68,126],"clear-all",[72,1325],{},[65,1327,95],{"className":1328},[68,78],[72,1330],{},[65,1332,1334],{"className":1333},[68,126],"create-turtles",[65,1336,688],{"className":1337},[68,146],[72,1339],{},[65,1341,197],{"className":1342},[68,126],[65,1344,1346],{"className":1345},[68,201],"turtle",[65,1348,206],{"className":1349},[68,146],[65,1351,214],{"className":1352},[68,126],[65,1354,1043],{"className":1355},[68,201],[65,1357,223],{"className":1358},[68,222],[65,1360,214],{"className":1361},[68,126],[65,1363,1074],{"className":1364},[68,201],[65,1366,727],{"className":1367},[68,146],[72,1369],{},[65,1371,197],{"className":1372},[68,126],[65,1374,1346],{"className":1375},[68,201],[65,1377,675],{"className":1378},[68,146],[65,1380,214],{"className":1381},[68,126],[65,1383,1043],{"className":1384},[68,201],[65,1386,1388],{"className":1387},[68,222],"blue",[65,1390,214],{"className":1391},[68,126],[65,1393,1074],{"className":1394},[68,201],[65,1396,1108],{"className":1397},[68,146],[72,1399],{},[65,1401,399],{"className":1402},[68,78],[65,1404,1406],{"className":1405},[68,135],"\"t0\"",[65,1408,1346],{"className":1409},[68,201],[65,1411,206],{"className":1412},[68,146],[65,1414,1416],{"className":1415},[68,135],"\"who\"",[65,1418,1420],{"className":1419},[68,135],"\"color\"",[65,1422,1424],{"className":1423},[68,135],"\"xcor\"",[65,1426,1428],{"className":1427},[68,135],"\"hidden?\"",[72,1430],{},[65,1432,162],{"className":1433},[68,78],[65,1435,1437],{"className":1436},[68,135],"\"print(typeof(t0))\"",[72,1439],{},[65,1441,1443],{"className":1442},[68,85],";; [1] \"list\"",[72,1445],{},[65,1447,162],{"className":1448},[68,78],[65,1450,1452],{"className":1451},[68,135],"\"print(t0)\"",[72,1454],{},[65,1456,1458],{"className":1457},[68,85],";; $who",[72,1460],{},[65,1462,1164],{"className":1463},[68,85],[72,1465],{},[65,1467,1170],{"className":1468},[68,85],[72,1470],{},[65,1472,1474],{"className":1473},[68,85],";; $color",[72,1476],{},[65,1478,1480],{"className":1479},[68,85],";; [1] 15",[72,1482],{},[65,1484,1170],{"className":1485},[68,85],[72,1487],{},[65,1489,1491],{"className":1490},[68,85],";; $xcor",[72,1493],{},[65,1495,1497],{"className":1496},[68,85],";; [1] 5",[72,1499],{},[65,1501,1170],{"className":1502},[68,85],[72,1504],{},[65,1506,1508],{"className":1507},[68,85],";; $`hidden?`",[72,1510],{},[65,1512,1514],{"className":1513},[68,85],";; [1] FALSE",[347,1516,352,1519,352,1524,1554,1557],{"className":1517,"id":1518},[481],"set-agent-data-frame",[293,1520,486,1522,352],{"id":1521},"srset-agent-data-frame",[16,1523,409],{"href":406},[490,1525,1528],{"id":1526,"className":1527},"srset-agent-data-frame-r-variable-name-agents-agent-variable-name-srset-agent-data-frame-r-variable-name-agents-agent-variable-name1-agent-variable-name2",[14],[16,1529,486,1532,486,1543,352],{"className":1530,"href":1531},[19],"#----srset-agent-data-frame-r-variable-name-agents-agent-variable-name----srset-agent-data-frame-r-variable-name-agents-agent-variable-name1-agent-variable-name2--",[65,1533,1535,1536,108,1538,108,1541],{"className":1534},[501],"sr:set-agent-data-frame ",[532,1537,1293],{},[532,1539,1540],{},"agents",[532,1542,1299],{},[65,1544,1535,1546,108,1548,108,1550,108,1552],{"className":1545},[501],[532,1547,1293],{},[532,1549,1540],{},[532,1551,1309],{},[532,1553,1312],{},[33,1555,1556],{},"Creates a new data frame in R with the given variable name.\nThe columns will have the names of the NetLogo agent variables used and each row will\nbe one agent’s data.  If you want multiple agent variables make sure to surround\nthe command in parenthesis.",[60,1558,1559],{},[37,1560,1561,1564,1566,1569,1571,108,1574,1577,1579,108,1582,108,1585,210,1588,108,1591,108,1594,108,1597,108,1600,108,1603,89,1606,1608,108,1611,108,1614,210,1617,108,1620,108,1623,108,1626,108,1629,108,1632,89,1635,553,1637,108,1640,108,1644,108,1648,108,1651,108,1654,108,1657,613,1660,1662,108,1665,1669,1671,1674,1676,108,1679,1683,1685,1689,1691,108,1694,1698,1700,1704,1706,1710,1712],{},[65,1562,1323],{"className":1563},[68,126],[72,1565],{},[65,1567,95],{"className":1568},[68,78],[72,1570],{},[65,1572,1334],{"className":1573},[68,126],[65,1575,688],{"className":1576},[68,146],[72,1578],{},[65,1580,197],{"className":1581},[68,126],[65,1583,1346],{"className":1584},[68,201],[65,1586,206],{"className":1587},[68,146],[65,1589,214],{"className":1590},[68,126],[65,1592,1043],{"className":1593},[68,201],[65,1595,223],{"className":1596},[68,222],[65,1598,214],{"className":1599},[68,126],[65,1601,1074],{"className":1602},[68,201],[65,1604,727],{"className":1605},[68,146],[72,1607],{},[65,1609,197],{"className":1610},[68,126],[65,1612,1346],{"className":1613},[68,201],[65,1615,675],{"className":1616},[68,146],[65,1618,214],{"className":1619},[68,126],[65,1621,1043],{"className":1622},[68,201],[65,1624,1388],{"className":1625},[68,222],[65,1627,214],{"className":1628},[68,126],[65,1630,1074],{"className":1631},[68,201],[65,1633,1108],{"className":1634},[68,146],[72,1636],{},[65,1638,409],{"className":1639},[68,78],[65,1641,1643],{"className":1642},[68,135],"\"turtles_data_frame\"",[65,1645,1647],{"className":1646},[68,201],"turtles",[65,1649,1416],{"className":1650},[68,135],[65,1652,1420],{"className":1653},[68,135],[65,1655,1424],{"className":1656},[68,135],[65,1658,1428],{"className":1659},[68,135],[72,1661],{},[65,1663,162],{"className":1664},[68,78],[65,1666,1668],{"className":1667},[68,135],"\"print(typeof(turtles_data_frame))\"",[72,1670],{},[65,1672,1443],{"className":1673},[68,85],[72,1675],{},[65,1677,162],{"className":1678},[68,78],[65,1680,1682],{"className":1681},[68,135],"\"print(is.data.frame(turtles_data_frame))\"",[72,1684],{},[65,1686,1688],{"className":1687},[68,85],";; [1] TRUE",[72,1690],{},[65,1692,162],{"className":1693},[68,78],[65,1695,1697],{"className":1696},[68,135],"\"print(turtles_data_frame)\"",[72,1699],{},[65,1701,1703],{"className":1702},[68,85],";;   who color xcor hidden?",[72,1705],{},[65,1707,1709],{"className":1708},[68,85],";; 1   0    15    5   FALSE",[72,1711],{},[65,1713,1715],{"className":1714},[68,85],";; 2   1   105   -5   FALSE",[347,1717,352,1720,352,1725,1762,1765],{"className":1718,"id":1719},[481],"set-data-frame",[293,1721,486,1723,352],{"id":1722},"srset-data-frame",[16,1724,419],{"href":416},[490,1726,1729],{"id":1727,"className":1728},"srset-data-frame-r-variable-name-column-name-list-or-anything-srset-data-frame-variable-name-column-name1-list-or-anything-1-column-name2-list-or-anything-2",[14],[16,1730,486,1733,486,1745,352],{"className":1731,"href":1732},[19],"#----srset-data-frame-r-variable-name-column-name-list-or-anything----srset-data-frame-variable-name-column-name1-list-or-anything-1-column-name2-list-or-anything-2--",[65,1734,1736,1737,108,1739,108,1742],{"className":1735},[501],"sr:set-data-frame ",[532,1738,1293],{},[532,1740,1741],{},"column-name",[532,1743,1744],{},"list or anything",[65,1746,1736,1748,108,1750,108,1753,108,1756,108,1759],{"className":1747},[501],[532,1749,869],{},[532,1751,1752],{},"column-name1",[532,1754,1755],{},"list or anything 1",[532,1757,1758],{},"column-name2",[532,1760,1761],{},"list or anything 2...",[33,1763,1764],{},"Creates a new data frame in R with the given variable name.  The columns will have the names given.  If the value for a column is a list, those will be the values for that column.  If the value is a non-list, it will be used as the single item in that column.  You can add additional column names and values by surrounding the command in parenthesis.",[60,1766,1767],{},[37,1768,1769,1772,1774,1777,1779,108,1783,70,1787,108,1791,108,1795,108,1799,89,1803,1805,108,1808,70,1812,108,1816,108,1820,108,1823,89,1826,1828,108,1831,70,1835,108,1839,108,1843,108,1847,89,1851,553,1853,108,1856,108,1860,108,1864,108,1867,108,1871,108,1874,108,1877,613,1880,1882,108,1885,1889,1891,1894,1896,108,1899,1903,1905,1908,1910,108,1913,1917,1919,1923,1925,1929,1931,1935,1937,1941,1943],{},[65,1770,1323],{"className":1771},[68,126],[72,1773],{},[65,1775,95],{"className":1776},[68,78],[72,1778],{},[65,1780,1782],{"className":1781},[68,126],"let",[65,1784,1786],{"className":1785},[68,78],"l1",[65,1788,1790],{"className":1789},[68,146],"10",[65,1792,1794],{"className":1793},[68,146],"20",[65,1796,1798],{"className":1797},[68,146],"30",[65,1800,1802],{"className":1801},[68,146],"40",[72,1804],{},[65,1806,1782],{"className":1807},[68,126],[65,1809,1811],{"className":1810},[68,78],"l2",[65,1813,1815],{"className":1814},[68,222],"false",[65,1817,1819],{"className":1818},[68,222],"true",[65,1821,1815],{"className":1822},[68,222],[65,1824,1815],{"className":1825},[68,222],[72,1827],{},[65,1829,1782],{"className":1830},[68,126],[65,1832,1834],{"className":1833},[68,78],"l3",[65,1836,1838],{"className":1837},[68,135],"\"orange\"",[65,1840,1842],{"className":1841},[68,135],"\"green\"",[65,1844,1846],{"className":1845},[68,135],"\"blue\"",[65,1848,1850],{"className":1849},[68,135],"\"purple\"",[72,1852],{},[65,1854,419],{"className":1855},[68,78],[65,1857,1859],{"className":1858},[68,135],"\"df1\"",[65,1861,1863],{"className":1862},[68,135],"\"score\"",[65,1865,1786],{"className":1866},[68,78],[65,1868,1870],{"className":1869},[68,135],"\"enabled\"",[65,1872,1811],{"className":1873},[68,78],[65,1875,1420],{"className":1876},[68,135],[65,1878,1834],{"className":1879},[68,78],[72,1881],{},[65,1883,162],{"className":1884},[68,78],[65,1886,1888],{"className":1887},[68,135],"\"print(typeof(df1))\"",[72,1890],{},[65,1892,1443],{"className":1893},[68,85],[72,1895],{},[65,1897,162],{"className":1898},[68,78],[65,1900,1902],{"className":1901},[68,135],"\"print(is.data.frame(df1))\"",[72,1904],{},[65,1906,1688],{"className":1907},[68,85],[72,1909],{},[65,1911,162],{"className":1912},[68,78],[65,1914,1916],{"className":1915},[68,135],"\"print(df1)\"",[72,1918],{},[65,1920,1922],{"className":1921},[68,85],";;   score enabled  color",[72,1924],{},[65,1926,1928],{"className":1927},[68,85],";; 1    10   FALSE orange",[72,1930],{},[65,1932,1934],{"className":1933},[68,85],";; 2    20    TRUE  green",[72,1936],{},[65,1938,1940],{"className":1939},[68,85],";; 3    30   FALSE   blue",[72,1942],{},[65,1944,1946],{"className":1945},[68,85],";; 4    40   FALSE purple",[347,1948,352,1951,352,1956,1984],{"className":1949,"id":1950},[481],"set-list",[293,1952,486,1954,352],{"id":1953},"srset-list",[16,1955,429],{"href":426},[490,1957,1960],{"id":1958,"className":1959},"srset-list-r-variable-name-anything-srset-list-r-variable-name-anything1-anything2",[14],[16,1961,486,1964,486,1973,352],{"className":1962,"href":1963},[19],"#----srset-list-r-variable-name-anything----srset-list-r-variable-name-anything1-anything2--",[65,1965,1967,1968,108,1970],{"className":1966},[501],"sr:set-list ",[532,1969,1293],{},[532,1971,1972],{},"anything",[65,1974,1967,1976,108,1978,108,1981],{"className":1975},[501],[532,1977,1293],{},[532,1979,1980],{},"anything1",[532,1982,1983],{},"anything2...",[33,1985,1986],{},"Creates a new list in R with the given variable name.  You can add additional values by surrounding the command in parenthesis.",[347,1988,352,1991,352,1996,2027],{"className":1989,"id":1990},[481],"set-named-list",[293,1992,486,1994,352],{"id":1993},"srset-named-list",[16,1995,439],{"href":436},[490,1997,2000],{"id":1998,"className":1999},"srset-named-list-r-variable-name-column-name-list-or-anything-srset-named-list-r-variable-name-column-name1-list-or-anything-1-column-name2-list-or-anything-2",[14],[16,2001,486,2004,486,2014,352],{"className":2002,"href":2003},[19],"#----srset-named-list-r-variable-name-column-name-list-or-anything----srset-named-list-r-variable-name-column-name1-list-or-anything-1-column-name2-list-or-anything-2--",[65,2005,2007,2008,108,2010,108,2012],{"className":2006},[501],"sr:set-named-list ",[532,2009,1293],{},[532,2011,1741],{},[532,2013,1744],{},[65,2015,2007,2017,108,2019,108,2021,108,2023,108,2025],{"className":2016},[501],[532,2018,1293],{},[532,2020,1752],{},[532,2022,1755],{},[532,2024,1758],{},[532,2026,1761],{},[33,2028,2029],{},"Creates a new named list in R with the given variable name.  The columns will have the names given.  If the value for a column is a list, those will be the values for that column.  If the value is a non-list, it will be used as the single item in that column.  You can add additional column names and values by surrounding the command in parenthesis.",[347,2031,352,2034,352,2039,2050],{"className":2032,"id":2033},[481],"set-plot-device",[293,2035,486,2037,352],{"id":2036},"srset-plot-device",[16,2038,449],{"href":446},[490,2040,2043],{"id":2041,"className":2042},"srset-plot-device-1",[14],[16,2044,486,2047,352],{"className":2045,"href":2046},[19],"#----srset-plot-device---1",[65,2048,449],{"className":2049},[501],[33,2051,2052],{},"Activates the visual plot device for R, popping open a window if one is not already open.",[347,2054,352,2057,352,2062,2073,2076],{"className":2055,"id":2056},[481],"r-home",[293,2058,486,2060,352],{"id":2059},"srr-home",[16,2061,459],{"href":456},[490,2063,2066],{"id":2064,"className":2065},"srr-home-1",[14],[16,2067,486,2070,352],{"className":2068,"href":2069},[19],"#----srr-home---1",[65,2071,459],{"className":2072},[501],[33,2074,2075],{},"Outputs the R home directory which is the top-level directory of the R installation\nbeing run.",[60,2077,2078],{},[37,2079,2080,108,2083,2086,2088,108,2091,108,2094,2097,2099,108,2102],{},[65,2081,107],{"className":2082},[68,78],[65,2084,95],{"className":2085},[68,78],[72,2087],{},[65,2089,107],{"className":2090},[68,78],[65,2092,127],{"className":2093},[68,126],[65,2095,459],{"className":2096},[68,78],[72,2098],{},[65,2100,142],{"className":2101},[68,78],[65,2103,2105],{"className":2104},[68,135],"\"/Library/Frameworks/R.framework/Resources\"",[347,2107,352,2110,352,2115,2126],{"className":2108,"id":2109},[481],"show-console",[293,2111,486,2113,352],{"id":2112},"srshow-console",[16,2114,290],{"href":466},[490,2116,2119],{"id":2117,"className":2118},"srshow-console-1",[14],[16,2120,486,2123,352],{"className":2121,"href":2122},[19],"#----srshow-console---1",[65,2124,290],{"className":2125},[501],[33,2127,2128],{},"Opens the R console. This console can be opened via the menu bar under the SimpleR heading.",[23,2130,2133],{"id":2131,"className":2132},"transitioning-from-the-old-r-extension",[14],[16,2134,2137],{"className":2135,"href":2136},[19],"#transitioning-from-the-old-r-extension","Transitioning from the old R extension",[33,2139,2140],{},"As of version 2.0 of the Simple R extension, most primitives from the old R extension\nhave a direct equivalent you can switch over to use, with a different name but identical\nsyntax.  One change in functionality is that when a named list with a single row and\ncolumn is returned, in the R extension you’d get simply the value, in the Simple R\nextension you will get a list with the column name and the value as elements.\nIf there is more than 1 element, you will get a list with the column name and a list\nof the values.",[293,2142,2145],{"id":2143,"className":2144},"using-the-simple-r-code-converter",[14],[16,2146,2149],{"className":2147,"href":2148},[19],"#using-the-simple-r-code-converter","Using the Simple R code converter",[2151,2152,2153,2157,2160,2163,2166,2169,2175],"ul",{},[2154,2155,2156],"li",{},"Open the code tab of your model.",[2154,2158,2159],{},"Change r to sr in the extensions line .",[2154,2161,2162],{},"Click the “Check” button.",[2154,2164,2165],{},"From the “SimpleR Extension” menu choose “Convert code from R extension”.",[2154,2167,2168],{},"The primitives will be updated.",[2154,2170,2171,2172,2174],{},"You may need to add ",[37,2173,95],{}," in your setup procedure (or equivalent) in order too start a new R environment.",[2154,2176,2177],{},"You will need to change any code that returns a named list.",[347,2179,2182],{"className":2180},[2181],"table-container",[2183,2184,2185,2198],"table",{},[2186,2187,2188],"thead",{},[2189,2190,2191,2195],"tr",{},[2192,2193,2194],"th",{},"R Extension Primitive",[2192,2196,2197],{},"Simple R Extension Primitive",[2199,2200,2201,2213,2224,2235,2246,2257,2268,2279,2290,2301,2312,2323,2336,2347,2357,2366],"tbody",{},[2189,2202,2203,2209],{},[2204,2205,2206],"td",{},[37,2207,2208],{},"r:put",[2204,2210,2211],{},[37,2212,233],{},[2189,2214,2215,2220],{},[2204,2216,2217],{},[37,2218,2219],{},"r:get",[2204,2221,2222],{},[37,2223,131],{},[2189,2225,2226,2231],{},[2204,2227,2228],{},[37,2229,2230],{},"r:eval",[2204,2232,2233],{},[37,2234,162],{},[2189,2236,2237,2242],{},[2204,2238,2239],{},[37,2240,2241],{},"r:__evaldirect",[2204,2243,2244],{},[37,2245,162],{},[2189,2247,2248,2253],{},[2204,2249,2250],{},[37,2251,2252],{},"r:putList",[2204,2254,2255],{},[37,2256,429],{},[2189,2258,2259,2264],{},[2204,2260,2261],{},[37,2262,2263],{},"r:putNamedList",[2204,2265,2266],{},[37,2267,439],{},[2189,2269,2270,2275],{},[2204,2271,2272],{},[37,2273,2274],{},"r:putDataFrame",[2204,2276,2277],{},[37,2278,419],{},[2189,2280,2281,2286],{},[2204,2282,2283],{},[37,2284,2285],{},"r:putAgent",[2204,2287,2288],{},[37,2289,399],{},[2189,2291,2292,2297],{},[2204,2293,2294],{},[37,2295,2296],{},"r:putAgentDf",[2204,2298,2299],{},[37,2300,409],{},[2189,2302,2303,2308],{},[2204,2304,2305],{},[37,2306,2307],{},"r:setPlotDevice",[2204,2309,2310],{},[37,2311,449],{},[2189,2313,2314,2319],{},[2204,2315,2316],{},[37,2317,2318],{},"r:interactiveShell",[2204,2320,2321],{},[37,2322,290],{},[2189,2324,2325,2330],{},[2204,2326,2327],{},[37,2328,2329],{},"r:clear",[2204,2331,2332,2333,2335],{},"No exact equivalent, but ",[37,2334,95],{}," will start a new R environment",[2189,2337,2338,2343],{},[2204,2339,2340],{},[37,2341,2342],{},"r:clearLocal",[2204,2344,2332,2345,2335],{},[37,2346,95],{},[2189,2348,2349,2354],{},[2204,2350,2351],{},[37,2352,2353],{},"r:gc",[2204,2355,2356],{},"No equivalent, functionality is no longer needed",[2189,2358,2359,2364],{},[2204,2360,2361],{},[37,2362,2363],{},"r:stop",[2204,2365,2356],{},[2189,2367,2368,2373],{},[2204,2369,2370],{},[37,2371,2372],{},"r:jri-path",[2204,2374,2356],{},[293,2376,2379],{"id":2377,"className":2378},"handling-a-named-list",[14],[16,2380,2383],{"className":2381,"href":2382},[19],"#handling-a-named-list","Handling a named list",[33,2385,2386],{},"R’s statistical functions often return lists.\nThe R extension stripped out names to give you values.\nWith the Simple R extension the user must extract the value",[60,2388,2389],{},[37,2390,2391,108,2394,2398,2400,74,2402,2406,74,2408,2412,74,2414,2418,74,2420,108,2423,74,2427,108,2430,74,2434,108,2438,108,2442,2445,2446,108,2450,732,2454,74,2456,108,2459,108,2462,108,2465,2469,74,2471,2475,74,2477,108,2480,108,2483,108,2487,2490,2491,108,2494,108,2497,613,2500],{},[65,2392,162],{"className":2393},[68,78],[65,2395,2397],{"className":2396},[68,135],"\"c \u003C- cor.test(turtles$weight, turtles$height, method = 'spearm', alternative = 'g')\"",[72,2399],{},[72,2401],{},[65,2403,2405],{"className":2404},[68,85],";; original code",[72,2407],{},[65,2409,2411],{"className":2410},[68,85],";; let p sr:get \"c$p.value\"",[72,2413],{},[65,2415,2417],{"className":2416},[68,85],";; let rho sr:get \"c$estimate\"           # sample value  0.673271955983285",[72,2419],{},[65,2421,1782],{"className":2422},[68,126],[65,2424,2426],{"className":2425},[68,78],"estimate",[65,2428,131],{"className":2429},[68,78],[65,2431,2433],{"className":2432},[68,135],"\"c$estimate\"",[65,2435,2437],{"className":2436},[68,78],"#",[65,2439,2441],{"className":2440},[68,78],"sample",[65,2443,872],{"className":2444},[68,78],"  [[",[65,2447,2449],{"className":2448},[68,78],"rho",[65,2451,2453],{"className":2452},[68,146],"-0.121575984990619",[72,2455],{},[65,2457,1782],{"className":2458},[68,126],[65,2460,33],{"className":2461},[68,78],[65,2463,131],{"className":2464},[68,78],[65,2466,2468],{"className":2467},[68,135],"\"c$p.value\"",[72,2470],{},[65,2472,2474],{"className":2473},[68,85],";; select result from list",[72,2476],{},[65,2478,1782],{"className":2479},[68,126],[65,2481,2449],{"className":2482},[68,78],[65,2484,2486],{"className":2485},[68,201],"item",[65,2488,675],{"className":2489},[68,146]," (",[65,2492,2486],{"className":2493},[68,201],[65,2495,206],{"className":2496},[68,146],[65,2498,2426],{"className":2499},[68,78],[72,2501],{},{"title":996,"searchDepth":2503,"depth":2504,"links":2505},5,3,[2506,2510,2570],{"id":25,"depth":2507,"text":31,"children":2508},2,[2509],{"id":295,"depth":2504,"text":301},{"id":332,"depth":2507,"text":338,"children":2511},[2512,2513,2518,2523,2528,2533,2538,2543,2548,2553,2558,2562,2566],{"id":471,"depth":2504,"text":477},{"id":485,"depth":2504,"text":2514,"children":2515},"\n    sr:setup\n  ",[2516],{"id":492,"depth":2517,"text":2514},4,{"id":516,"depth":2504,"text":2519,"children":2520},"\n    sr:run\n  ",[2521],{"id":521,"depth":2517,"text":2522},"\n    sr:run r-statement\n    sr:run r-statement repeatable\n  ",{"id":625,"depth":2504,"text":2524,"children":2525},"\n    sr:runresult\n  ",[2526],{"id":630,"depth":2517,"text":2527},"\n    sr:runresult r-expression\n  ",{"id":852,"depth":2504,"text":2529,"children":2530},"\n    sr:set\n  ",[2531],{"id":857,"depth":2517,"text":2532},"\n    sr:set variable-name value\n  ",{"id":1276,"depth":2504,"text":2534,"children":2535},"\n    sr:set-agent\n  ",[2536],{"id":1281,"depth":2517,"text":2537},"\n    sr:set-agent r-variable-name agent or agentset agent-variable-name\n    sr:set-agent r-variable-name agent or agentset agent-variable-name1 agent-variable-name2...\n  ",{"id":1521,"depth":2504,"text":2539,"children":2540},"\n    sr:set-agent-data-frame\n  ",[2541],{"id":1526,"depth":2517,"text":2542},"\n    sr:set-agent-data-frame r-variable-name agents agent-variable-name\n    sr:set-agent-data-frame r-variable-name agents agent-variable-name1 agent-variable-name2...\n  ",{"id":1722,"depth":2504,"text":2544,"children":2545},"\n    sr:set-data-frame\n  ",[2546],{"id":1727,"depth":2517,"text":2547},"\n    sr:set-data-frame r-variable-name column-name list or anything\n    sr:set-data-frame variable-name column-name1 list or anything 1 column-name2 list or anything 2...\n  ",{"id":1953,"depth":2504,"text":2549,"children":2550},"\n    sr:set-list\n  ",[2551],{"id":1958,"depth":2517,"text":2552},"\n    sr:set-list r-variable-name anything\n    sr:set-list r-variable-name anything1 anything2...\n  ",{"id":1993,"depth":2504,"text":2554,"children":2555},"\n    sr:set-named-list\n  ",[2556],{"id":1998,"depth":2517,"text":2557},"\n    sr:set-named-list r-variable-name column-name list or anything\n    sr:set-named-list r-variable-name column-name1 list or anything 1 column-name2 list or anything 2...\n  ",{"id":2036,"depth":2504,"text":2559,"children":2560},"\n    sr:set-plot-device\n  ",[2561],{"id":2041,"depth":2517,"text":2559},{"id":2059,"depth":2504,"text":2563,"children":2564},"\n    sr:r-home\n  ",[2565],{"id":2064,"depth":2517,"text":2563},{"id":2112,"depth":2504,"text":2567,"children":2568},"\n    sr:show-console\n  ",[2569],{"id":2117,"depth":2517,"text":2567},{"id":2131,"depth":2507,"text":2137,"children":2571},[2572,2573],{"id":2143,"depth":2504,"text":2149},{"id":2377,"depth":2504,"text":2383},"Documentation for the Simple R extension.","md",{"source":2577,"metadataOutputPath":2578,"projectConfig":2579,"language":2586,"inheritFrom":2594,"output":2593,"version":2580,"icon":2595,"extensionName":2596,"assetsRoot":2581},"../../external/extensions/sr/sr.md","content/sr.metadata.yaml",{"version":2580,"projectRoot":51,"scanRoot":2581,"outputRoot":2582,"defaults":2583,"engine":2589,"partials":2590,"dedupeIdenticalDiskWrites":2593},"7.0.4","/home/runner/work/Helio/Helio/external/extensions/sr","content",{"inheritFrom":2584,"language":2586,"output":2587,"extension":2575,"title":2588,"version":2580},[2585],0,"en",false,"NetLogo User Manual","mustache",{"directoryPaths":2591,"extensions":2592},[51],[2589,2575],true,[2585],"logos:r-lang",{"shortName":79,"fullName":21},"/sr",{"title":5,"description":2574},"eJjzUEwCrnVycLrCRXMOoFOamPQ66HiydpIDlGr7eJA",[2601,2606],{"title":2602,"path":2603,"stem":2604,"description":2605},"Sound Extension Dictionary: play-note-later","/sound/play-note-later","sound/play-note-later","Documentation for the play-note-later primitive.",{"title":2607,"path":344,"stem":2608,"description":2609},"Simple R Extension Dictionary: dictionary","sr/dictionary","Documentation for the dictionary primitive.",1777657790241]