SCM

SCM Repository

[ihelp] Annotation of /src/manual/R-ints-ko.po
ViewVC logotype

Annotation of /src/manual/R-ints-ko.po

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2642 - (view) (download)

1 : gnustats 2463 # Korean translation for translation.ko package
2 : gnustats 1648 # doc/manual/R-ints.texi
3 : gnustats 2463 #
4 : gnustats 1648 # Copyright (C) 2008-2015 Chel Hee Lee, and R Translation Teams
5 : gnustats 1751 #
6 : gnustats 1648 # This file is distributed under the same license as the R distribution.
7 :     # Chel Hee Lee <chl948@mail.usask.ca>, 2008-2015.
8 : gnustats 1339 #
9 : gnustats 2504 # Note that every single contributor listed on the Acknowledgement
10 :     # assigns his or her contribution to Chel Hee Lee.
11 : gnustats 2463 #
12 : gnustats 2504 # Note also that your name may not be found because of incomplete
13 :     # record keeping. If you were overlooked, please let the maintainer
14 :     # know and the list will be updated. Please also contact the mainter
15 :     # of this document in order to voluntarily participate in
16 :     # or offer your help with this work.
17 :     #
18 : gnustats 1339 msgid ""
19 :     msgstr ""
20 : gnustats 2469 "Project-Id-Version: translation.ko_0.0.1.4\n"
21 : gnustats 1339 "Report-Msgid-Bugs-To: chl948@mail.usask.ca\n"
22 : gnustats 2642 "POT-Creation-Date: 2015-09-29 17:39-0600\n"
23 :     "PO-Revision-Date: 2015-09-29 17:39-0600\n"
24 : gnustats 1339 "Last-Translator: Chel Hee Lee <chl948@mail.usask.ca>\n"
25 :     "Language-Team: Chel Hee Lee <chl948@mail.usask.ca>\n"
26 :     "Language: ko\n"
27 :     "MIME-Version: 1.0\n"
28 :     "Content-Type: text/plain; charset=UTF-8\n"
29 :     "Content-Transfer-Encoding: 8bit\n"
30 :     "Plural-Forms: nplurals=1; plural=0;\n"
31 : gnustats 1804
32 : gnustats 1751 #
33 : gnustats 1339 #. type: top
34 : gnustats 1804 #: R-ints.texi:4
35 :     #: R-ints.texi:33
36 :     #: R-ints.texi:51
37 : gnustats 1339 #, no-wrap
38 :     msgid "R Internals"
39 :     msgstr ""
40 : gnustats 1804
41 : gnustats 1751 #
42 : gnustats 1339 #. type: dircategory
43 : gnustats 1804 #: R-ints.texi:12
44 : gnustats 1339 #, no-wrap
45 :     msgid "Programming"
46 :     msgstr ""
47 : gnustats 1804
48 : gnustats 1751 #
49 : gnustats 1339 #. type: menuentry
50 : gnustats 1804 #: R-ints.texi:15
51 : gnustats 1339 msgid "R Internals: (R-ints)"
52 :     msgstr ""
53 : gnustats 1804
54 : gnustats 1751 #
55 : gnustats 1339 #. type: menuentry
56 : gnustats 1804 #: R-ints.texi:15
57 : gnustats 1339 msgid "R Internals."
58 :     msgstr ""
59 : gnustats 1804
60 : gnustats 1751 #
61 : gnustats 1339 #. type: include
62 : gnustats 1804 #: R-ints.texi:19
63 : gnustats 1339 #, no-wrap
64 :     msgid "R-defs.texi"
65 :     msgstr ""
66 : gnustats 1804
67 : gnustats 1751 #
68 : gnustats 1339 #. type: include
69 : gnustats 1804 #: R-ints.texi:20
70 : gnustats 1339 #, no-wrap
71 :     msgid "version.texi"
72 :     msgstr ""
73 : gnustats 1804
74 : gnustats 1751 #
75 : gnustats 1339 #. type: copying
76 : gnustats 1804 #: R-ints.texi:24
77 : gnustats 1339 msgid "This manual is for R, version @value{VERSION}."
78 :     msgstr ""
79 : gnustats 1804
80 : gnustats 1751 #
81 : gnustats 1339 #. type: copying
82 : gnustats 1804 #: R-ints.texi:26
83 : gnustats 1339 msgid "@Rcopyright{1999}"
84 :     msgstr ""
85 : gnustats 1804
86 : gnustats 1751 #
87 : gnustats 1339 #. type: quotation
88 : gnustats 1804 #: R-ints.texi:29
89 : gnustats 1339 msgid "@permission{}"
90 :     msgstr ""
91 : gnustats 1804
92 : gnustats 1751 #
93 : gnustats 1339 #. type: subtitle
94 : gnustats 1804 #: R-ints.texi:34
95 : gnustats 1339 #, no-wrap
96 :     msgid "Version @value{VERSION}"
97 :     msgstr ""
98 : gnustats 1804
99 : gnustats 1751 #
100 : gnustats 1339 #. type: author
101 : gnustats 1804 #: R-ints.texi:35
102 : gnustats 1339 #, no-wrap
103 :     msgid "R Core Team"
104 :     msgstr ""
105 : gnustats 1804
106 : gnustats 1751 #
107 : gnustats 1339 #. type: node
108 : gnustats 1804 #: R-ints.texi:50
109 :     #: R-ints.texi:78
110 :     #: R-ints.texi:1940
111 :     #: R-ints.texi:2326
112 :     #: R-ints.texi:2454
113 :     #: R-ints.texi:2605
114 :     #: R-ints.texi:2691
115 :     #: R-ints.texi:3578
116 :     #: R-ints.texi:3740
117 : gnustats 2483 #: R-ints.texi:4130
118 :     #: R-ints.texi:4263
119 :     #: R-ints.texi:4277
120 :     #: R-ints.texi:4321
121 : gnustats 1804 #: R-ints.texi:4488
122 : gnustats 2483 #: R-ints.texi:4493
123 : gnustats 1339 #, no-wrap
124 :     msgid "Top"
125 :     msgstr ""
126 : gnustats 1804
127 : gnustats 1751 #
128 : gnustats 1339 #. type: node
129 : gnustats 1804 #: R-ints.texi:50
130 :     #: R-ints.texi:75
131 :     #: R-ints.texi:78
132 :     #: R-ints.texi:79
133 :     #: R-ints.texi:110
134 :     #: R-ints.texi:528
135 :     #: R-ints.texi:667
136 :     #: R-ints.texi:772
137 :     #: R-ints.texi:865
138 :     #: R-ints.texi:1021
139 :     #: R-ints.texi:1076
140 :     #: R-ints.texi:1121
141 :     #: R-ints.texi:1229
142 :     #: R-ints.texi:1307
143 :     #: R-ints.texi:1326
144 :     #: R-ints.texi:1376
145 :     #: R-ints.texi:1547
146 :     #: R-ints.texi:1701
147 :     #: R-ints.texi:1758
148 :     #: R-ints.texi:1789
149 :     #: R-ints.texi:1876
150 :     #: R-ints.texi:1940
151 : gnustats 1339 #, no-wrap
152 :     msgid "R Internal Structures"
153 :     msgstr ""
154 : gnustats 1804
155 : gnustats 1751 #
156 : gnustats 1339 #. type: node
157 : gnustats 1804 #: R-ints.texi:50
158 : gnustats 1339 #, no-wrap
159 :     msgid "(dir)"
160 :     msgstr ""
161 : gnustats 1804
162 : gnustats 1751 #
163 : gnustats 1339 #. type: ifnottex
164 : gnustats 1804 #: R-ints.texi:55
165 :     msgid ""
166 :     "This is a guide to the internal structures of @R{} and coding standards for "
167 :     "the core team working on @R{} itself."
168 : gnustats 1339 msgstr ""
169 : gnustats 1804
170 : gnustats 1751 #
171 : gnustats 1339 #. type: node
172 : gnustats 1804 #: R-ints.texi:75
173 :     #: R-ints.texi:78
174 :     #: R-ints.texi:1940
175 :     #: R-ints.texi:2200
176 :     #: R-ints.texi:2226
177 :     #: R-ints.texi:2234
178 :     #: R-ints.texi:2293
179 :     #: R-ints.texi:2326
180 : gnustats 1339 #, no-wrap
181 :     msgid ".Internal vs .Primitive"
182 :     msgstr ""
183 : gnustats 1804
184 : gnustats 1751 #
185 : gnustats 1339 #. type: node
186 : gnustats 1804 #: R-ints.texi:75
187 :     #: R-ints.texi:1940
188 :     #: R-ints.texi:2326
189 :     #: R-ints.texi:2327
190 :     #: R-ints.texi:2349
191 :     #: R-ints.texi:2366
192 :     #: R-ints.texi:2412
193 :     #: R-ints.texi:2442
194 :     #: R-ints.texi:2449
195 :     #: R-ints.texi:2454
196 : gnustats 1339 #, no-wrap
197 :     msgid "Internationalization in the R sources"
198 :     msgstr ""
199 : gnustats 1804
200 : gnustats 1751 #
201 : gnustats 1339 #. type: node
202 : gnustats 1804 #: R-ints.texi:75
203 :     #: R-ints.texi:2326
204 :     #: R-ints.texi:2454
205 :     #: R-ints.texi:2508
206 :     #: R-ints.texi:2579
207 :     #: R-ints.texi:2605
208 : gnustats 1339 #, no-wrap
209 :     msgid "Package Structure"
210 :     msgstr ""
211 : gnustats 1804
212 : gnustats 1751 #
213 : gnustats 1339 #. type: node
214 : gnustats 1804 #: R-ints.texi:75
215 :     #: R-ints.texi:2454
216 :     #: R-ints.texi:2605
217 :     #: R-ints.texi:2606
218 :     #: R-ints.texi:2691
219 : gnustats 1339 #, no-wrap
220 :     msgid "Files"
221 :     msgstr ""
222 : gnustats 1804
223 : gnustats 1751 #
224 : gnustats 1339 #. type: node
225 : gnustats 1804 #: R-ints.texi:75
226 :     #: R-ints.texi:2605
227 :     #: R-ints.texi:2691
228 :     #: R-ints.texi:2817
229 :     #: R-ints.texi:2818
230 :     #: R-ints.texi:3392
231 :     #: R-ints.texi:3481
232 :     #: R-ints.texi:3573
233 :     #: R-ints.texi:3578
234 : gnustats 1339 #, no-wrap
235 :     msgid "Graphics Devices"
236 :     msgstr ""
237 : gnustats 1804
238 : gnustats 1751 #
239 : gnustats 1339 #. type: node
240 : gnustats 1804 #: R-ints.texi:75
241 :     #: R-ints.texi:2691
242 :     #: R-ints.texi:3578
243 :     #: R-ints.texi:3579
244 :     #: R-ints.texi:3604
245 :     #: R-ints.texi:3740
246 : gnustats 1339 #, no-wrap
247 :     msgid "GUI consoles"
248 :     msgstr ""
249 : gnustats 1804
250 : gnustats 1751 #
251 : gnustats 1339 #. type: node
252 : gnustats 1804 #: R-ints.texi:75
253 :     #: R-ints.texi:3578
254 :     #: R-ints.texi:3740
255 :     #: R-ints.texi:3741
256 : gnustats 2483 #: R-ints.texi:4130
257 : gnustats 1339 #, no-wrap
258 :     msgid "Tools"
259 :     msgstr ""
260 : gnustats 1804
261 : gnustats 1751 #
262 : gnustats 1339 #. type: node
263 : gnustats 1804 #: R-ints.texi:75
264 :     #: R-ints.texi:3740
265 : gnustats 2483 #: R-ints.texi:4130
266 :     #: R-ints.texi:4131
267 :     #: R-ints.texi:4263
268 : gnustats 1339 #, no-wrap
269 :     msgid "R coding standards"
270 :     msgstr ""
271 : gnustats 1804
272 : gnustats 1751 #
273 : gnustats 1339 #. type: node
274 : gnustats 1804 #: R-ints.texi:75
275 : gnustats 2483 #: R-ints.texi:4130
276 :     #: R-ints.texi:4263
277 :     #: R-ints.texi:4264
278 :     #: R-ints.texi:4277
279 : gnustats 1339 #, no-wrap
280 :     msgid "Testing R code"
281 :     msgstr ""
282 : gnustats 1804
283 : gnustats 1751 #
284 : gnustats 1339 #. type: node
285 : gnustats 1804 #: R-ints.texi:75
286 : gnustats 2483 #: R-ints.texi:4263
287 :     #: R-ints.texi:4277
288 :     #: R-ints.texi:4278
289 :     #: R-ints.texi:4321
290 : gnustats 1339 #, no-wrap
291 :     msgid "Use of TeX dialects"
292 :     msgstr ""
293 : gnustats 1804
294 : gnustats 1751 #
295 : gnustats 1339 #. type: node
296 : gnustats 1804 #: R-ints.texi:75
297 : gnustats 2483 #: R-ints.texi:4277
298 :     #: R-ints.texi:4321
299 :     #: R-ints.texi:4322
300 :     #: R-ints.texi:4334
301 :     #: R-ints.texi:4407
302 :     #: R-ints.texi:4459
303 :     #: R-ints.texi:4488
304 : gnustats 1339 #, no-wrap
305 :     msgid "Current and future directions"
306 :     msgstr ""
307 : gnustats 1804
308 : gnustats 1751 #
309 : gnustats 1339 #. type: node
310 : gnustats 1804 #: R-ints.texi:75
311 : gnustats 2483 #: R-ints.texi:4321
312 : gnustats 1804 #: R-ints.texi:4488
313 : gnustats 2483 #: R-ints.texi:4489
314 :     #: R-ints.texi:4493
315 : gnustats 1339 #, no-wrap
316 :     msgid "Function and variable index"
317 :     msgstr ""
318 : gnustats 1804
319 : gnustats 1751 #
320 : gnustats 1339 #. type: unnumbered
321 : gnustats 1804 #: R-ints.texi:75
322 :     #: R-ints.texi:4488
323 : gnustats 2483 #: R-ints.texi:4493
324 :     #: R-ints.texi:4494
325 : gnustats 1339 #, no-wrap
326 :     msgid "Concept index"
327 :     msgstr ""
328 : gnustats 1804
329 : gnustats 1751 #
330 : gnustats 1339 #. type: Plain text
331 : gnustats 1804 #: R-ints.texi:84
332 :     msgid ""
333 :     "This chapter is the beginnings of documentation about @R{} internal "
334 :     "structures. It is written for the core team and others studying the code in "
335 :     "the @file{src/main} directory."
336 : gnustats 2182 msgstr ""
337 :     "이 장은 @R 내부구조에 관한 문서의 시작입니다. 이 문서는 코어 팀과 @file{src/"
338 :     "main}에있는 코드를 연구하는 사람들에 의해 작성되었습니다."
339 : gnustats 1804
340 : gnustats 1751 #
341 : gnustats 1339 #. type: Plain text
342 : gnustats 1804 #: R-ints.texi:89
343 :     msgid ""
344 :     "It is a work-in-progress and should be checked against the current version "
345 :     "of the source code. Versions for @R{} 2.x.y contain historical comments "
346 :     "about when features were introduced: this version is for the 3.x.y series."
347 : gnustats 2182 msgstr ""
348 :     "이 문서는 현재도 작업 중이므로 반드시 현재의 소스 코드 버전을 확인해야 합니"
349 :     "다. @R{} 2.x.y에 대한 버전은 형상이 소개될 때 역사적 주석에 관한내용을 포함하"
350 :     "고 있으며 이 버전은 3.x.y 시리즈에 관한 것입니다."
351 : gnustats 1804
352 : gnustats 1751 #
353 : gnustats 1339 #. type: node
354 : gnustats 1804 #: R-ints.texi:108
355 :     #: R-ints.texi:110
356 :     #: R-ints.texi:111
357 :     #: R-ints.texi:146
358 :     #: R-ints.texi:225
359 :     #: R-ints.texi:372
360 :     #: R-ints.texi:511
361 :     #: R-ints.texi:528
362 : gnustats 1339 #, no-wrap
363 :     msgid "SEXPs"
364 :     msgstr ""
365 : gnustats 1804
366 : gnustats 1751 #
367 : gnustats 1339 #. type: node
368 : gnustats 1804 #: R-ints.texi:108
369 :     #: R-ints.texi:110
370 :     #: R-ints.texi:528
371 :     #: R-ints.texi:529
372 :     #: R-ints.texi:579
373 :     #: R-ints.texi:608
374 :     #: R-ints.texi:641
375 :     #: R-ints.texi:667
376 : gnustats 1339 #, no-wrap
377 :     msgid "Environments and variable lookup"
378 :     msgstr ""
379 : gnustats 1804
380 : gnustats 1751 #
381 : gnustats 1339 #. type: node
382 : gnustats 1804 #: R-ints.texi:108
383 :     #: R-ints.texi:528
384 :     #: R-ints.texi:667
385 :     #: R-ints.texi:668
386 :     #: R-ints.texi:772
387 : gnustats 1339 #, no-wrap
388 :     msgid "Attributes"
389 :     msgstr ""
390 : gnustats 1804
391 : gnustats 1751 #
392 : gnustats 1339 #. type: node
393 : gnustats 1804 #: R-ints.texi:108
394 :     #: R-ints.texi:667
395 :     #: R-ints.texi:772
396 :     #: R-ints.texi:773
397 :     #: R-ints.texi:865
398 : gnustats 1339 #, no-wrap
399 :     msgid "Contexts"
400 :     msgstr ""
401 : gnustats 1804
402 : gnustats 1751 #
403 : gnustats 1339 #. type: node
404 : gnustats 1804 #: R-ints.texi:108
405 :     #: R-ints.texi:772
406 :     #: R-ints.texi:865
407 :     #: R-ints.texi:866
408 :     #: R-ints.texi:948
409 :     #: R-ints.texi:993
410 :     #: R-ints.texi:1021
411 : gnustats 1339 #, no-wrap
412 :     msgid "Argument evaluation"
413 :     msgstr ""
414 : gnustats 1804
415 : gnustats 1751 #
416 : gnustats 1339 #. type: node
417 : gnustats 1804 #: R-ints.texi:108
418 :     #: R-ints.texi:865
419 :     #: R-ints.texi:1021
420 :     #: R-ints.texi:1022
421 :     #: R-ints.texi:1076
422 : gnustats 1339 #, no-wrap
423 :     msgid "Autoprinting"
424 :     msgstr ""
425 : gnustats 1804
426 : gnustats 1751 #
427 : gnustats 1339 #. type: node
428 : gnustats 1804 #: R-ints.texi:108
429 :     #: R-ints.texi:1021
430 :     #: R-ints.texi:1076
431 :     #: R-ints.texi:1121
432 : gnustats 1339 #, no-wrap
433 :     msgid "The write barrier"
434 :     msgstr ""
435 : gnustats 1804
436 : gnustats 1751 #
437 : gnustats 1339 #. type: node
438 : gnustats 1804 #: R-ints.texi:108
439 :     #: R-ints.texi:1076
440 :     #: R-ints.texi:1121
441 :     #: R-ints.texi:1122
442 :     #: R-ints.texi:1229
443 : gnustats 1339 #, no-wrap
444 :     msgid "Serialization Formats"
445 :     msgstr ""
446 : gnustats 1804
447 : gnustats 1751 #
448 : gnustats 1339 #. type: node
449 : gnustats 1804 #: R-ints.texi:108
450 :     #: R-ints.texi:1121
451 :     #: R-ints.texi:1229
452 :     #: R-ints.texi:1230
453 :     #: R-ints.texi:1307
454 : gnustats 1339 #, no-wrap
455 :     msgid "Encodings for CHARSXPs"
456 :     msgstr ""
457 : gnustats 1804
458 : gnustats 1751 #
459 : gnustats 1339 #. type: node
460 : gnustats 1804 #: R-ints.texi:108
461 :     #: R-ints.texi:1229
462 :     #: R-ints.texi:1307
463 :     #: R-ints.texi:1308
464 :     #: R-ints.texi:1326
465 : gnustats 1339 #, no-wrap
466 :     msgid "The CHARSXP cache"
467 :     msgstr ""
468 : gnustats 1804
469 : gnustats 1751 #
470 : gnustats 1339 #. type: node
471 : gnustats 1804 #: R-ints.texi:108
472 :     #: R-ints.texi:1307
473 :     #: R-ints.texi:1326
474 :     #: R-ints.texi:1327
475 :     #: R-ints.texi:1376
476 : gnustats 1339 #, no-wrap
477 :     msgid "Warnings and errors"
478 :     msgstr ""
479 : gnustats 1804
480 : gnustats 1751 #
481 : gnustats 1339 #. type: node
482 : gnustats 1804 #: R-ints.texi:108
483 :     #: R-ints.texi:1326
484 :     #: R-ints.texi:1376
485 :     #: R-ints.texi:1377
486 :     #: R-ints.texi:1390
487 :     #: R-ints.texi:1411
488 :     #: R-ints.texi:1428
489 :     #: R-ints.texi:1479
490 :     #: R-ints.texi:1547
491 : gnustats 1339 #, no-wrap
492 :     msgid "S4 objects"
493 :     msgstr ""
494 : gnustats 1804
495 : gnustats 1751 #
496 : gnustats 1339 #. type: node
497 : gnustats 1804 #: R-ints.texi:108
498 :     #: R-ints.texi:1376
499 :     #: R-ints.texi:1547
500 :     #: R-ints.texi:1548
501 :     #: R-ints.texi:1680
502 :     #: R-ints.texi:1701
503 : gnustats 1339 #, no-wrap
504 :     msgid "Memory allocators"
505 :     msgstr ""
506 : gnustats 1804
507 : gnustats 1751 #
508 : gnustats 1339 #. type: node
509 : gnustats 1804 #: R-ints.texi:108
510 :     #: R-ints.texi:1547
511 :     #: R-ints.texi:1701
512 :     #: R-ints.texi:1702
513 :     #: R-ints.texi:1712
514 :     #: R-ints.texi:1739
515 :     #: R-ints.texi:1758
516 : gnustats 1339 #, no-wrap
517 :     msgid "Internal use of global and base environments"
518 :     msgstr ""
519 : gnustats 1804
520 : gnustats 1751 #
521 : gnustats 1339 #. type: node
522 : gnustats 1804 #: R-ints.texi:108
523 :     #: R-ints.texi:1701
524 :     #: R-ints.texi:1758
525 :     #: R-ints.texi:1759
526 :     #: R-ints.texi:1789
527 : gnustats 1339 #, no-wrap
528 :     msgid "Modules"
529 :     msgstr ""
530 : gnustats 1804
531 : gnustats 1751 #
532 : gnustats 1339 #. type: node
533 : gnustats 1804 #: R-ints.texi:108
534 :     #: R-ints.texi:1758
535 :     #: R-ints.texi:1789
536 :     #: R-ints.texi:1790
537 :     #: R-ints.texi:1798
538 :     #: R-ints.texi:1849
539 :     #: R-ints.texi:1876
540 : gnustats 1339 #, no-wrap
541 :     msgid "Visibility"
542 :     msgstr ""
543 : gnustats 1804
544 : gnustats 1751 #
545 : gnustats 1339 #. type: section
546 : gnustats 1804 #: R-ints.texi:108
547 :     #: R-ints.texi:1789
548 :     #: R-ints.texi:1876
549 :     #: R-ints.texi:1877
550 : gnustats 1339 #, no-wrap
551 :     msgid "Lazy loading"
552 :     msgstr ""
553 : gnustats 1804
554 : gnustats 1751 #
555 : gnustats 1339 #. type: cindex
556 : gnustats 1804 #: R-ints.texi:113
557 : gnustats 1339 #, no-wrap
558 :     msgid "SEXP"
559 :     msgstr ""
560 : gnustats 1804
561 : gnustats 1751 #
562 : gnustats 1339 #. type: cindex
563 : gnustats 1804 #: R-ints.texi:114
564 : gnustats 1339 #, no-wrap
565 :     msgid "SEXPRREC"
566 :     msgstr ""
567 : gnustats 1804
568 : gnustats 1751 #
569 : gnustats 1339 #. type: Plain text
570 : gnustats 1804 #: R-ints.texi:122
571 :     msgid ""
572 :     "What @R{} users think of as @emph{variables} or @emph{objects} are symbols "
573 :     "which are bound to a value. The value can be thought of as either a "
574 :     "@code{SEXP} (a pointer), or the structure it points to, a @code{SEXPREC} "
575 :     "(and there are alternative forms used for vectors, namely @code{VECSXP} "
576 :     "pointing to @code{VECTOR_SEXPREC} structures). So the basic building blocks "
577 :     "of @R{} objects are often called @emph{nodes}, meaning @code{SEXPREC}s or "
578 :     "@code{VECTOR_SEXPREC}s."
579 : gnustats 1339 msgstr ""
580 : gnustats 1804
581 : gnustats 1751 #
582 : gnustats 1339 #. type: Plain text
583 : gnustats 1804 #: R-ints.texi:126
584 :     msgid ""
585 :     "Note that the internal structure of the @code{SEXPREC} is not made available "
586 :     "to @R{} Extensions: rather @code{SEXP} is an opaque pointer, and the "
587 :     "internals can only be accessed by the functions provided."
588 : gnustats 1339 msgstr ""
589 : gnustats 1804
590 : gnustats 1751 #
591 : gnustats 1339 #. type: cindex
592 : gnustats 1804 #: R-ints.texi:127
593 : gnustats 1339 #, no-wrap
594 :     msgid "node"
595 :     msgstr ""
596 : gnustats 1804
597 : gnustats 1751 #
598 : gnustats 1339 #. type: Plain text
599 : gnustats 1804 #: R-ints.texi:135
600 :     msgid ""
601 :     "Both types of node structure have as their first three fields a 32-bit "
602 :     "@code{sxpinfo} header and then three pointers (to the attributes and the "
603 :     "previous and next node in a doubly-linked list), and then some further "
604 :     "fields. On a 32-bit platform a node@footnote{strictly, a @code{SEXPREC} "
605 :     "node; @code{VECTOR_SEXPREC} nodes are slightly smaller but followed by data "
606 :     "in the node.} occupies 28 bytes: on a 64-bit platform typically 56 bytes "
607 :     "(depending on alignment constraints)."
608 : gnustats 1339 msgstr ""
609 : gnustats 1804
610 : gnustats 1751 #
611 : gnustats 1339 #. type: Plain text
612 : gnustats 1804 #: R-ints.texi:138
613 :     msgid ""
614 :     "The first five bits of the @code{sxpinfo} header specify one of up to 32 "
615 :     "@code{SEXPTYPE}s."
616 : gnustats 1339 msgstr ""
617 : gnustats 1804
618 : gnustats 1751 #
619 : gnustats 1339 #. type: node
620 : gnustats 1804 #: R-ints.texi:144
621 :     #: R-ints.texi:146
622 :     #: R-ints.texi:147
623 :     #: R-ints.texi:225
624 : gnustats 1339 #, no-wrap
625 :     msgid "SEXPTYPEs"
626 :     msgstr ""
627 : gnustats 1804
628 : gnustats 1751 #
629 : gnustats 1339 #. type: node
630 : gnustats 1804 #: R-ints.texi:144
631 :     #: R-ints.texi:146
632 :     #: R-ints.texi:225
633 :     #: R-ints.texi:226
634 :     #: R-ints.texi:372
635 : gnustats 1339 #, no-wrap
636 :     msgid "Rest of header"
637 :     msgstr ""
638 : gnustats 1804
639 : gnustats 1751 #
640 : gnustats 1339 #. type: node
641 : gnustats 1804 #: R-ints.texi:144
642 :     #: R-ints.texi:225
643 :     #: R-ints.texi:372
644 :     #: R-ints.texi:511
645 : gnustats 1339 #, no-wrap
646 :     msgid "The 'data'"
647 :     msgstr ""
648 : gnustats 1804
649 : gnustats 1751 #
650 : gnustats 1339 #. type: subsection
651 : gnustats 1804 #: R-ints.texi:144
652 :     #: R-ints.texi:372
653 :     #: R-ints.texi:511
654 :     #: R-ints.texi:512
655 : gnustats 1339 #, no-wrap
656 :     msgid "Allocation classes"
657 :     msgstr ""
658 : gnustats 1804
659 : gnustats 1751 #
660 : gnustats 1339 #. type: multitable
661 : gnustats 1804 #: R-ints.texi:149
662 :     #: R-ints.texi:160
663 : gnustats 1339 #, no-wrap
664 :     msgid "SEXPTYPE"
665 :     msgstr ""
666 : gnustats 1804
667 : gnustats 1751 #
668 : gnustats 1339 #. type: Plain text
669 : gnustats 1804 #: R-ints.texi:155
670 :     msgid ""
671 :     "Currently @code{SEXPTYPE}s 0:10 and 13:25 are in use. Values 11 and 12 were "
672 :     "used for internal factors and ordered factors and have since been "
673 :     "withdrawn. Note that the @code{SEXPTYPE} numbers are stored in @code{save}d "
674 :     "objects and that the ordering of the types is used, so the gap cannot easily "
675 :     "be reused."
676 : gnustats 1339 msgstr ""
677 : gnustats 1804
678 : gnustats 1751 #
679 : gnustats 1339 #. type: cindex
680 : gnustats 1804 #: R-ints.texi:156
681 : gnustats 1339 #, no-wrap
682 :     msgid "SEXPTYPE table"
683 :     msgstr ""
684 : gnustats 1804
685 : gnustats 1751 #
686 : gnustats 1339 #. type: multitable
687 : gnustats 1804 #: R-ints.texi:160
688 : gnustats 1339 msgid "@headitem no"
689 :     msgstr ""
690 : gnustats 1804
691 : gnustats 1751 #
692 : gnustats 1339 #. type: multitable
693 : gnustats 1804 #: R-ints.texi:160
694 : gnustats 1339 msgid "Description"
695 :     msgstr ""
696 : gnustats 1804
697 : gnustats 1751 #
698 : gnustats 1339 #. type: item
699 : gnustats 1804 #: R-ints.texi:160
700 : gnustats 1339 #, no-wrap
701 :     msgid "@code{0} @tab @code{NILSXP} @tab @code{NULL}"
702 :     msgstr ""
703 : gnustats 1804
704 : gnustats 1751 #
705 : gnustats 1339 #. type: item
706 : gnustats 1804 #: R-ints.texi:161
707 : gnustats 1339 #, no-wrap
708 :     msgid "@code{1} @tab @code{SYMSXP} @tab symbols"
709 :     msgstr ""
710 : gnustats 1804
711 : gnustats 1751 #
712 : gnustats 1339 #. type: item
713 : gnustats 1804 #: R-ints.texi:162
714 : gnustats 1339 #, no-wrap
715 :     msgid "@code{2} @tab @code{LISTSXP} @tab pairlists"
716 :     msgstr ""
717 : gnustats 1804
718 : gnustats 1751 #
719 : gnustats 1339 #. type: item
720 : gnustats 1804 #: R-ints.texi:163
721 : gnustats 1339 #, no-wrap
722 :     msgid "@code{3} @tab @code{CLOSXP} @tab closures"
723 :     msgstr ""
724 : gnustats 1804
725 : gnustats 1751 #
726 : gnustats 1339 #. type: item
727 : gnustats 1804 #: R-ints.texi:164
728 : gnustats 1339 #, no-wrap
729 :     msgid "@code{4} @tab @code{ENVSXP} @tab environments"
730 :     msgstr ""
731 : gnustats 1804
732 : gnustats 1751 #
733 : gnustats 1339 #. type: item
734 : gnustats 1804 #: R-ints.texi:165
735 : gnustats 1339 #, no-wrap
736 :     msgid "@code{5} @tab @code{PROMSXP} @tab promises"
737 :     msgstr ""
738 : gnustats 1804
739 : gnustats 1751 #
740 : gnustats 1339 #. type: item
741 : gnustats 1804 #: R-ints.texi:166
742 : gnustats 1339 #, no-wrap
743 :     msgid "@code{6} @tab @code{LANGSXP} @tab language objects"
744 :     msgstr ""
745 : gnustats 1804
746 : gnustats 1751 #
747 : gnustats 1339 #. type: item
748 : gnustats 1804 #: R-ints.texi:167
749 : gnustats 1339 #, no-wrap
750 :     msgid "@code{7} @tab @code{SPECIALSXP} @tab special functions"
751 :     msgstr ""
752 : gnustats 1804
753 : gnustats 1751 #
754 : gnustats 1339 #. type: item
755 : gnustats 1804 #: R-ints.texi:168
756 : gnustats 1339 #, no-wrap
757 :     msgid "@code{8} @tab @code{BUILTINSXP} @tab builtin functions"
758 :     msgstr ""
759 : gnustats 1804
760 : gnustats 1751 #
761 : gnustats 1339 #. type: item
762 : gnustats 1804 #: R-ints.texi:169
763 : gnustats 1339 #, no-wrap
764 :     msgid "@code{9} @tab @code{CHARSXP} @tab internal character strings"
765 :     msgstr ""
766 : gnustats 1804
767 : gnustats 1751 #
768 : gnustats 1339 #. type: item
769 : gnustats 1804 #: R-ints.texi:170
770 : gnustats 1339 #, no-wrap
771 :     msgid "@code{10} @tab @code{LGLSXP} @tab logical vectors"
772 :     msgstr ""
773 : gnustats 1804
774 : gnustats 1751 #
775 : gnustats 1339 #. type: item
776 : gnustats 1804 #: R-ints.texi:171
777 : gnustats 1339 #, no-wrap
778 :     msgid "@code{13} @tab @code{INTSXP} @tab integer vectors"
779 :     msgstr ""
780 : gnustats 1804
781 : gnustats 1751 #
782 : gnustats 1339 #. type: item
783 : gnustats 1804 #: R-ints.texi:172
784 : gnustats 1339 #, no-wrap
785 :     msgid "@code{14} @tab @code{REALSXP} @tab numeric vectors"
786 :     msgstr ""
787 : gnustats 1804
788 : gnustats 1751 #
789 : gnustats 1339 #. type: item
790 : gnustats 1804 #: R-ints.texi:173
791 : gnustats 1339 #, no-wrap
792 :     msgid "@code{15} @tab @code{CPLXSXP} @tab complex vectors"
793 :     msgstr ""
794 : gnustats 1804
795 : gnustats 1751 #
796 : gnustats 1339 #. type: item
797 : gnustats 1804 #: R-ints.texi:174
798 : gnustats 1339 #, no-wrap
799 :     msgid "@code{16} @tab @code{STRSXP} @tab character vectors"
800 :     msgstr ""
801 : gnustats 1804
802 : gnustats 1751 #
803 : gnustats 1339 #. type: item
804 : gnustats 1804 #: R-ints.texi:175
805 : gnustats 1339 #, no-wrap
806 :     msgid "@code{17} @tab @code{DOTSXP} @tab dot-dot-dot object"
807 :     msgstr ""
808 : gnustats 1804
809 : gnustats 1751 #
810 : gnustats 1339 #. type: item
811 : gnustats 1804 #: R-ints.texi:176
812 : gnustats 1339 #, no-wrap
813 :     msgid "@code{18} @tab @code{ANYSXP} @tab make ``any'' args work"
814 :     msgstr ""
815 : gnustats 1804
816 : gnustats 1751 #
817 : gnustats 1339 #. type: item
818 : gnustats 1804 #: R-ints.texi:177
819 : gnustats 1339 #, no-wrap
820 :     msgid "@code{19} @tab @code{VECSXP} @tab list (generic vector)"
821 :     msgstr ""
822 : gnustats 1804
823 : gnustats 1751 #
824 : gnustats 1339 #. type: item
825 : gnustats 1804 #: R-ints.texi:178
826 : gnustats 1339 #, no-wrap
827 :     msgid "@code{20} @tab @code{EXPRSXP} @tab expression vector"
828 :     msgstr ""
829 : gnustats 1804
830 : gnustats 1751 #
831 : gnustats 1339 #. type: item
832 : gnustats 1804 #: R-ints.texi:179
833 : gnustats 1339 #, no-wrap
834 :     msgid "@code{21} @tab @code{BCODESXP} @tab byte code"
835 :     msgstr ""
836 : gnustats 1804
837 : gnustats 1751 #
838 : gnustats 1339 #. type: item
839 : gnustats 1804 #: R-ints.texi:180
840 : gnustats 1339 #, no-wrap
841 :     msgid "@code{22} @tab @code{EXTPTRSXP} @tab external pointer"
842 :     msgstr ""
843 : gnustats 1804
844 : gnustats 1751 #
845 : gnustats 1339 #. type: item
846 : gnustats 1804 #: R-ints.texi:181
847 : gnustats 1339 #, no-wrap
848 :     msgid "@code{23} @tab @code{WEAKREFSXP} @tab weak reference"
849 :     msgstr ""
850 : gnustats 1804
851 : gnustats 1751 #
852 : gnustats 1339 #. type: item
853 : gnustats 1804 #: R-ints.texi:182
854 : gnustats 1339 #, no-wrap
855 :     msgid "@code{24} @tab @code{RAWSXP} @tab raw vector"
856 :     msgstr ""
857 : gnustats 1804
858 : gnustats 1751 #
859 : gnustats 1339 #. type: item
860 : gnustats 1804 #: R-ints.texi:183
861 : gnustats 1339 #, no-wrap
862 :     msgid "@code{25} @tab @code{S4SXP} @tab S4 classes not of simple type"
863 :     msgstr ""
864 : gnustats 1804
865 : gnustats 1751 #
866 : gnustats 1339 #. type: cindex
867 : gnustats 1804 #: R-ints.texi:187
868 : gnustats 1339 #, no-wrap
869 :     msgid "atomic vector type"
870 :     msgstr ""
871 : gnustats 1804
872 : gnustats 1751 #
873 : gnustats 1339 #. type: Plain text
874 : gnustats 1804 #: R-ints.texi:196
875 :     msgid ""
876 :     "Many of these will be familiar from @R{} level: the atomic vector types are "
877 :     "@code{LGLSXP}, @code{INTSXP}, @code{REALSXP}, @code{CPLXSP}, @code{STRSXP} "
878 :     "and @code{RAWSXP}. Lists are @code{VECSXP} and names (also known as "
879 :     "symbols) are @code{SYMSXP}. Pairlists (@code{LISTSXP}, the name going back "
880 :     "to the origins of @R{} as a Scheme-like language) are rarely seen at @R{} "
881 :     "level, but are for example used for argument lists. Character vectors are "
882 :     "effectively lists all of whose elements are @code{CHARSXP}, a type that is "
883 :     "rarely visible at @R{} level."
884 : gnustats 1339 msgstr ""
885 : gnustats 1804
886 : gnustats 1751 #
887 : gnustats 1339 #. type: cindex
888 : gnustats 1804 #: R-ints.texi:197
889 : gnustats 1339 #, no-wrap
890 :     msgid "language object"
891 :     msgstr ""
892 : gnustats 1804
893 : gnustats 1751 #
894 : gnustats 1339 #. type: cindex
895 : gnustats 1804 #: R-ints.texi:198
896 : gnustats 1339 #, no-wrap
897 :     msgid "argument list"
898 :     msgstr ""
899 : gnustats 1804
900 : gnustats 1751 #
901 : gnustats 1339 #. type: Plain text
902 : gnustats 1804 #: R-ints.texi:208
903 :     msgid ""
904 :     "Language objects (@code{LANGSXP}) are calls (including formulae and so on). "
905 :     "Internally they are pairlists with first element a reference@footnote{a "
906 :     "pointer to a function or a symbol to look up the function by name, or a "
907 :     "language object to be evaluated to give a function.} to the function to be "
908 :     "called with remaining elements the actual arguments for the call (and with "
909 :     "the tags if present giving the specified argument names). Although this is "
910 :     "not enforced, many places in the code assume that the pairlist is of length "
911 :     "one or more, often without checking."
912 : gnustats 1339 msgstr ""
913 : gnustats 1804
914 : gnustats 1751 #
915 : gnustats 1339 #. type: cindex
916 : gnustats 1804 #: R-ints.texi:209
917 : gnustats 1339 #, no-wrap
918 :     msgid "expression"
919 :     msgstr ""
920 : gnustats 1804
921 : gnustats 1751 #
922 : gnustats 1339 #. type: Plain text
923 : gnustats 1804 #: R-ints.texi:212
924 :     msgid ""
925 :     "Expressions are of type @code{EXPRSXP}: they are a vector of (usually "
926 :     "language) objects most often seen as the result of @code{parse()}."
927 : gnustats 1339 msgstr ""
928 : gnustats 1804
929 : gnustats 1751 #
930 : gnustats 1339 #. type: cindex
931 : gnustats 1804 #: R-ints.texi:213
932 : gnustats 1339 #, no-wrap
933 :     msgid "function"
934 :     msgstr ""
935 : gnustats 1804
936 : gnustats 1751 #
937 : gnustats 1339 #. type: Plain text
938 : gnustats 1804 #: R-ints.texi:219
939 :     msgid ""
940 :     "The functions are of types @code{CLOSXP}, @code{SPECIALSXP} and "
941 :     "@code{BUILTINSXP}: where @code{SEXPTYPE}s are stored in an integer these are "
942 :     "sometimes lumped into a pseudo-type @code{FUNSXP} with code 99. Functions "
943 :     "defined via @code{function} are of type @code{CLOSXP} and have formals, body "
944 :     "and environment."
945 : gnustats 1339 msgstr ""
946 : gnustats 1804
947 : gnustats 1751 #
948 : gnustats 1339 #. type: cindex
949 : gnustats 1804 #: R-ints.texi:220
950 : gnustats 1339 #, no-wrap
951 :     msgid "S4 type"
952 :     msgstr ""
953 : gnustats 1804
954 : gnustats 1751 #
955 : gnustats 1339 #. type: Plain text
956 : gnustats 1804 #: R-ints.texi:223
957 :     msgid ""
958 :     "The @code{SEXPTYPE} @code{S4SXP} is for S4 objects which do not consist "
959 :     "solely of a simple type such as an atomic vector or function."
960 : gnustats 1339 msgstr ""
961 : gnustats 1804
962 : gnustats 1751 #
963 : gnustats 1339 #. type: Plain text
964 : gnustats 1804 #: R-ints.texi:229
965 : gnustats 1339 msgid "The @code{sxpinfo} header is defined as a 32-bit C structure by"
966 :     msgstr ""
967 : gnustats 1804
968 : gnustats 1751 #
969 : gnustats 1339 #. type: example
970 : gnustats 1804 #: R-ints.texi:243
971 : gnustats 1339 #, no-wrap
972 :     msgid ""
973 :     "struct sxpinfo_struct @{\n"
974 :     " SEXPTYPE type : 5; /* @r{discussed above} */\n"
975 :     " unsigned int obj : 1; /* @r{is this an object with a class attribute?} */\n"
976 :     " unsigned int named : 2; /* @r{used to control copying} */\n"
977 :     " unsigned int gp : 16; /* @r{general purpose, see below} */\n"
978 :     " unsigned int mark : 1; /* @r{mark object as `in use' in GC} */\n"
979 :     " unsigned int debug : 1;\n"
980 :     " unsigned int trace : 1;\n"
981 :     " unsigned int spare : 1; /* @r{debug once} */\n"
982 :     " unsigned int gcgen : 1; /* @r{generation for GC} */\n"
983 :     " unsigned int gccls : 3; /* @r{class of node for GC} */\n"
984 :     "@}; /* Tot: 32 */\n"
985 :     msgstr ""
986 : gnustats 1804
987 : gnustats 1751 #
988 : gnustats 1339 #. type: findex
989 : gnustats 1804 #: R-ints.texi:245
990 : gnustats 1339 #, no-wrap
991 :     msgid "debug bit"
992 :     msgstr ""
993 : gnustats 1804
994 : gnustats 1751 #
995 : gnustats 1339 #. type: Plain text
996 : gnustats 1804 #: R-ints.texi:251
997 :     msgid ""
998 :     "The @code{debug} bit is used for closures and environments. For closures it "
999 :     "is set by @code{debug()} and unset by @code{undebug()}, and indicates that "
1000 :     "evaluations of the function should be run under the browser. For "
1001 :     "environments it indicates whether the browsing is in single-step mode."
1002 : gnustats 1339 msgstr ""
1003 : gnustats 1804
1004 : gnustats 1751 #
1005 : gnustats 1339 #. type: findex
1006 : gnustats 1804 #: R-ints.texi:252
1007 : gnustats 1339 #, no-wrap
1008 :     msgid "trace bit"
1009 :     msgstr ""
1010 : gnustats 1804
1011 : gnustats 1751 #
1012 : gnustats 1339 #. type: Plain text
1013 : gnustats 1804 #: R-ints.texi:255
1014 :     msgid ""
1015 :     "The @code{trace} bit is used for functions for @code{trace()} and for other "
1016 :     "objects when tracing duplications (see @code{tracemem})."
1017 : gnustats 1339 msgstr ""
1018 : gnustats 1804
1019 : gnustats 1751 #
1020 : gnustats 1339 #. type: findex
1021 : gnustats 1804 #: R-ints.texi:256
1022 : gnustats 1339 #, no-wrap
1023 :     msgid "spare bit"
1024 :     msgstr ""
1025 : gnustats 1804
1026 : gnustats 1751 #
1027 : gnustats 1339 #. type: Plain text
1028 : gnustats 1804 #: R-ints.texi:259
1029 :     msgid ""
1030 :     "The @code{spare} bit is used for closures to mark them for one time "
1031 :     "debugging."
1032 : gnustats 1339 msgstr ""
1033 : gnustats 1804
1034 : gnustats 1751 #
1035 : gnustats 1339 #. type: findex
1036 : gnustats 1804 #: R-ints.texi:260
1037 : gnustats 1339 #, no-wrap
1038 :     msgid "named bit"
1039 :     msgstr ""
1040 : gnustats 1804
1041 : gnustats 1751 #
1042 : gnustats 1339 #. type: findex
1043 : gnustats 1804 #: R-ints.texi:261
1044 :     #: R-ints.texi:886
1045 :     #: R-ints.texi:2122
1046 : gnustats 1339 #, no-wrap
1047 :     msgid "NAMED"
1048 :     msgstr ""
1049 : gnustats 1804
1050 : gnustats 1751 #
1051 : gnustats 1339 #. type: findex
1052 : gnustats 1804 #: R-ints.texi:262
1053 : gnustats 1339 #, no-wrap
1054 :     msgid "SET_NAMED"
1055 :     msgstr ""
1056 : gnustats 1804
1057 : gnustats 1751 #
1058 : gnustats 1339 #. type: cindex
1059 : gnustats 1804 #: R-ints.texi:263
1060 :     #: R-ints.texi:716
1061 : gnustats 1339 #, no-wrap
1062 :     msgid "copying semantics"
1063 :     msgstr ""
1064 : gnustats 1804
1065 : gnustats 1751 #
1066 : gnustats 1339 #. type: Plain text
1067 : gnustats 1804 #: R-ints.texi:267
1068 :     msgid ""
1069 :     "The @code{named} field is set and accessed by the @code{SET_NAMED} and "
1070 :     "@code{NAMED} macros, and take values @code{0}, @code{1} and @code{2}. @R{} "
1071 :     "has a `call by value' illusion, so an assignment like"
1072 : gnustats 1339 msgstr ""
1073 : gnustats 1804
1074 : gnustats 1751 #
1075 : gnustats 1339 #. type: example
1076 : gnustats 1804 #: R-ints.texi:269
1077 : gnustats 1339 #, no-wrap
1078 :     msgid "b <- a\n"
1079 :     msgstr ""
1080 : gnustats 1804
1081 : gnustats 1751 #
1082 : gnustats 1339 #. type: Plain text
1083 : gnustats 1804 #: R-ints.texi:284
1084 :     msgid ""
1085 :     "appears to make a copy of @code{a} and refer to it as @code{b}. However, if "
1086 :     "neither @code{a} nor @code{b} are subsequently altered there is no need to "
1087 :     "copy. What really happens is that a new symbol @code{b} is bound to the "
1088 :     "same value as @code{a} and the @code{named} field on the value object is set "
1089 :     "(in this case to @code{2}). When an object is about to be altered, the "
1090 :     "@code{named} field is consulted. A value of @code{2} means that the object "
1091 :     "must be duplicated before being changed. (Note that this does not say that "
1092 :     "it is necessary to duplicate, only that it should be duplicated whether "
1093 :     "necessary or not.) A value of @code{0} means that it is known that no other "
1094 :     "@code{SEXP} shares data with this object, and so it may safely be altered. "
1095 :     "A value of @code{1} is used for situations like"
1096 : gnustats 1339 msgstr ""
1097 : gnustats 1804
1098 : gnustats 1751 #
1099 : gnustats 1339 #. type: example
1100 : gnustats 1804 #: R-ints.texi:287
1101 : gnustats 1339 #, no-wrap
1102 :     msgid "dim(a) <- c(7, 2)\n"
1103 :     msgstr ""
1104 : gnustats 1804
1105 : gnustats 1751 #
1106 : gnustats 1339 #. type: Plain text
1107 : gnustats 1804 #: R-ints.texi:292
1108 :     msgid ""
1109 :     "where in principle two copies of @code{a} exist for the duration of the "
1110 :     "computation as (in principle)"
1111 : gnustats 1339 msgstr ""
1112 : gnustats 1804
1113 : gnustats 1751 #
1114 : gnustats 1339 #. type: example
1115 : gnustats 1804 #: R-ints.texi:295
1116 : gnustats 1339 #, no-wrap
1117 :     msgid "a <- `dim<-`(a, c(7, 2))\n"
1118 :     msgstr ""
1119 : gnustats 1804
1120 : gnustats 1751 #
1121 : gnustats 1339 #. type: Plain text
1122 : gnustats 1804 #: R-ints.texi:300
1123 :     msgid ""
1124 :     "but for no longer, and so some primitive functions can be optimized to avoid "
1125 :     "a copy in this case."
1126 : gnustats 1339 msgstr ""
1127 : gnustats 1804
1128 : gnustats 1751 #
1129 : gnustats 1339 #. type: Plain text
1130 : gnustats 1804 #: R-ints.texi:304
1131 :     msgid ""
1132 :     "The @code{gp} bits are by definition `general purpose'. We label these from "
1133 :     "0 to 15. Bits 0--5 and bits 14--15 have been used as described below "
1134 :     "(mainly from detective work on the sources)."
1135 : gnustats 1339 msgstr ""
1136 : gnustats 1804
1137 : gnustats 1751 #
1138 : gnustats 1339 #. type: findex
1139 : gnustats 1804 #: R-ints.texi:305
1140 : gnustats 1339 #, no-wrap
1141 :     msgid "gp bits"
1142 :     msgstr ""
1143 : gnustats 1804
1144 : gnustats 1751 #
1145 : gnustats 1339 #. type: findex
1146 : gnustats 1804 #: R-ints.texi:306
1147 : gnustats 1339 #, no-wrap
1148 :     msgid "LEVELS"
1149 :     msgstr ""
1150 : gnustats 1804
1151 : gnustats 1751 #
1152 : gnustats 1339 #. type: findex
1153 : gnustats 1804 #: R-ints.texi:307
1154 : gnustats 1339 #, no-wrap
1155 :     msgid "SETLEVELS"
1156 :     msgstr ""
1157 : gnustats 1804
1158 : gnustats 1751 #
1159 : gnustats 1339 #. type: Plain text
1160 : gnustats 1804 #: R-ints.texi:314
1161 :     msgid ""
1162 :     "The bits can be accessed and set by the @code{LEVELS} and @code{SETLEVELS} "
1163 :     "macros, which names appear to date back to the internal factor and ordered "
1164 :     "types and are now used in only a few places in the code. The @code{gp} "
1165 :     "field is serialized/unserialized for the @code{SEXPTYPE}s other than "
1166 :     "@code{NILSXP}, @code{SYMSXP} and @code{ENVSXP}."
1167 : gnustats 1339 msgstr ""
1168 : gnustats 1804
1169 : gnustats 1751 #
1170 : gnustats 1339 #. type: Plain text
1171 : gnustats 1804 #: R-ints.texi:320
1172 :     msgid ""
1173 :     "Bits 14 and 15 of @code{gp} are used for `fancy bindings'. Bit 14 is used "
1174 :     "to lock a binding or an environment, and bit 15 is used to indicate an "
1175 :     "active binding. (For the definition of an `active binding' see the header "
1176 :     "comments in file @file{src/main/envir.c}.) Bit 15 is used for an "
1177 :     "environment to indicate if it participates in the global cache."
1178 : gnustats 1339 msgstr ""
1179 : gnustats 1804
1180 : gnustats 1751 #
1181 : gnustats 1339 #. type: findex
1182 : gnustats 1804 #: R-ints.texi:321
1183 : gnustats 1339 #, no-wrap
1184 :     msgid "ARGSUSED"
1185 :     msgstr ""
1186 : gnustats 1804
1187 : gnustats 1751 #
1188 : gnustats 1339 #. type: findex
1189 : gnustats 1804 #: R-ints.texi:322
1190 : gnustats 1339 #, no-wrap
1191 :     msgid "SET_ARGUSED"
1192 :     msgstr ""
1193 : gnustats 1804
1194 : gnustats 1751 #
1195 : gnustats 1339 #. type: Plain text
1196 : gnustats 1804 #: R-ints.texi:325
1197 :     msgid ""
1198 :     "The macros @code{ARGUSED} and @code{SET_ARGUSED} are used when matching "
1199 :     "actual and formal function arguments, and take the values 0, 1 and 2."
1200 : gnustats 1339 msgstr ""
1201 : gnustats 1804
1202 : gnustats 1751 #
1203 : gnustats 1339 #. type: findex
1204 : gnustats 1804 #: R-ints.texi:326
1205 :     #: R-ints.texi:963
1206 : gnustats 1339 #, no-wrap
1207 :     msgid "MISSING"
1208 :     msgstr ""
1209 : gnustats 1804
1210 : gnustats 1751 #
1211 : gnustats 1339 #. type: findex
1212 : gnustats 1804 #: R-ints.texi:327
1213 : gnustats 1339 #, no-wrap
1214 :     msgid "SET_MISSING"
1215 :     msgstr ""
1216 : gnustats 1804
1217 : gnustats 1751 #
1218 : gnustats 1339 #. type: Plain text
1219 : gnustats 1804 #: R-ints.texi:334
1220 :     msgid ""
1221 :     "The macros @code{MISSING} and @code{SET_MISSING} are used for pairlists of "
1222 :     "arguments. Four bits are reserved, but only two are used (and exactly what "
1223 :     "for is not explained). It seems that bit 0 is used by @code{matchArgs} to "
1224 :     "mark missingness on the returned argument list, and bit 1 is used to mark "
1225 :     "the use of a default value for an argument copied to the evaluation frame of "
1226 :     "a closure."
1227 : gnustats 1339 msgstr ""
1228 : gnustats 1804
1229 : gnustats 1751 #
1230 : gnustats 1339 #. type: findex
1231 : gnustats 1804 #: R-ints.texi:335
1232 : gnustats 1339 #, no-wrap
1233 :     msgid "DDVAL"
1234 :     msgstr ""
1235 : gnustats 1804
1236 : gnustats 1751 #
1237 : gnustats 1339 #. type: findex
1238 : gnustats 1804 #: R-ints.texi:336
1239 : gnustats 1339 #, no-wrap
1240 :     msgid "SET_DDVAL"
1241 :     msgstr ""
1242 : gnustats 1804
1243 : gnustats 1751 #
1244 : gnustats 1339 #. type: cindex
1245 : gnustats 1804 #: R-ints.texi:337
1246 :     #: R-ints.texi:996
1247 : gnustats 1339 #, no-wrap
1248 :     msgid "... argument"
1249 :     msgstr ""
1250 : gnustats 1804
1251 : gnustats 1751 #
1252 : gnustats 1339 #. type: Plain text
1253 : gnustats 1804 #: R-ints.texi:342
1254 :     msgid ""
1255 :     "Bit 0 is used by macros @code{DDVAL} and @code{SET_DDVAL}. This indicates "
1256 :     "that a @code{SYMSXP} is one of the symbols @code{..n} which are implicitly "
1257 :     "created when @code{...} is processed, and so indicates that it may need to "
1258 :     "be looked up in a @code{DOTSXP}."
1259 : gnustats 1339 msgstr ""
1260 : gnustats 1804
1261 : gnustats 1751 #
1262 : gnustats 1339 #. type: findex
1263 : gnustats 1804 #: R-ints.texi:343
1264 : gnustats 1339 #, no-wrap
1265 :     msgid "PRSEEN"
1266 :     msgstr ""
1267 : gnustats 1804
1268 : gnustats 1751 #
1269 : gnustats 1339 #. type: cindex
1270 : gnustats 1804 #: R-ints.texi:344
1271 : gnustats 1339 #, no-wrap
1272 :     msgid "promise"
1273 :     msgstr ""
1274 : gnustats 1804
1275 : gnustats 1751 #
1276 : gnustats 1339 #. type: Plain text
1277 : gnustats 1804 #: R-ints.texi:348
1278 :     msgid ""
1279 :     "Bit 0 is used for @code{PRSEEN}, a flag to indicate if a promise has already "
1280 :     "been seen during the evaluation of the promise (and so to avoid recursive "
1281 :     "loops)."
1282 : gnustats 1339 msgstr ""
1283 : gnustats 1804
1284 : gnustats 1751 #
1285 : gnustats 1339 #. type: Plain text
1286 : gnustats 1804 #: R-ints.texi:352
1287 :     msgid ""
1288 :     "Bit 0 is used for @code{HASHASH}, on the @code{PRINTNAME} of the @code{TAG} "
1289 :     "of the frame of an environment. (This bit is not serialized for "
1290 :     "@code{CHARSXP} objects.)"
1291 : gnustats 1339 msgstr ""
1292 : gnustats 1804
1293 : gnustats 1751 #
1294 : gnustats 1339 #. type: Plain text
1295 : gnustats 1804 #: R-ints.texi:355
1296 :     msgid ""
1297 :     "Bits 0 and 1 are used for weak references (to indicate `ready to finalize', "
1298 :     "`finalize on exit')."
1299 : gnustats 1339 msgstr ""
1300 : gnustats 1804
1301 : gnustats 1751 #
1302 : gnustats 1339 #. type: Plain text
1303 : gnustats 1804 #: R-ints.texi:358
1304 :     msgid ""
1305 :     "Bit 0 is used by the condition handling system (on a @code{VECSXP}) to "
1306 :     "indicate a calling handler."
1307 : gnustats 1339 msgstr ""
1308 : gnustats 1804
1309 : gnustats 1751 #
1310 : gnustats 1339 #. type: Plain text
1311 : gnustats 1804 #: R-ints.texi:360
1312 : gnustats 1339 msgid "Bit 4 is turned on to mark S4 objects."
1313 :     msgstr ""
1314 : gnustats 1804
1315 : gnustats 1751 #
1316 : gnustats 1339 #. type: Plain text
1317 : gnustats 1804 #: R-ints.texi:366
1318 :     msgid ""
1319 :     "Bits 1, 2, 3, 5 and 6 are used for a @code{CHARSXP} to denote its encoding. "
1320 :     "Bit 1 indicates that the @code{CHARSXP} should be treated as a set of bytes, "
1321 :     "not necessarily representing a character in any known encoding. Bits 2, 3 "
1322 :     "and 6 are used to indicate that it is known to be in Latin-1, UTF-8 or "
1323 :     "@acronym{ASCII} respectively."
1324 : gnustats 1339 msgstr ""
1325 : gnustats 1804
1326 : gnustats 1751 #
1327 : gnustats 1339 #. type: Plain text
1328 : gnustats 1804 #: R-ints.texi:371
1329 :     msgid ""
1330 :     "Bit 5 for a @code{CHARSXP} indicates that it is hashed by its address, that "
1331 :     "is @code{NA_STRING} or is in the @code{CHARSXP} cache (this is not "
1332 :     "serialized). Only exceptionally is a @code{CHARSXP} not hashed, and this "
1333 :     "should never happen in end-user code."
1334 : gnustats 1339 msgstr ""
1335 : gnustats 1804
1336 : gnustats 1751 #
1337 : gnustats 1339 #. type: subsection
1338 : gnustats 1804 #: R-ints.texi:373
1339 : gnustats 1339 #, no-wrap
1340 :     msgid "The `data'"
1341 :     msgstr ""
1342 : gnustats 1804
1343 : gnustats 1751 #
1344 : gnustats 1339 #. type: Plain text
1345 : gnustats 1804 #: R-ints.texi:378
1346 :     msgid ""
1347 :     "A @code{SEXPREC} is a C structure containing the 32-bit header as described "
1348 :     "above, three pointers (to the attributes, previous and next node) and the "
1349 :     "node data, a union"
1350 : gnustats 1339 msgstr ""
1351 : gnustats 1804
1352 : gnustats 1751 #
1353 : gnustats 1339 #. type: example
1354 : gnustats 1804 #: R-ints.texi:388
1355 : gnustats 1339 #, no-wrap
1356 :     msgid ""
1357 :     "union @{\n"
1358 :     " struct primsxp_struct primsxp;\n"
1359 :     " struct symsxp_struct symsxp;\n"
1360 :     " struct listsxp_struct listsxp;\n"
1361 :     " struct envsxp_struct envsxp;\n"
1362 :     " struct closxp_struct closxp;\n"
1363 :     " struct promsxp_struct promsxp;\n"
1364 :     "@} u;\n"
1365 :     msgstr ""
1366 : gnustats 1804
1367 : gnustats 1751 #
1368 : gnustats 1339 #. type: Plain text
1369 : gnustats 1804 #: R-ints.texi:393
1370 :     msgid ""
1371 :     "All of these alternatives apart from the first (an @code{int}) are three "
1372 :     "pointers, so the union occupies three words."
1373 : gnustats 1339 msgstr ""
1374 : gnustats 1804
1375 : gnustats 1751 #
1376 : gnustats 1339 #. type: cindex
1377 : gnustats 1804 #: R-ints.texi:394
1378 : gnustats 1339 #, no-wrap
1379 :     msgid "vector type"
1380 :     msgstr ""
1381 : gnustats 1804
1382 : gnustats 1751 #
1383 : gnustats 1339 #. type: Plain text
1384 : gnustats 1804 #: R-ints.texi:411
1385 :     msgid ""
1386 :     "The vector types are @code{RAWSXP}, @code{CHARSXP}, @code{LGLSXP}, "
1387 :     "@code{INTSXP}, @code{REALSXP}, @code{CPLXSXP}, @code{STRSXP}, @code{VECSXP}, "
1388 :     "@code{EXPRSXP} and @code{WEAKREFSXP}. Remember that such types are a "
1389 :     "@code{VECTOR_SEXPREC}, which again consists of the header and the same three "
1390 :     "pointers, but followed by two integers giving the length and `true "
1391 :     "length'@footnote{This is almost unused. The only current use is for hash "
1392 :     "tables of environments (@code{VECSXP}s), where @code{length} is the size of "
1393 :     "the table and @code{truelength} is the number of primary slots in use, and "
1394 :     "for the reference hash tables in serialization (@code{VECSXP}s), where "
1395 :     "@code{truelength} is the number of slots in use.} of the vector, and then "
1396 :     "followed by the data (aligned as required: on most 32-bit systems with a 24-"
1397 :     "byte @code{VECTOR_SEXPREC} node the data can follow immediately after the "
1398 :     "node). The data are a block of memory of the appropriate length to store "
1399 :     "`true length' elements (rounded up to a multiple of 8 bytes, with the 8-byte "
1400 :     "blocks being the `Vcells' referred in the documentation for @code{gc()})."
1401 : gnustats 1339 msgstr ""
1402 : gnustats 1804
1403 : gnustats 1751 #
1404 : gnustats 1339 #. type: Plain text
1405 : gnustats 1804 #: R-ints.texi:414
1406 :     msgid ""
1407 :     "The `data' for the various types are given in the table below. A lot of "
1408 :     "this is interpretation, i.e. the types are not checked."
1409 : gnustats 1339 msgstr ""
1410 : gnustats 1804
1411 : gnustats 1751 #
1412 : gnustats 1339 #. type: item
1413 : gnustats 1804 #: R-ints.texi:416
1414 : gnustats 1339 #, no-wrap
1415 :     msgid "NILSXP"
1416 :     msgstr ""
1417 : gnustats 1804
1418 : gnustats 1751 #
1419 : gnustats 1339 #. type: table
1420 : gnustats 1804 #: R-ints.texi:419
1421 :     msgid ""
1422 :     "There is only one object of type @code{NILSXP}, @code{R_NilValue}, with no "
1423 :     "data."
1424 : gnustats 1339 msgstr ""
1425 : gnustats 1804
1426 : gnustats 1751 #
1427 : gnustats 1339 #. type: item
1428 : gnustats 1804 #: R-ints.texi:420
1429 : gnustats 1339 #, no-wrap
1430 :     msgid "SYMSXP"
1431 :     msgstr ""
1432 : gnustats 1804
1433 : gnustats 1751 #
1434 : gnustats 1339 #. type: table
1435 : gnustats 1804 #: R-ints.texi:426
1436 :     msgid ""
1437 :     "Pointers to three nodes, the name, value and internal, accessed by "
1438 :     "@code{PRINTNAME} (a @code{CHARSXP}), @code{SYMVALUE} and @code{INTERNAL}. "
1439 :     "(If the symbol's value is a @code{.Internal} function, the last is a pointer "
1440 :     "to the appropriate @code{SEXPREC}.) Many symbols have @code{SYMVALUE} "
1441 :     "@code{R_UnboundValue}."
1442 : gnustats 1339 msgstr ""
1443 : gnustats 1804
1444 : gnustats 1751 #
1445 : gnustats 1339 #. type: item
1446 : gnustats 1804 #: R-ints.texi:427
1447 : gnustats 1339 #, no-wrap
1448 :     msgid "LISTSXP"
1449 :     msgstr ""
1450 : gnustats 1804
1451 : gnustats 1751 #
1452 : gnustats 1339 #. type: table
1453 : gnustats 1804 #: R-ints.texi:430
1454 :     msgid ""
1455 :     "Pointers to the CAR, CDR (usually a @code{LISTSXP} or @code{NULL}) and TAG "
1456 :     "(a @code{SYMSXP} or @code{NULL})."
1457 : gnustats 1339 msgstr ""
1458 : gnustats 1804
1459 : gnustats 1751 #
1460 : gnustats 1339 #. type: item
1461 : gnustats 1804 #: R-ints.texi:431
1462 : gnustats 1339 #, no-wrap
1463 :     msgid "CLOSXP"
1464 :     msgstr ""
1465 : gnustats 1804
1466 : gnustats 1751 #
1467 : gnustats 1339 #. type: table
1468 : gnustats 1804 #: R-ints.texi:433
1469 : gnustats 1339 msgid "Pointers to the formals (a pairlist), the body and the environment."
1470 :     msgstr ""
1471 : gnustats 1804
1472 : gnustats 1751 #
1473 : gnustats 1339 #. type: item
1474 : gnustats 1804 #: R-ints.texi:434
1475 : gnustats 1339 #, no-wrap
1476 :     msgid "ENVSXP"
1477 :     msgstr ""
1478 : gnustats 1804
1479 : gnustats 1751 #
1480 : gnustats 1339 #. type: table
1481 : gnustats 1804 #: R-ints.texi:438
1482 :     msgid ""
1483 :     "Pointers to the frame, enclosing environment and hash table (@code{NULL} or "
1484 :     "a @code{VECSXP}). A frame is a tagged pairlist with tag the symbol and CAR "
1485 :     "the bound value."
1486 : gnustats 1339 msgstr ""
1487 : gnustats 1804
1488 : gnustats 1751 #
1489 : gnustats 1339 #. type: item
1490 : gnustats 1804 #: R-ints.texi:439
1491 : gnustats 1339 #, no-wrap
1492 :     msgid "PROMSXP"
1493 :     msgstr ""
1494 : gnustats 1804
1495 : gnustats 1751 #
1496 : gnustats 1339 #. type: table
1497 : gnustats 1804 #: R-ints.texi:443
1498 :     msgid ""
1499 :     "Pointers to the value, expression and environment (in which to evaluate the "
1500 :     "expression). Once an promise has been evaluated, the environment is set to "
1501 :     "@code{NULL}."
1502 : gnustats 1339 msgstr ""
1503 : gnustats 1804
1504 : gnustats 1751 #
1505 : gnustats 1339 #. type: item
1506 : gnustats 1804 #: R-ints.texi:444
1507 : gnustats 1339 #, no-wrap
1508 :     msgid "LANGSXP"
1509 :     msgstr ""
1510 : gnustats 1804
1511 : gnustats 1751 #
1512 : gnustats 1339 #. type: table
1513 : gnustats 1804 #: R-ints.texi:451
1514 :     msgid ""
1515 :     "A special type of @code{LISTSXP} used for function calls. (The CAR "
1516 :     "references the function (perhaps via a symbol or language object), and the "
1517 :     "CDR the argument list with tags for named arguments.) @R{}-level "
1518 :     "documentation references to `expressions' / `language objects' are mainly "
1519 :     "@code{LANGSXP}s, but can be symbols (@code{SYMSXP}s) or expression vectors "
1520 :     "(@code{EXPRSXP}s)."
1521 : gnustats 1339 msgstr ""
1522 : gnustats 1804
1523 : gnustats 1751 #
1524 : gnustats 1339 #. type: item
1525 : gnustats 1804 #: R-ints.texi:452
1526 : gnustats 1339 #, no-wrap
1527 :     msgid "SPECIALSXP"
1528 :     msgstr ""
1529 : gnustats 1804
1530 : gnustats 1751 #
1531 : gnustats 1339 #. type: itemx
1532 : gnustats 1804 #: R-ints.texi:453
1533 : gnustats 1339 #, no-wrap
1534 :     msgid "BUILTINSXP"
1535 :     msgstr ""
1536 : gnustats 1804
1537 : gnustats 1751 #
1538 : gnustats 1339 #. type: table
1539 : gnustats 1804 #: R-ints.texi:456
1540 :     msgid ""
1541 :     "An integer giving the offset into the table of primitives/@code{.Internal}s."
1542 : gnustats 1339 msgstr ""
1543 : gnustats 1804
1544 : gnustats 1751 #
1545 : gnustats 1339 #. type: item
1546 : gnustats 1804 #: R-ints.texi:457
1547 : gnustats 1339 #, no-wrap
1548 :     msgid "CHARSXP"
1549 :     msgstr ""
1550 : gnustats 1804
1551 : gnustats 1751 #
1552 : gnustats 1339 #. type: table
1553 : gnustats 1804 #: R-ints.texi:460
1554 :     msgid ""
1555 :     "@code{length}, @code{truelength} followed by a block of bytes (allowing for "
1556 :     "the @code{nul} terminator)."
1557 : gnustats 1339 msgstr ""
1558 : gnustats 1804
1559 : gnustats 1751 #
1560 : gnustats 1339 #. type: item
1561 : gnustats 1804 #: R-ints.texi:461
1562 : gnustats 1339 #, no-wrap
1563 :     msgid "LGLSXP"
1564 :     msgstr ""
1565 : gnustats 1804
1566 : gnustats 1751 #
1567 : gnustats 1339 #. type: itemx
1568 : gnustats 1804 #: R-ints.texi:462
1569 : gnustats 1339 #, no-wrap
1570 :     msgid "INTSXP"
1571 :     msgstr ""
1572 : gnustats 1804
1573 : gnustats 1751 #
1574 : gnustats 1339 #. type: table
1575 : gnustats 1804 #: R-ints.texi:465
1576 :     msgid ""
1577 :     "@code{length}, @code{truelength} followed by a block of C @code{int}s (which "
1578 :     "are 32 bits on all @R{} platforms)."
1579 : gnustats 1339 msgstr ""
1580 : gnustats 1804
1581 : gnustats 1751 #
1582 : gnustats 1339 #. type: item
1583 : gnustats 1804 #: R-ints.texi:466
1584 : gnustats 1339 #, no-wrap
1585 :     msgid "REALSXP"
1586 :     msgstr ""
1587 : gnustats 1804
1588 : gnustats 1751 #
1589 : gnustats 1339 #. type: table
1590 : gnustats 1804 #: R-ints.texi:468
1591 :     msgid ""
1592 :     "@code{length}, @code{truelength} followed by a block of C @code{double}s."
1593 : gnustats 1339 msgstr ""
1594 : gnustats 1804
1595 : gnustats 1751 #
1596 : gnustats 1339 #. type: item
1597 : gnustats 1804 #: R-ints.texi:469
1598 : gnustats 1339 #, no-wrap
1599 :     msgid "CPLXSXP"
1600 :     msgstr ""
1601 : gnustats 1804
1602 : gnustats 1751 #
1603 : gnustats 1339 #. type: table
1604 : gnustats 1804 #: R-ints.texi:472
1605 :     msgid ""
1606 :     "@code{length}, @code{truelength} followed by a block of C99 @code{double "
1607 :     "complex}s."
1608 : gnustats 1339 msgstr ""
1609 : gnustats 1804
1610 : gnustats 1751 #
1611 : gnustats 1339 #. type: item
1612 : gnustats 1804 #: R-ints.texi:473
1613 : gnustats 1339 #, no-wrap
1614 :     msgid "STRSXP"
1615 :     msgstr ""
1616 : gnustats 1804
1617 : gnustats 1751 #
1618 : gnustats 1339 #. type: table
1619 : gnustats 1804 #: R-ints.texi:476
1620 :     msgid ""
1621 :     "@code{length}, @code{truelength} followed by a block of pointers (@code{SEXP}"
1622 :     "s pointing to @code{CHARSXP}s)."
1623 : gnustats 1339 msgstr ""
1624 : gnustats 1804
1625 : gnustats 1751 #
1626 : gnustats 1339 #. type: item
1627 : gnustats 1804 #: R-ints.texi:477
1628 : gnustats 1339 #, no-wrap
1629 :     msgid "DOTSXP"
1630 :     msgstr ""
1631 : gnustats 1804
1632 : gnustats 1751 #
1633 : gnustats 1339 #. type: table
1634 : gnustats 1804 #: R-ints.texi:480
1635 :     msgid ""
1636 :     "A special type of @code{LISTSXP} for the value bound to a @code{...} symbol: "
1637 :     "a pairlist of promises."
1638 : gnustats 1339 msgstr ""
1639 : gnustats 1804
1640 : gnustats 1751 #
1641 : gnustats 1339 #. type: item
1642 : gnustats 1804 #: R-ints.texi:481
1643 : gnustats 1339 #, no-wrap
1644 :     msgid "ANYSXP"
1645 :     msgstr ""
1646 : gnustats 1804
1647 : gnustats 1751 #
1648 : gnustats 1339 #. type: table
1649 : gnustats 1804 #: R-ints.texi:484
1650 :     msgid ""
1651 :     "This is used as a place holder for any type: there are no actual objects of "
1652 :     "this type."
1653 : gnustats 1339 msgstr ""
1654 : gnustats 1804
1655 : gnustats 1751 #
1656 : gnustats 1339 #. type: item
1657 : gnustats 1804 #: R-ints.texi:485
1658 : gnustats 1339 #, no-wrap
1659 :     msgid "VECSXP"
1660 :     msgstr ""
1661 : gnustats 1804
1662 : gnustats 1751 #
1663 : gnustats 1339 #. type: itemx
1664 : gnustats 1804 #: R-ints.texi:486
1665 : gnustats 1339 #, no-wrap
1666 :     msgid "EXPRSXP"
1667 :     msgstr ""
1668 : gnustats 1804
1669 : gnustats 1751 #
1670 : gnustats 1339 #. type: table
1671 : gnustats 1804 #: R-ints.texi:490
1672 :     msgid ""
1673 :     "@code{length}, @code{truelength} followed by a block of pointers. These are "
1674 :     "internally identical (and identical to @code{STRSXP}) but differ in the "
1675 :     "interpretations placed on the elements."
1676 : gnustats 1339 msgstr ""
1677 : gnustats 1804
1678 : gnustats 1751 #
1679 : gnustats 1339 #. type: item
1680 : gnustats 1804 #: R-ints.texi:491
1681 : gnustats 1339 #, no-wrap
1682 :     msgid "BCODESXP"
1683 :     msgstr ""
1684 : gnustats 1804
1685 : gnustats 1751 #
1686 : gnustats 1339 #. type: table
1687 : gnustats 1804 #: R-ints.texi:493
1688 : gnustats 1339 msgid "For the `byte-code' objects generated by the compiler."
1689 :     msgstr ""
1690 : gnustats 1804
1691 : gnustats 1751 #
1692 : gnustats 1339 #. type: item
1693 : gnustats 1804 #: R-ints.texi:494
1694 : gnustats 1339 #, no-wrap
1695 :     msgid "EXTPTRSXP"
1696 :     msgstr ""
1697 : gnustats 1804
1698 : gnustats 1751 #
1699 : gnustats 1339 #. type: table
1700 : gnustats 1804 #: R-ints.texi:497
1701 :     msgid ""
1702 :     "Has three pointers, to the pointer, the protection value (an @R{} object "
1703 :     "which if alive protects this object) and a tag (a @code{SYMSXP}?)."
1704 : gnustats 1339 msgstr ""
1705 : gnustats 1804
1706 : gnustats 1751 #
1707 : gnustats 1339 #. type: item
1708 : gnustats 1804 #: R-ints.texi:498
1709 : gnustats 1339 #, no-wrap
1710 :     msgid "WEAKREFSXP"
1711 :     msgstr ""
1712 : gnustats 1804
1713 : gnustats 1751 #
1714 : gnustats 1339 #. type: table
1715 : gnustats 1804 #: R-ints.texi:503
1716 :     msgid ""
1717 :     "A @code{WEAKREFSXP} is a special @code{VECSXP} of length 4, with elements "
1718 :     "@samp{key}, @samp{value}, @samp{finalizer} and @samp{next}. The @samp{key} "
1719 :     "is @code{NULL}, an environment or an external pointer, and the "
1720 :     "@samp{finalizer} is a function or @code{NULL}."
1721 : gnustats 1339 msgstr ""
1722 : gnustats 1804
1723 : gnustats 1751 #
1724 : gnustats 1339 #. type: item
1725 : gnustats 1804 #: R-ints.texi:504
1726 : gnustats 1339 #, no-wrap
1727 :     msgid "RAWSXP"
1728 :     msgstr ""
1729 : gnustats 1804
1730 : gnustats 1751 #
1731 : gnustats 1339 #. type: table
1732 : gnustats 1804 #: R-ints.texi:506
1733 : gnustats 1339 msgid "@code{length}, @code{truelength} followed by a block of bytes."
1734 :     msgstr ""
1735 : gnustats 1804
1736 : gnustats 1751 #
1737 : gnustats 1339 #. type: item
1738 : gnustats 1804 #: R-ints.texi:507
1739 : gnustats 1339 #, no-wrap
1740 :     msgid "S4SXP"
1741 :     msgstr ""
1742 : gnustats 1804
1743 : gnustats 1751 #
1744 : gnustats 1339 #. type: table
1745 : gnustats 1804 #: R-ints.texi:509
1746 : gnustats 1339 msgid "two unused pointers and a tag."
1747 :     msgstr ""
1748 : gnustats 1804
1749 : gnustats 1751 #
1750 : gnustats 1339 #. type: cindex
1751 : gnustats 1804 #: R-ints.texi:514
1752 : gnustats 1339 #, no-wrap
1753 :     msgid "allocation classes"
1754 :     msgstr ""
1755 : gnustats 1804
1756 : gnustats 1751 #
1757 : gnustats 1339 #. type: Plain text
1758 : gnustats 1804 #: R-ints.texi:526
1759 :     msgid ""
1760 :     "As we have seen, the field @code{gccls} in the header is three bits to label "
1761 :     "up to 8 classes of nodes. Non-vector nodes are of class 0, and `small' "
1762 :     "vector nodes are of classes 1 to 5, with a class for custom allocator vector "
1763 :     "nodes 6 and `large' vector nodes being of class 7. The `small' vector nodes "
1764 :     "are able to store vector data of up to 8, 16, 32, 64 and 128 bytes: larger "
1765 :     "vectors are @code{malloc}-ed individually whereas the `small' nodes are "
1766 :     "allocated from pages of about 2000 bytes. Vector nodes allocated using "
1767 :     "custom allocators (via @code{allocVector3}) are not counted in the gc memory "
1768 :     "usage statistics since their memory semantics is not under R's control and "
1769 :     "may be non-standard (e.g., memory could be partially shared across nodes)."
1770 : gnustats 1339 msgstr ""
1771 : gnustats 1804
1772 : gnustats 1751 #
1773 : gnustats 1339 #. type: cindex
1774 : gnustats 1804 #: R-ints.texi:531
1775 : gnustats 1339 #, no-wrap
1776 :     msgid "environment"
1777 :     msgstr ""
1778 : gnustats 1804
1779 : gnustats 1751 #
1780 : gnustats 1339 #. type: cindex
1781 : gnustats 1804 #: R-ints.texi:532
1782 : gnustats 1339 #, no-wrap
1783 :     msgid "variable lookup"
1784 :     msgstr ""
1785 : gnustats 1804
1786 : gnustats 1751 #
1787 : gnustats 1339 #. type: Plain text
1788 : gnustats 1804 #: R-ints.texi:538
1789 :     msgid ""
1790 :     "What users think of as `variables' are symbols which are bound to objects in "
1791 :     "`environments'. The word `environment' is used ambiguously in @R{} to mean "
1792 :     "@emph{either} the frame of an @code{ENVSXP} (a pairlist of symbol-value "
1793 :     "pairs) @emph{or} an @code{ENVSXP}, a frame plus an enclosure."
1794 : gnustats 1339 msgstr ""
1795 : gnustats 1804
1796 : gnustats 1751 #
1797 : gnustats 1339 #. type: cindex
1798 : gnustats 1804 #: R-ints.texi:539
1799 : gnustats 1339 #, no-wrap
1800 :     msgid "user databases"
1801 :     msgstr ""
1802 : gnustats 1804
1803 : gnustats 1751 #
1804 : gnustats 1339 #. type: Plain text
1805 : gnustats 1804 #: R-ints.texi:544
1806 :     msgid ""
1807 :     "There are additional places that `variables' can be looked up, called `user "
1808 :     "databases' in comments in the code. These seem undocumented in the @R{} "
1809 :     "sources, but apparently refer to the @pkg{RObjectTable} package at "
1810 :     "@uref{http://www.omegahat.org/RObjectTables/}."
1811 : gnustats 1339 msgstr ""
1812 : gnustats 1804
1813 : gnustats 1751 #
1814 : gnustats 1339 #. type: cindex
1815 : gnustats 1804 #: R-ints.texi:545
1816 :     #: R-ints.texi:1715
1817 : gnustats 1339 #, no-wrap
1818 :     msgid "base environment"
1819 :     msgstr ""
1820 : gnustats 1804
1821 : gnustats 1751 #
1822 : gnustats 1339 #. type: cindex
1823 : gnustats 1804 #: R-ints.texi:546
1824 :     #: R-ints.texi:1716
1825 : gnustats 1339 #, no-wrap
1826 :     msgid "environment, base"
1827 :     msgstr ""
1828 : gnustats 1804
1829 : gnustats 1751 #
1830 : gnustats 1339 #. type: Plain text
1831 : gnustats 1804 #: R-ints.texi:558
1832 :     msgid ""
1833 :     "The base environment is special. There is an @code{ENVSXP} environment with "
1834 :     "enclosure the empty environment @code{R_EmptyEnv}, but the frame of that "
1835 :     "environment is not used. Rather its bindings are part of the global symbol "
1836 :     "table, being those symbols in the global symbol table whose values are not "
1837 :     "@code{R_UnboundValue}. When @R{} is started the internal functions are "
1838 :     "installed (by C code) in the symbol table, with primitive functions having "
1839 :     "values and @code{.Internal} functions having what would be their values in "
1840 :     "the field accessed by the @code{INTERNAL} macro. Then @code{.Platform} and "
1841 :     "@code{.Machine} are computed and the base package is loaded into the base "
1842 :     "environment followed by the system profile."
1843 : gnustats 1339 msgstr ""
1844 : gnustats 1804
1845 : gnustats 1751 #
1846 : gnustats 1339 #. type: Plain text
1847 : gnustats 1804 #: R-ints.texi:561
1848 :     msgid ""
1849 :     "The frames of environments (and the symbol table) are normally hashed for "
1850 :     "faster access (including insertion and deletion)."
1851 : gnustats 1339 msgstr ""
1852 : gnustats 1804
1853 : gnustats 1751 #
1854 : gnustats 1339 #. type: Plain text
1855 : gnustats 1804 #: R-ints.texi:572
1856 :     msgid ""
1857 :     "By default @R{} maintains a (hashed) global cache of `variables' (that is "
1858 :     "symbols and their bindings) which have been found, and this refers only to "
1859 :     "environments which have been marked to participate, which consists of the "
1860 :     "global environment (aka the user workspace), the base environment plus "
1861 :     "environments@footnote{Remember that attaching a list or a saved image "
1862 :     "actually creates and populates an environment and attaches that.} which have "
1863 :     "been @code{attach}ed. When an environment is either @code{attach}ed or "
1864 :     "@code{detach}ed, the names of its symbols are flushed from the cache. The "
1865 :     "cache is used whenever searching for variables from the global environment "
1866 :     "(possibly as part of a recursive search)."
1867 : gnustats 1339 msgstr ""
1868 : gnustats 1804
1869 : gnustats 1751 #
1870 : gnustats 1339 #. type: node
1871 : gnustats 1804 #: R-ints.texi:577
1872 :     #: R-ints.texi:579
1873 :     #: R-ints.texi:580
1874 :     #: R-ints.texi:608
1875 : gnustats 1339 #, no-wrap
1876 :     msgid "Search paths"
1877 :     msgstr ""
1878 : gnustats 1804
1879 : gnustats 1751 #
1880 : gnustats 1339 #. type: node
1881 : gnustats 1804 #: R-ints.texi:577
1882 :     #: R-ints.texi:579
1883 :     #: R-ints.texi:608
1884 :     #: R-ints.texi:609
1885 :     #: R-ints.texi:641
1886 : gnustats 1339 #, no-wrap
1887 :     msgid "Namespaces"
1888 :     msgstr ""
1889 : gnustats 1804
1890 : gnustats 1751 #
1891 : gnustats 1339 #. type: subsection
1892 : gnustats 1804 #: R-ints.texi:577
1893 :     #: R-ints.texi:608
1894 :     #: R-ints.texi:641
1895 :     #: R-ints.texi:642
1896 : gnustats 1339 #, no-wrap
1897 :     msgid "Hash table"
1898 :     msgstr ""
1899 : gnustats 1804
1900 : gnustats 1751 #
1901 : gnustats 1339 #. type: cindex
1902 : gnustats 1804 #: R-ints.texi:582
1903 : gnustats 1339 #, no-wrap
1904 :     msgid "search path"
1905 :     msgstr ""
1906 : gnustats 1804
1907 : gnustats 1751 #
1908 : gnustats 1339 #. type: Plain text
1909 : gnustats 1804 #: R-ints.texi:589
1910 :     msgid ""
1911 :     "@Sl{} has the notion of a `search path': the lookup for a `variable' leads "
1912 :     "(possibly through a series of frames) to the `session frame' the `working "
1913 :     "directory' and then along the search path. The search path is a series of "
1914 :     "databases (as returned by @code{search()}) which contain the system "
1915 :     "functions (but not necessarily at the end of the path, as by default the "
1916 :     "equivalent of packages are added at the end)."
1917 : gnustats 1339 msgstr ""
1918 : gnustats 1804
1919 : gnustats 1751 #
1920 : gnustats 1339 #. type: Plain text
1921 : gnustats 1804 #: R-ints.texi:596
1922 :     msgid ""
1923 :     "@R{} has a variant on the @Sl{} model. There is a search path (also "
1924 :     "returned by @code{search()}) which consists of the global environment (aka "
1925 :     "user workspace) followed by environments which have been attached and "
1926 :     "finally the base environment. Note that unlike @Sl{} it is not possible to "
1927 :     "attach environments before the workspace nor after the base environment."
1928 : gnustats 1339 msgstr ""
1929 : gnustats 1804
1930 : gnustats 1751 #
1931 : gnustats 1339 #. type: Plain text
1932 : gnustats 1804 #: R-ints.texi:607
1933 :     msgid ""
1934 :     "However, the notion of variable lookup is more general in @R{}, hence the "
1935 :     "plural in the title of this subsection. Since environments have enclosures, "
1936 :     "from any environment there is a search path found by looking in the frame, "
1937 :     "then the frame of its enclosure and so on. Since loops are not allowed, "
1938 :     "this process will eventually terminate: it can terminate at either the base "
1939 :     "environment or the empty environment. (It can be conceptually simpler to "
1940 :     "think of the search always terminating at the empty environment, but with an "
1941 :     "optimization to stop at the base environment.) So the `search path' "
1942 :     "describes the chain of environments which is traversed once the search "
1943 :     "reaches the global environment."
1944 : gnustats 1339 msgstr ""
1945 : gnustats 1804
1946 : gnustats 1751 #
1947 : gnustats 1339 #. type: cindex
1948 : gnustats 1804 #: R-ints.texi:611
1949 : gnustats 1339 #, no-wrap
1950 :     msgid "namespace"
1951 :     msgstr ""
1952 : gnustats 1804
1953 : gnustats 1751 #
1954 : gnustats 1339 #. type: Plain text
1955 : gnustats 1804 #: R-ints.texi:618
1956 :     msgid ""
1957 :     "Namespaces are environments associated with packages (and once again the "
1958 :     "base package is special and will be considered separately). A package "
1959 :     "@code{@var{pkg}} with a namespace defines two environments @code{namespace:"
1960 :     "@var{pkg}} and @code{package:@var{pkg}}: it is @code{package:@var{pkg}} that "
1961 :     "can be @code{attach}ed and form part of the search path."
1962 : gnustats 1339 msgstr ""
1963 : gnustats 1804
1964 : gnustats 1751 #
1965 : gnustats 1339 #. type: Plain text
1966 : gnustats 1804 #: R-ints.texi:630
1967 :     msgid ""
1968 :     "The objects defined by the @R{} code in the package are symbols with "
1969 :     "bindings in the @code{namespace:@var{pkg}} environment. The @code{package:"
1970 :     "@var{pkg}} environment is populated by selected symbols from the "
1971 :     "@code{namespace:@var{pkg}} environment (the exports). The enclosure of this "
1972 :     "environment is an environment populated with the explicit imports from other "
1973 :     "namespaces, and the enclosure of @emph{that} environment is the base "
1974 :     "namespace. (So the illusion of the imports being in the namespace "
1975 :     "environment is created via the environment tree.) The enclosure of the base "
1976 :     "namespace is the global environment, so the search from a package namespace "
1977 :     "goes via the (explicit and implicit) imports to the standard `search path'."
1978 : gnustats 1339 msgstr ""
1979 : gnustats 1804
1980 : gnustats 1751 #
1981 : gnustats 1339 #. type: cindex
1982 : gnustats 1804 #: R-ints.texi:631
1983 : gnustats 1339 #, no-wrap
1984 :     msgid "base namespace"
1985 :     msgstr ""
1986 : gnustats 1804
1987 : gnustats 1751 #
1988 : gnustats 1339 #. type: cindex
1989 : gnustats 1804 #: R-ints.texi:632
1990 : gnustats 1339 #, no-wrap
1991 :     msgid "namespace, base"
1992 :     msgstr ""
1993 : gnustats 1804
1994 : gnustats 1751 #
1995 : gnustats 1339 #. type: findex
1996 : gnustats 1804 #: R-ints.texi:633
1997 : gnustats 1339 #, no-wrap
1998 :     msgid "R_BaseNamespace"
1999 :     msgstr ""
2000 : gnustats 1804
2001 : gnustats 1751 #
2002 : gnustats 1339 #. type: Plain text
2003 : gnustats 1804 #: R-ints.texi:640
2004 :     msgid ""
2005 :     "The base namespace environment @code{R_BaseNamespace} is another "
2006 :     "@code{ENVSXP} that is special-cased. It is effectively the same thing as "
2007 :     "the base environment @code{R_BaseEnv} @emph{except} that its enclosure is "
2008 :     "the global environment rather than the empty environment: the internal code "
2009 :     "diverts lookups in its frame to the global symbol table."
2010 : gnustats 1339 msgstr ""
2011 : gnustats 1804
2012 : gnustats 1751 #
2013 : gnustats 1339 #. type: Plain text
2014 : gnustats 1804 #: R-ints.texi:651
2015 :     msgid ""
2016 :     "Environments in @R{} usually have a hash table, and nowadays that is the "
2017 :     "default in @code{new.env()}. It is stored as a @code{VECSXP} where "
2018 :     "@code{length} is used for the allocated size of the table and "
2019 :     "@code{truelength} is the number of primary slots in use---the pointer to the "
2020 :     "@code{VECSXP} is part of the header of a @code{SEXP} of type @code{ENVSXP}, "
2021 :     "and this points to @code{R_NilValue} if the environment is not hashed."
2022 : gnustats 1339 msgstr ""
2023 : gnustats 1804
2024 : gnustats 1751 #
2025 : gnustats 1339 #. type: Plain text
2026 : gnustats 1804 #: R-ints.texi:653
2027 : gnustats 1339 msgid "For the pros and cons of hashing, see a basic text on Computer Science."
2028 :     msgstr ""
2029 : gnustats 1804
2030 : gnustats 1751 #
2031 : gnustats 1339 #. type: Plain text
2032 : gnustats 1804 #: R-ints.texi:659
2033 :     msgid ""
2034 :     "The code to implement hashed environments is in @file{src/main/envir.c}. "
2035 :     "Unless set otherwise (e.g.@: by the @code{size} argument of @code{new."
2036 :     "env()}) the initial table size is @code{29}. The table will be resized by a "
2037 :     "factor of 1.2 once the load factor (the proportion of primary slots in use) "
2038 :     "reaches 85%."
2039 : gnustats 1339 msgstr ""
2040 : gnustats 1804
2041 : gnustats 1751 #
2042 : gnustats 1339 #. type: Plain text
2043 : gnustats 1804 #: R-ints.texi:665
2044 :     msgid ""
2045 :     "The hash chains are stored as pairlist elements of the @code{VECSXP}: items "
2046 :     "are inserted at the front of the pairlist. Hashing is principally designed "
2047 :     "for fast searching of environments, which are from time to time added to but "
2048 :     "rarely deleted from, so items are not actually deleted but have their value "
2049 :     "set to @code{R_UnboundValue}."
2050 : gnustats 1339 msgstr ""
2051 : gnustats 1804
2052 : gnustats 1751 #
2053 : gnustats 1339 #. type: cindex
2054 : gnustats 1804 #: R-ints.texi:670
2055 : gnustats 1339 #, no-wrap
2056 :     msgid "attributes"
2057 :     msgstr ""
2058 : gnustats 1804
2059 : gnustats 1751 #
2060 : gnustats 1339 #. type: findex
2061 : gnustats 1804 #: R-ints.texi:671
2062 : gnustats 1339 #, no-wrap
2063 :     msgid "ATTRIB"
2064 :     msgstr ""
2065 : gnustats 1804
2066 : gnustats 1751 #
2067 : gnustats 1339 #. type: findex
2068 : gnustats 1804 #: R-ints.texi:672
2069 : gnustats 1339 #, no-wrap
2070 :     msgid "SET_ATTRIB"
2071 :     msgstr ""
2072 : gnustats 1804
2073 : gnustats 1751 #
2074 : gnustats 1339 #. type: findex
2075 : gnustats 1804 #: R-ints.texi:673
2076 : gnustats 1339 #, no-wrap
2077 :     msgid "DUPLICATE_ATTRIB"
2078 :     msgstr ""
2079 : gnustats 1804
2080 : gnustats 1751 #
2081 : gnustats 1339 #. type: Plain text
2082 : gnustats 1804 #: R-ints.texi:685
2083 :     msgid ""
2084 :     "As we have seen, every @code{SEXPREC} has a pointer to the attributes of the "
2085 :     "node (default @code{R_NilValue}). The attributes can be accessed/set by the "
2086 :     "macros/functions @code{ATTRIB} and @code{SET_ATTRIB}, but such direct access "
2087 :     "is normally only used to check if the attributes are @code{NULL} or to reset "
2088 :     "them. Otherwise access goes through the functions @code{getAttrib} and "
2089 :     "@code{setAttrib} which impose restrictions on the attributes. One thing to "
2090 :     "watch is that if you copy attributes from one object to another you may "
2091 :     "(un)set the @code{\"class\"} attribute and so need to copy the object and S4 "
2092 :     "bits as well. There is a macro/function @code{DUPLICATE_ATTRIB} to automate "
2093 :     "this."
2094 : gnustats 1339 msgstr ""
2095 : gnustats 1804
2096 : gnustats 1751 #
2097 : gnustats 1339 #. type: Plain text
2098 : gnustats 1804 #: R-ints.texi:689
2099 :     msgid ""
2100 :     "Note that the `attributes' of a @code{CHARSXP} are used as part of the "
2101 :     "management of the @code{CHARSXP} cache: of course @code{CHARSXP}'s are not "
2102 :     "user-visible but C-level code might look at their attributes."
2103 : gnustats 1339 msgstr ""
2104 : gnustats 1804
2105 : gnustats 1751 #
2106 : gnustats 1339 #. type: Plain text
2107 : gnustats 1804 #: R-ints.texi:701
2108 :     msgid ""
2109 :     "The code assumes that the attributes of a node are either @code{R_NilValue} "
2110 :     "or a pairlist of non-zero length (and this is checked by "
2111 :     "@code{SET_ATTRIB}). The attributes are named (via tags on the pairlist). "
2112 :     "The replacement function @code{attributes<-} ensures that @code{\"dim\"} "
2113 :     "precedes @code{\"dimnames\"} in the pairlist. Attribute @code{\"dim\"} is "
2114 :     "one of several that is treated specially: the values are checked, and any "
2115 :     "@code{\"names\"} and @code{\"dimnames\"} attributes are removed. Similarly, "
2116 :     "you cannot set @code{\"dimnames\"} without having set @code{\"dim\"}, and "
2117 :     "the value assigned must be a list of the correct length and with elements of "
2118 :     "the correct lengths (and all zero-length elements are replaced by "
2119 :     "@code{NULL})."
2120 : gnustats 1339 msgstr ""
2121 : gnustats 1804
2122 : gnustats 1751 #
2123 : gnustats 1339 #. type: Plain text
2124 : gnustats 1804 #: R-ints.texi:715
2125 :     msgid ""
2126 :     "The other attributes which are given special treatment are @code{\"names\"}, "
2127 :     "@code{\"class\"}, @code{\"tsp\"}, @code{\"comment\"} and @code{\"row.names"
2128 :     "\"}. For pairlist-like objects the names are not stored as an attribute but "
2129 :     "(as symbols) as the tags: however the @R{} interface makes them look like "
2130 :     "conventional attributes, and for one-dimensional arrays they are stored as "
2131 :     "the first element of the @code{\"dimnames\"} attribute. The C code ensures "
2132 :     "that the @code{\"tsp\"} attribute is an @code{REALSXP}, the frequency is "
2133 :     "positive and the implied length agrees with the number of rows of the object "
2134 :     "being assigned to. Classes and comments are restricted to character "
2135 :     "vectors, and assigning a zero-length comment or class removes the "
2136 :     "attribute. Setting or removing a @code{\"class\"} attribute sets the object "
2137 :     "bit appropriately. Integer row names are converted to and from the internal "
2138 :     "compact representation."
2139 : gnustats 1339 msgstr ""
2140 : gnustats 1804
2141 : gnustats 1751 #
2142 : gnustats 1339 #. type: Plain text
2143 : gnustats 1804 #: R-ints.texi:725
2144 :     msgid ""
2145 :     "Care needs to be taken when adding attributes to objects of the types with "
2146 :     "non-standard copying semantics. There is only one object of type "
2147 :     "@code{NILSXP}, @code{R_NilValue}, and that should never have attributes (and "
2148 :     "this is enforced in @code{installAttrib}). For environments, external "
2149 :     "pointers and weak references, the attributes should be relevant to all uses "
2150 :     "of the object: it is for example reasonable to have a name for an "
2151 :     "environment, and also a @code{\"path\"} attribute for those environments "
2152 :     "populated from @R{} code in a package."
2153 : gnustats 1339 msgstr ""
2154 : gnustats 1804
2155 : gnustats 1751 #
2156 : gnustats 1339 #. type: cindex
2157 : gnustats 1804 #: R-ints.texi:726
2158 : gnustats 1339 #, no-wrap
2159 :     msgid "attributes, preserving"
2160 :     msgstr ""
2161 : gnustats 1804
2162 : gnustats 1751 #
2163 : gnustats 1339 #. type: cindex
2164 : gnustats 1804 #: R-ints.texi:727
2165 : gnustats 1339 #, no-wrap
2166 :     msgid "preserving attributes"
2167 :     msgstr ""
2168 : gnustats 1804
2169 : gnustats 1751 #
2170 : gnustats 1339 #. type: Plain text
2171 : gnustats 1804 #: R-ints.texi:734
2172 :     msgid ""
2173 :     "When should attributes be preserved under operations on an object? Becker, "
2174 :     "Chambers & Wilks (1988, pp. 144--6) give some guidance. Scalar functions "
2175 :     "(those which operate element-by-element on a vector and whose output is "
2176 :     "similar to the input) should preserve attributes (except perhaps class, and "
2177 :     "if they do preserve class they need to preserve the @code{OBJECT} and S4 "
2178 :     "bits). Binary operations normally call"
2179 : gnustats 1339 msgstr ""
2180 : gnustats 1804
2181 : gnustats 1751 #
2182 : gnustats 1339 #. type: findex
2183 : gnustats 1804 #: R-ints.texi:734
2184 : gnustats 1339 #, no-wrap
2185 :     msgid "copyMostAttributes"
2186 :     msgstr ""
2187 : gnustats 1804
2188 : gnustats 1751 #
2189 : gnustats 1339 #. type: Plain text
2190 : gnustats 1804 #: R-ints.texi:740
2191 :     msgid ""
2192 :     "@code{copyMostAttributes} to copy most attributes from the longer argument "
2193 :     "(and if they are of the same length from both, preferring the values on the "
2194 :     "first). Here `most' means all except the @code{names}, @code{dim} and "
2195 :     "@code{dimnames} which are set appropriately by the code for the operator."
2196 : gnustats 1339 msgstr ""
2197 : gnustats 1804
2198 : gnustats 1751 #
2199 : gnustats 1339 #. type: Plain text
2200 : gnustats 1804 #: R-ints.texi:746
2201 :     msgid ""
2202 :     "Subsetting (other than by an empty index) generally drops all attributes "
2203 :     "except @code{names}, @code{dim} and @code{dimnames} which are reset as "
2204 :     "appropriate. On the other hand, subassignment generally preserves such "
2205 :     "attributes even if the length is changed. Coercion drops all attributes. "
2206 :     "For example:"
2207 : gnustats 1339 msgstr ""
2208 : gnustats 1804
2209 : gnustats 1751 #
2210 : gnustats 1339 #. type: example
2211 : gnustats 1804 #: R-ints.texi:769
2212 : gnustats 1339 #, no-wrap
2213 :     msgid ""
2214 :     "> x <- structure(1:8, names=letters[1:8], comm=\"a comment\")\n"
2215 :     "> x[]\n"
2216 :     "a b c d e f g h\n"
2217 :     "1 2 3 4 5 6 7 8\n"
2218 :     "attr(,\"comm\")\n"
2219 :     "[1] \"a comment\"\n"
2220 :     "> x[1:3]\n"
2221 :     "a b c\n"
2222 :     "1 2 3\n"
2223 :     "> x[3] <- 3\n"
2224 :     "> x\n"
2225 :     "a b c d e f g h\n"
2226 :     "1 2 3 4 5 6 7 8\n"
2227 :     "attr(,\"comm\")\n"
2228 :     "[1] \"a comment\"\n"
2229 :     "> x[9] <- 9\n"
2230 :     "> x\n"
2231 :     "a b c d e f g h\n"
2232 :     "1 2 3 4 5 6 7 8 9\n"
2233 :     "attr(,\"comm\")\n"
2234 :     "[1] \"a comment\"\n"
2235 :     msgstr ""
2236 : gnustats 1804
2237 : gnustats 1751 #
2238 : gnustats 1339 #. type: cindex
2239 : gnustats 1804 #: R-ints.texi:775
2240 : gnustats 1339 #, no-wrap
2241 :     msgid "context"
2242 :     msgstr ""
2243 : gnustats 1804
2244 : gnustats 1751 #
2245 : gnustats 1339 #. type: Plain text
2246 : gnustats 1804 #: R-ints.texi:781
2247 :     msgid ""
2248 :     "@emph{Contexts} are the internal mechanism used to keep track of where a "
2249 :     "computation has got to (and from where), so that control-flow constructs can "
2250 :     "work and reasonable information can be produced on error conditions (such as "
2251 :     "@emph{via} traceback), and otherwise (the @code{sys.@var{xxx}} functions)."
2252 : gnustats 1339 msgstr ""
2253 : gnustats 1804
2254 : gnustats 1751 #
2255 : gnustats 1339 #. type: Plain text
2256 : gnustats 1804 #: R-ints.texi:783
2257 : gnustats 1339 msgid "Execution contexts are a stack of C @code{structs}:"
2258 :     msgstr ""
2259 : gnustats 1804
2260 : gnustats 1751 #
2261 : gnustats 1339 #. type: example
2262 : gnustats 1804 #: R-ints.texi:805
2263 : gnustats 1339 #, no-wrap
2264 :     msgid ""
2265 :     "typedef struct RCNTXT @{\n"
2266 :     " struct RCNTXT *nextcontext; /* @r{The next context up the chain} */\n"
2267 :     " int callflag; /* @r{The context `type'} */\n"
2268 :     " JMP_BUF cjmpbuf; /* @r{C stack and register information} */\n"
2269 :     " int cstacktop; /* @r{Top of the pointer protection stack} */\n"
2270 :     " int evaldepth; /* @r{Evaluation depth at inception} */\n"
2271 :     " SEXP promargs; /* @r{Promises supplied to closure} */\n"
2272 :     " SEXP callfun; /* @r{The closure called} */\n"
2273 :     " SEXP sysparent; /* @r{Environment the closure was called from} */\n"
2274 :     " SEXP call; /* @r{The call that effected this context} */\n"
2275 :     " SEXP cloenv; /* @r{The environment} */\n"
2276 :     " SEXP conexit; /* @r{Interpreted @code{on.exit} code} */\n"
2277 :     " void (*cend)(void *); /* @r{C @code{on.exit} thunk} */\n"
2278 :     " void *cenddata; /* @r{Data for C @code{on.exit} thunk} */\n"
2279 :     " char *vmax; /* @r{Top of the @code{R_alloc} stack} */\n"
2280 :     " int intsusp; /* @r{Interrupts are suspended} */\n"
2281 :     " SEXP handlerstack; /* @r{Condition handler stack} */\n"
2282 :     " SEXP restartstack; /* @r{Stack of available restarts} */\n"
2283 :     " struct RPRSTACK *prstack; /* @r{Stack of pending promises} */\n"
2284 :     "@} RCNTXT, *context;\n"
2285 :     msgstr ""
2286 : gnustats 1804
2287 : gnustats 1751 #
2288 : gnustats 1339 #. type: Plain text
2289 : gnustats 1804 #: R-ints.texi:810
2290 :     msgid ""
2291 :     "plus additional fields for the byte-code compiler. The `types' are from"
2292 : gnustats 1339 msgstr ""
2293 : gnustats 1804
2294 : gnustats 1751 #
2295 : gnustats 1339 #. type: example
2296 : gnustats 1804 #: R-ints.texi:825
2297 : gnustats 1339 #, no-wrap
2298 :     msgid ""
2299 :     "enum @{\n"
2300 :     " CTXT_TOPLEVEL = 0, /* @r{toplevel context} */\n"
2301 :     " CTXT_NEXT = 1, /* @r{target for @code{next}} */\n"
2302 :     " CTXT_BREAK = 2, /* @r{target for @code{break}} */\n"
2303 :     " CTXT_LOOP = 3, /* @r{@code{break} or @code{next} target} */\n"
2304 :     " CTXT_FUNCTION = 4, /* @r{function closure} */\n"
2305 :     " CTXT_CCODE = 8, /* @r{other functions that need error cleanup} */\n"
2306 :     " CTXT_RETURN = 12, /* @r{@code{return()} from a closure} */\n"
2307 :     " CTXT_BROWSER = 16, /* @r{return target on exit from browser} */\n"
2308 :     " CTXT_GENERIC = 20, /* @r{rather, running an S3 method} */\n"
2309 :     " CTXT_RESTART = 32, /* @r{a call to @code{restart} was made from a closure} */\n"
2310 :     " CTXT_BUILTIN = 64 /* @r{builtin internal function} */\n"
2311 :     "@};\n"
2312 :     msgstr ""
2313 : gnustats 1804
2314 : gnustats 1751 #
2315 : gnustats 1339 #. type: Plain text
2316 : gnustats 1804 #: R-ints.texi:830
2317 :     msgid ""
2318 :     "where the @code{CTXT_FUNCTION} bit is on wherever function closures are "
2319 :     "involved."
2320 : gnustats 1339 msgstr ""
2321 : gnustats 1804
2322 : gnustats 1751 #
2323 : gnustats 1339 #. type: Plain text
2324 : gnustats 1804 #: R-ints.texi:837
2325 :     msgid ""
2326 :     "Contexts are created by a call to @code{begincontext} and ended by a call to "
2327 :     "@code{endcontext}: code can search up the stack for a particular type of "
2328 :     "context via @code{findcontext} (and jump there) or jump to a specific "
2329 :     "context via @code{R_JumpToContext}. @code{R_ToplevelContext} is the `idle' "
2330 :     "state (normally the command prompt), and @code{R_GlobalContext} is the top "
2331 :     "of the stack."
2332 : gnustats 1339 msgstr ""
2333 : gnustats 1804
2334 : gnustats 1751 #
2335 : gnustats 1339 #. type: Plain text
2336 : gnustats 1804 #: R-ints.texi:840
2337 :     msgid ""
2338 :     "Note that whilst calls to closures and builtins set a context, those to "
2339 :     "special internal functions never do."
2340 : gnustats 1339 msgstr ""
2341 : gnustats 1804
2342 : gnustats 1751 #
2343 : gnustats 1339 #. type: findex
2344 : gnustats 1804 #: R-ints.texi:841
2345 : gnustats 1339 #, no-wrap
2346 :     msgid "UseMethod"
2347 :     msgstr ""
2348 : gnustats 1804
2349 : gnustats 1751 #
2350 : gnustats 1339 #. type: cindex
2351 : gnustats 1804 #: R-ints.texi:842
2352 : gnustats 1339 #, no-wrap
2353 :     msgid "method dispatch"
2354 :     msgstr ""
2355 : gnustats 1804
2356 : gnustats 1751 #
2357 : gnustats 1339 #. type: Plain text
2358 : gnustats 1804 #: R-ints.texi:848
2359 :     msgid ""
2360 :     "Dispatching from a S3 generic (via @code{UseMethod} or its internal "
2361 :     "equivalent) or calling @code{NextMethod} sets the context type to "
2362 :     "@code{CTXT_GENERIC}. This is used to set the @code{sysparent} of the method "
2363 :     "call to that of the @code{generic}, so the method appears to have been "
2364 :     "called in place of the generic rather than from the generic."
2365 : gnustats 1339 msgstr ""
2366 : gnustats 1804
2367 : gnustats 1751 #
2368 : gnustats 1339 #. type: Plain text
2369 : gnustats 1804 #: R-ints.texi:852
2370 :     msgid ""
2371 :     "The @R{} @code{sys.frame} and @code{sys.call} functions work by counting "
2372 :     "calls to closures (type @code{CTXT_FUNCTION}) from either end of the context "
2373 :     "stack."
2374 : gnustats 1339 msgstr ""
2375 : gnustats 1804
2376 : gnustats 1751 #
2377 : gnustats 1339 #. type: Plain text
2378 : gnustats 1804 #: R-ints.texi:857
2379 :     msgid ""
2380 :     "Note that the @code{sysparent} element of the structure is not the same "
2381 :     "thing as @code{sys.parent()}. Element @code{sysparent} is primarily used in "
2382 :     "managing changes of the function being evaluated, i.e. by @code{Recall} and "
2383 :     "method dispatch."
2384 : gnustats 1339 msgstr ""
2385 : gnustats 1804
2386 : gnustats 1751 #
2387 : gnustats 1339 #. type: Plain text
2388 : gnustats 1804 #: R-ints.texi:863
2389 :     msgid ""
2390 :     "@code{CTXT_CCODE} contexts are currently used in @code{cat()}, "
2391 :     "@code{load()}, @code{scan()} and @code{write.table()} (to close the "
2392 :     "connection on error), by @code{PROTECT}, serialization (to recover from "
2393 :     "errors, e.g.@: free buffers) and within the error handling code (to raise "
2394 :     "the C stack limit and reset some variables)."
2395 : gnustats 1339 msgstr ""
2396 : gnustats 1804
2397 : gnustats 1751 #
2398 : gnustats 1339 #. type: cindex
2399 : gnustats 1804 #: R-ints.texi:868
2400 : gnustats 1339 #, no-wrap
2401 :     msgid "argument evaluation"
2402 :     msgstr ""
2403 : gnustats 1804
2404 : gnustats 1751 #
2405 : gnustats 1339 #. type: Plain text
2406 : gnustats 1804 #: R-ints.texi:875
2407 :     msgid ""
2408 :     "As we have seen, functions in @R{} come in three types, closures "
2409 :     "(@code{SEXPTYPE} @code{CLOSXP}), specials (@code{SPECIALSXP}) and builtins "
2410 :     "(@code{BUILTINSXP}). In this section we consider when (and if) the actual "
2411 :     "arguments of function calls are evaluated. The rules are different for the "
2412 :     "internal (special/builtin) and @R{}-level functions (closures)."
2413 : gnustats 1339 msgstr ""
2414 : gnustats 1804
2415 : gnustats 1751 #
2416 : gnustats 1339 #. type: Plain text
2417 : gnustats 1804 #: R-ints.texi:886
2418 :     msgid ""
2419 :     "For a call to a closure, the actual and formal arguments are matched and a "
2420 :     "matched call (another @code{LANGSXP}) is constructed. This process first "
2421 :     "replaces the actual argument list by a list of promises to the values "
2422 :     "supplied. It then constructs a new environment which contains the names of "
2423 :     "the formal parameters matched to actual or default values: all the matched "
2424 :     "values are promises, the defaults as promises to be evaluated in the "
2425 :     "environment just created. That environment is then used for the evaluation "
2426 :     "of the body of the function, and promises will be forced (and hence actual "
2427 :     "or default arguments evaluated) when they are encountered."
2428 : gnustats 1339 msgstr ""
2429 : gnustats 1804
2430 : gnustats 1751 #
2431 : gnustats 1339 #. type: Plain text
2432 : gnustats 1804 #: R-ints.texi:890
2433 :     msgid ""
2434 :     "(Evaluating a promise sets @code{NAMED = 2} on its value, so if the argument "
2435 :     "was a symbol its binding is regarded as having multiple references during "
2436 :     "the evaluation of the closure call.)"
2437 : gnustats 1339 msgstr ""
2438 : gnustats 1804
2439 : gnustats 1751 #
2440 : gnustats 1339 #. type: Plain text
2441 : gnustats 1804 #: R-ints.texi:906
2442 :     msgid ""
2443 :     "If the closure is an S3 generic (that is, contains a call to "
2444 :     "@code{UseMethod}) the evaluation process is the same until the "
2445 :     "@code{UseMethod} call is encountered. At that point the argument on which "
2446 :     "to do dispatch (normally the first) will be evaluated if it has not been "
2447 :     "already. If a method has been found which is a closure, a new evaluation "
2448 :     "environment is created for it containing the matched arguments of the method "
2449 :     "plus any new variables defined so far during the evaluation of the body of "
2450 :     "the generic. (Note that this means changes to the values of the formal "
2451 :     "arguments in the body of the generic are discarded when calling the method, "
2452 :     "but @emph{actual} argument promises which have been forced retain the values "
2453 :     "found when they were forced. On the other hand, missing arguments have "
2454 :     "values which are promises to use the default supplied by the method and not "
2455 :     "by the generic.) If the method found is a primitive it is called with the "
2456 :     "matched argument list of promises (possibly already forced) used for the "
2457 :     "generic."
2458 : gnustats 1339 msgstr ""
2459 : gnustats 1804
2460 : gnustats 1751 #
2461 : gnustats 1339 #. type: cindex
2462 : gnustats 1804 #: R-ints.texi:907
2463 : gnustats 1339 #, no-wrap
2464 :     msgid "builtin function"
2465 :     msgstr ""
2466 : gnustats 1804
2467 : gnustats 1751 #
2468 : gnustats 1339 #. type: cindex
2469 : gnustats 1804 #: R-ints.texi:908
2470 : gnustats 1339 #, no-wrap
2471 :     msgid "special function"
2472 :     msgstr ""
2473 : gnustats 1804
2474 : gnustats 1751 #
2475 : gnustats 1339 #. type: cindex
2476 : gnustats 1804 #: R-ints.texi:909
2477 : gnustats 1339 #, no-wrap
2478 :     msgid "primitive function"
2479 :     msgstr ""
2480 : gnustats 1804
2481 : gnustats 1751 #
2482 : gnustats 1339 #. type: cindex
2483 : gnustats 1804 #: R-ints.texi:910
2484 : gnustats 1339 #, no-wrap
2485 :     msgid ".Internal function"
2486 :     msgstr ""
2487 : gnustats 1804
2488 : gnustats 1751 #
2489 : gnustats 1339 #. type: Plain text
2490 : gnustats 1804 #: R-ints.texi:919
2491 :     msgid ""
2492 :     "The essential difference@footnote{There is currently one other difference: "
2493 :     "when profiling builtin functions are counted as function calls but specials "
2494 :     "are not.} between special and builtin functions is that the arguments of "
2495 :     "specials are not evaluated before the C code is called, and those of "
2496 :     "builtins are. Note that being a special/builtin is separate from being "
2497 :     "primitive or @code{.Internal}: @code{quote} is a special primitive, @code{+} "
2498 :     "is a builtin primitive, @code{cbind} is a special @code{.Internal} and "
2499 :     "@code{grep} is a builtin @code{.Internal}."
2500 : gnustats 1339 msgstr ""
2501 : gnustats 1804
2502 : gnustats 1751 #
2503 : gnustats 1339 #. type: cindex
2504 : gnustats 1804 #: R-ints.texi:920
2505 : gnustats 1339 #, no-wrap
2506 :     msgid "generic, internal"
2507 :     msgstr ""
2508 : gnustats 1804
2509 : gnustats 1751 #
2510 : gnustats 1339 #. type: findex
2511 : gnustats 1804 #: R-ints.texi:921
2512 : gnustats 1339 #, no-wrap
2513 :     msgid "DispatchOrEval"
2514 :     msgstr ""
2515 : gnustats 1804
2516 : gnustats 1751 #
2517 : gnustats 1339 #. type: Plain text
2518 : gnustats 1804 #: R-ints.texi:931
2519 :     msgid ""
2520 :     "Many of the internal functions are internal generics, which for specials "
2521 :     "means that they do not evaluate their arguments on call, but the C code "
2522 :     "starts with a call to @code{DispatchOrEval}. The latter evaluates the first "
2523 :     "argument, and looks for a method based on its class. (If S4 dispatch is on, "
2524 :     "S4 methods are looked for first, even for S3 classes.) If it finds a "
2525 :     "method, it dispatches to that method with a call based on promises to "
2526 :     "evaluate the remaining arguments. If no method is found, the remaining "
2527 :     "arguments are evaluated before return to the internal generic."
2528 : gnustats 1339 msgstr ""
2529 : gnustats 1804
2530 : gnustats 1751 #
2531 : gnustats 1339 #. type: cindex
2532 : gnustats 1804 #: R-ints.texi:932
2533 : gnustats 1339 #, no-wrap
2534 :     msgid "generic, generic"
2535 :     msgstr ""
2536 : gnustats 1804
2537 : gnustats 1751 #
2538 : gnustats 1339 #. type: findex
2539 : gnustats 1804 #: R-ints.texi:933
2540 : gnustats 1339 #, no-wrap
2541 :     msgid "DispatchGeneric"
2542 :     msgstr ""
2543 : gnustats 1804
2544 : gnustats 1751 #
2545 : gnustats 1339 #. type: Plain text
2546 : gnustats 1804 #: R-ints.texi:942
2547 :     msgid ""
2548 :     "The other way that internal functions can be generic is to be group "
2549 :     "generic. Most such functions are builtins (so immediately evaluate all "
2550 :     "their arguments), and all contain a call to the C function "
2551 :     "@code{DispatchGeneric}. There are some peculiarities over the number of "
2552 :     "arguments for the @code{\"Math\"} group generic, with some members allowing "
2553 :     "only one argument, some having two (with a default for the second) and "
2554 :     "@code{trunc} allows one or more but the default method only accepts one."
2555 : gnustats 1339 msgstr ""
2556 : gnustats 1804
2557 : gnustats 1751 #
2558 : gnustats 1339 #. type: node
2559 : gnustats 1804 #: R-ints.texi:946
2560 :     #: R-ints.texi:948
2561 :     #: R-ints.texi:949
2562 :     #: R-ints.texi:993
2563 : gnustats 1339 #, no-wrap
2564 :     msgid "Missingness"
2565 :     msgstr ""
2566 : gnustats 1804
2567 : gnustats 1751 #
2568 : gnustats 1339 #. type: subsection
2569 : gnustats 1804 #: R-ints.texi:946
2570 :     #: R-ints.texi:948
2571 :     #: R-ints.texi:993
2572 :     #: R-ints.texi:994
2573 : gnustats 1339 #, no-wrap
2574 :     msgid "Dot-dot-dot arguments"
2575 :     msgstr ""
2576 : gnustats 1804
2577 : gnustats 1751 #
2578 : gnustats 1339 #. type: cindex
2579 : gnustats 1804 #: R-ints.texi:951
2580 : gnustats 1339 #, no-wrap
2581 :     msgid "missingness"
2582 :     msgstr ""
2583 : gnustats 1804
2584 : gnustats 1751 #
2585 : gnustats 1339 #. type: Plain text
2586 : gnustats 1804 #: R-ints.texi:958
2587 :     msgid ""
2588 :     "Actual arguments to (non-internal) @R{} functions can be fewer than are "
2589 :     "required to match the formal arguments of the function. Having unmatched "
2590 :     "formal arguments will not matter if the argument is never used (by lazy "
2591 :     "evaluation), but when the argument is evaluated, either its default value is "
2592 :     "evaluated (within the evaluation environment of the function) or an error is "
2593 :     "thrown with a message along the lines of"
2594 : gnustats 1339 msgstr ""
2595 : gnustats 1804
2596 : gnustats 1751 #
2597 : gnustats 1339 #. type: example
2598 : gnustats 1804 #: R-ints.texi:961
2599 : gnustats 1339 #, no-wrap
2600 :     msgid "argument \"foobar\" is missing, with no default\n"
2601 :     msgstr ""
2602 : gnustats 1804
2603 : gnustats 1751 #
2604 : gnustats 1339 #. type: findex
2605 : gnustats 1804 #: R-ints.texi:964
2606 : gnustats 1339 #, no-wrap
2607 :     msgid "R_MissingArg"
2608 :     msgstr ""
2609 : gnustats 1804
2610 : gnustats 1751 #
2611 : gnustats 1339 #. type: Plain text
2612 : gnustats 1804 #: R-ints.texi:974
2613 :     msgid ""
2614 :     "Internally missingness is handled by two mechanisms. The object "
2615 :     "@code{R_MissingArg} is used to indicate that a formal argument has no "
2616 :     "(default) value. When matching the actual arguments to the formal "
2617 :     "arguments, a new argument list is constructed from the formals all of whose "
2618 :     "values are @code{R_MissingArg} with the first @code{MISSING} bit set. Then "
2619 :     "whenever a formal argument is matched to an actual argument, the "
2620 :     "corresponding member of the new argument list has its value set to that of "
2621 :     "the matched actual argument, and if that is not @code{R_MissingArg} the "
2622 :     "missing bit is unset."
2623 : gnustats 1339 msgstr ""
2624 : gnustats 1804
2625 : gnustats 1751 #
2626 : gnustats 1339 #. type: Plain text
2627 : gnustats 1804 #: R-ints.texi:978
2628 :     msgid ""
2629 :     "This new argument list is used to form the evaluation frame for the "
2630 :     "function, and if named arguments are subsequently given a new value (before "
2631 :     "they are evaluated) the missing bit is cleared."
2632 : gnustats 1339 msgstr ""
2633 : gnustats 1804
2634 : gnustats 1751 #
2635 : gnustats 1339 #. type: Plain text
2636 : gnustats 1804 #: R-ints.texi:987
2637 :     msgid ""
2638 :     "Missingness of arguments can be interrogated via the @code{missing()} "
2639 :     "function. An argument is clearly missing if its missing bit is set or if "
2640 :     "the value is @code{R_MissingArg}. However, missingness can be passed on "
2641 :     "from function to function, for using a formal argument as an actual argument "
2642 :     "in a function call does not count as evaluation. So @code{missing()} has to "
2643 :     "examine the value (a promise) of a non-yet-evaluated formal argument to see "
2644 :     "if it might be missing, which might involve investigating a promise and so "
2645 :     "on @dots{}."
2646 : gnustats 1339 msgstr ""
2647 : gnustats 1804
2648 : gnustats 1751 #
2649 : gnustats 1339 #. type: Plain text
2650 : gnustats 1804 #: R-ints.texi:992
2651 :     msgid ""
2652 :     "Special primitives also need to handle missing arguments, and in some case "
2653 :     "(e.g.@: @code{log}) that is why they are special and not builtin. This is "
2654 :     "usually done by testing if an argument's value is @code{R_MissingArg}."
2655 : gnustats 1339 msgstr ""
2656 : gnustats 1804
2657 : gnustats 1751 #
2658 : gnustats 1339 #. type: Plain text
2659 : gnustats 1804 #: R-ints.texi:999
2660 :     msgid ""
2661 :     "Dot-dot-dot arguments are convenient when writing functions, but complicate "
2662 :     "the internal code for argument evaluation."
2663 : gnustats 1339 msgstr ""
2664 : gnustats 1804
2665 : gnustats 1751 #
2666 : gnustats 1339 #. type: Plain text
2667 : gnustats 1804 #: R-ints.texi:1006
2668 :     msgid ""
2669 :     "The formals of a function with a @code{...} argument represent that as a "
2670 :     "single argument like any other argument, with tag the symbol "
2671 :     "@code{R_DotsSymbol}. When the actual arguments are matched to the formals, "
2672 :     "the value of the @code{...} argument is of @code{SEXPTYPE} @code{DOTSXP}, a "
2673 :     "pairlist of promises (as used for matched arguments) but distinguished by "
2674 :     "the @code{SEXPTYPE}."
2675 : gnustats 1339 msgstr ""
2676 : gnustats 1804
2677 : gnustats 1751 #
2678 : gnustats 1339 #. type: Plain text
2679 : gnustats 1804 #: R-ints.texi:1014
2680 :     msgid ""
2681 :     "Recall that the evaluation frame for a function initially contains the "
2682 :     "@code{@var{name}=@var{value}} pairs from the matched call, and hence this "
2683 :     "will be true for @code{...} as well. The value of @code{...} is a (special) "
2684 :     "pairlist whose elements are referred to by the special symbols @code{..1}, "
2685 :     "@code{..2}, @dots{} which have the @code{DDVAL} bit set: when one of these "
2686 :     "is encountered it is looked up (via @code{ddfindVar}) in the value of the "
2687 :     "@code{...} symbol in the evaluation frame."
2688 : gnustats 1339 msgstr ""
2689 : gnustats 1804
2690 : gnustats 1751 #
2691 : gnustats 1339 #. type: Plain text
2692 : gnustats 1804 #: R-ints.texi:1016
2693 : gnustats 1339 msgid "Values of arguments matched to a @code{...} argument can be missing."
2694 :     msgstr ""
2695 : gnustats 1804
2696 : gnustats 1751 #
2697 : gnustats 1339 #. type: Plain text
2698 : gnustats 1804 #: R-ints.texi:1020
2699 :     msgid ""
2700 :     "Special primitives may need to handle @code{...} arguments: see for example "
2701 :     "the internal code of @code{switch} in file @file{src/main/builtin.c}."
2702 : gnustats 1339 msgstr ""
2703 : gnustats 1804
2704 : gnustats 1751 #
2705 : gnustats 1339 #. type: cindex
2706 : gnustats 1804 #: R-ints.texi:1024
2707 : gnustats 1339 #, no-wrap
2708 :     msgid "autoprinting"
2709 :     msgstr ""
2710 : gnustats 1804
2711 : gnustats 1751 #
2712 : gnustats 1339 #. type: findex
2713 : gnustats 1804 #: R-ints.texi:1025
2714 : gnustats 1339 #, no-wrap
2715 :     msgid "R_Visible"
2716 :     msgstr ""
2717 : gnustats 1804
2718 : gnustats 1751 #
2719 : gnustats 1339 #. type: Plain text
2720 : gnustats 1804 #: R-ints.texi:1033
2721 :     msgid ""
2722 :     "Whether the returned value of a top-level @R{} expression is printed is "
2723 :     "controlled by the global boolean variable @code{R_Visible}. This is set (to "
2724 :     "true or false) on entry to all primitive and internal functions based on the "
2725 :     "@code{eval} column of the table in file @file{src/main/names.c}: the "
2726 :     "appropriate setting can be extracted by the macro @code{PRIMPRINT}."
2727 : gnustats 1339 msgstr ""
2728 : gnustats 1804
2729 : gnustats 1751 #
2730 : gnustats 1339 #. type: findex
2731 : gnustats 1804 #: R-ints.texi:1033
2732 : gnustats 1339 #, no-wrap
2733 :     msgid "PRIMPRINT"
2734 :     msgstr ""
2735 : gnustats 1804
2736 : gnustats 1751 #
2737 : gnustats 1339 #. type: findex
2738 : gnustats 1804 #: R-ints.texi:1035
2739 : gnustats 1339 #, no-wrap
2740 :     msgid "invisible"
2741 :     msgstr ""
2742 : gnustats 1804
2743 : gnustats 1751 #
2744 : gnustats 1339 #. type: Plain text
2745 : gnustats 1804 #: R-ints.texi:1039
2746 :     msgid ""
2747 :     "The @R{} primitive function @code{invisible} makes use of this mechanism: it "
2748 :     "just sets @code{R_Visible = FALSE} before entry and returns its argument."
2749 : gnustats 1339 msgstr ""
2750 : gnustats 1804
2751 : gnustats 1751 #
2752 : gnustats 1339 #. type: Plain text
2753 : gnustats 1804 #: R-ints.texi:1051
2754 :     msgid ""
2755 :     "For most functions the intention will be that the setting of "
2756 :     "@code{R_Visible} when they are entered is the setting used when they return, "
2757 :     "but there need to be exceptions. The @R{} functions @code{identify}, "
2758 :     "@code{options}, @code{system} and @code{writeBin} determine whether the "
2759 :     "result should be visible from the arguments or user action. Other functions "
2760 :     "themselves dispatch functions which may change the visibility flag: "
2761 :     "examples@footnote{the other current example is left brace, which is "
2762 :     "implemented as a primitive.} are @code{.Internal}, @code{do.call}, "
2763 :     "@code{eval}, @code{withVisible}, @code{if}, @code{NextMethod}, "
2764 :     "@code{Recall}, @code{recordGraphics}, @code{standardGeneric}, @code{switch} "
2765 :     "and @code{UseMethod}."
2766 : gnustats 1339 msgstr ""
2767 : gnustats 1804
2768 : gnustats 1751 #
2769 : gnustats 1339 #. type: Plain text
2770 : gnustats 1804 #: R-ints.texi:1056
2771 :     msgid ""
2772 :     "`Special' primitive and internal functions evaluate their arguments "
2773 :     "internally @emph{after} @code{R_Visible} has been set, and evaluation of the "
2774 :     "arguments (e.g.@: an assignment as in PR#9263)) can change the value of the "
2775 :     "flag."
2776 : gnustats 1339 msgstr ""
2777 : gnustats 1804
2778 : gnustats 1751 #
2779 : gnustats 1339 #. type: Plain text
2780 : gnustats 1804 #: R-ints.texi:1066
2781 :     msgid ""
2782 :     "The @code{R_Visible} flag can also get altered during the evaluation of a "
2783 :     "function, with comments in the code about @code{warning}, @code{writeChar} "
2784 :     "and graphics functions calling @code{GText} (PR#7397). (Since the C-level "
2785 :     "function @code{eval} sets @code{R_Visible}, this could apply to any function "
2786 :     "calling it. Since it is called when evaluating promises, even object lookup "
2787 :     "can change @code{R_Visible}.) Internal and primitive functions force the "
2788 :     "documented setting of @code{R_Visible} on return, unless the C code is "
2789 :     "allowed to change it (the exceptions above are indicated by @code{PRIMPRINT} "
2790 :     "having value 2)."
2791 : gnustats 1339 msgstr ""
2792 : gnustats 1804
2793 : gnustats 1751 #
2794 : gnustats 1339 #. type: Plain text
2795 : gnustats 1804 #: R-ints.texi:1074
2796 :     msgid ""
2797 :     "The actual autoprinting is done by @code{PrintValueEnv} in file @file{print."
2798 :     "c}. If the object to be printed has the S4 bit set and S4 methods dispatch "
2799 :     "is on, @code{show} is called to print the object. Otherwise, if the object "
2800 :     "bit is set (so the object has a @code{\"class\"} attribute), @code{print} is "
2801 :     "called to dispatch methods: for objects without a class the internal code of "
2802 :     "@code{print.default} is called."
2803 : gnustats 1339 msgstr ""
2804 : gnustats 1804
2805 : gnustats 1751 #
2806 : gnustats 1339 #. type: section
2807 : gnustats 1804 #: R-ints.texi:1077
2808 : gnustats 1339 #, no-wrap
2809 :     msgid "The write barrier and the garbage collector"
2810 :     msgstr ""
2811 : gnustats 1804
2812 : gnustats 1751 #
2813 : gnustats 1339 #. type: cindex
2814 : gnustats 1804 #: R-ints.texi:1079
2815 : gnustats 1339 #, no-wrap
2816 :     msgid "write barrier"
2817 :     msgstr ""
2818 : gnustats 1804
2819 : gnustats 1751 #
2820 : gnustats 1339 #. type: cindex
2821 : gnustats 1804 #: R-ints.texi:1080
2822 : gnustats 1339 #, no-wrap
2823 :     msgid "garbage collector"
2824 :     msgstr ""
2825 : gnustats 1804
2826 : gnustats 1751 #
2827 : gnustats 1339 #. type: Plain text
2828 : gnustats 1804 #: R-ints.texi:1085
2829 :     msgid ""
2830 :     "@R{} has long had a generational garbage collector, and bit @code{gcgen} in "
2831 :     "the @code{sxpinfo} header is used in the implementation of this. This is "
2832 :     "used in conjunction with the @code{mark} bit to identify two previous "
2833 :     "generations."
2834 : gnustats 1339 msgstr ""
2835 : gnustats 1804
2836 : gnustats 1751 #
2837 : gnustats 1339 #. type: Plain text
2838 : gnustats 1804 #: R-ints.texi:1094
2839 :     msgid ""
2840 :     "There are three levels of collections. Level 0 collects only the youngest "
2841 :     "generation, level 1 collects the two youngest generations and level 2 "
2842 :     "collects all generations. After 20 level-0 collections the next collection "
2843 :     "is at level 1, and after 5 level-1 collections at level 2. Further, if a "
2844 :     "level-@var{n} collection fails to provide 20% free space (for each of nodes "
2845 :     "and the vector heap), the next collection will be at level @var{n+1}. (The "
2846 :     "@R{}-level function @code{gc()} performs a level-2 collection.)"
2847 : gnustats 1339 msgstr ""
2848 : gnustats 1804
2849 : gnustats 1751 #
2850 : gnustats 1339 #. type: Plain text
2851 : gnustats 1804 #: R-ints.texi:1104
2852 :     msgid ""
2853 :     "A generational collector needs to efficiently `age' the objects, especially "
2854 :     "list-like objects (including @code{STRSXP}s). This is done by ensuring that "
2855 :     "the elements of a list are regarded as at least as old as the list "
2856 :     "@emph{when they are assigned}. This is handled by the functions "
2857 :     "@code{SET_VECTOR_ELT} and @code{SET_STRING_ELT}, which is why they are "
2858 :     "functions and not macros. Ensuring the integrity of such operations is "
2859 :     "termed the @dfn{write barrier} and is done by making the @code{SEXP} opaque "
2860 :     "and only providing access via functions (which cannot be used as lvalues in "
2861 :     "assignments in C)."
2862 : gnustats 1339 msgstr ""
2863 : gnustats 1804
2864 : gnustats 1751 #
2865 : gnustats 1339 #. type: Plain text
2866 : gnustats 1804 #: R-ints.texi:1116
2867 :     msgid ""
2868 :     "All code in @R{} extensions is by default behind the write barrier. The "
2869 :     "only way to obtain direct access to the internals of the @code{SEXPREC}s is "
2870 :     "to define @samp{USE_RINTERNALS} before including header file "
2871 :     "@file{Rinternals.h}, which is normally defined in @file{Defn.h}. To enable "
2872 :     "a check on the way that the access is used, @R{} can be compiled with flag "
2873 :     "@option{--enable-strict-barrier} which ensures that header @file{Defn.h} "
2874 :     "does not define @samp{USE_RINTERNALS} and hence that @code{SEXP} is opaque "
2875 :     "in most of @R{} itself. (There are some necessary exceptions: foremost in "
2876 :     "file @file{memory.c} where the accessor functions are defined and also in "
2877 :     "file @file{size.c} which needs access to the sizes of the internal "
2878 :     "structures.)"
2879 : gnustats 1339 msgstr ""
2880 : gnustats 1804
2881 : gnustats 1339 #. type: Plain text
2882 : gnustats 1804 #: R-ints.texi:1120
2883 :     msgid ""
2884 : gnustats 2640 "For background papers see @uref{http://homepage.stat.uiowa.edu/~luke/R/"
2885 :     "barrier.html} and @uref{http://homepage.stat.uiowa.edu/~luke/R/gengcnotes."
2886 :     "html}."
2887 : gnustats 1339 msgstr ""
2888 : gnustats 1804
2889 : gnustats 1751 #
2890 : gnustats 1339 #. type: cindex
2891 : gnustats 1804 #: R-ints.texi:1124
2892 : gnustats 1339 #, no-wrap
2893 :     msgid "serialization"
2894 :     msgstr ""
2895 : gnustats 1804
2896 : gnustats 1751 #
2897 : gnustats 1339 #. type: Plain text
2898 : gnustats 1804 #: R-ints.texi:1134
2899 :     msgid ""
2900 :     "Serialized versions of @R{} objects are used by @code{load}/@code{save} and "
2901 :     "also at a slightly lower level by @code{saveRDS}/@code{readRDS} (and their "
2902 :     "earlier `internal' dot-name versions) and @code{serialize}/"
2903 :     "@code{unserialize}. These differ in what they serialize to (a file, a "
2904 :     "connection, a raw vector) and whether they are intended to serialize a "
2905 :     "single object or a collection of objects (typically the workspace). "
2906 :     "@code{save} writes a header at the beginning of the file (a single LF-"
2907 :     "terminated line) which the lower-level versions do not."
2908 : gnustats 1339 msgstr ""
2909 : gnustats 1804
2910 : gnustats 1751 #
2911 : gnustats 1339 #. type: Plain text
2912 : gnustats 1804 #: R-ints.texi:1143
2913 :     msgid ""
2914 :     "@code{save} and @code{saveRDS} allow various forms of compression, and "
2915 :     "@command{gzip} compression is the default (except for @acronym{ASCII} "
2916 :     "saves). Compression is applied to the whole file stream, including the "
2917 :     "headers, so serialized files can be uncompressed or re-compressed by "
2918 :     "external programs. Both @code{load} and @code{readRDS} can read "
2919 :     "@command{gzip}, @command{bzip2} and @command{xz} forms of compression when "
2920 :     "reading from a file, and @command{gzip} compression when reading from a "
2921 :     "connection."
2922 : gnustats 1339 msgstr ""
2923 : gnustats 1804
2924 : gnustats 1751 #
2925 : gnustats 1339 #. type: Plain text
2926 : gnustats 1804 #: R-ints.texi:1150
2927 :     msgid ""
2928 :     "@R{} has used the same serialization format since @R{} 1.4.0 in December "
2929 :     "2001. Earlier formats are still supported via @code{load} and @code{save} "
2930 :     "but such formats are not described here. The current serialization format is "
2931 :     "called `version 2', and has been expanded in back-compatible ways since its "
2932 :     "inception, for example to support additional @code{SEXPTYPE}s."
2933 : gnustats 1339 msgstr ""
2934 : gnustats 1804
2935 : gnustats 1751 #
2936 : gnustats 1339 #. type: Plain text
2937 : gnustats 1804 #: R-ints.texi:1164
2938 :     msgid ""
2939 :     "@code{save} works by writing a single-line header (typically @code{RDX2\\n} "
2940 :     "for a binary save: the only other current value is @code{RDA2\\n} for "
2941 :     "@code{save(files=TRUE)}), then creating a tagged pairlist of the objects to "
2942 :     "be saved and serializing that single object. @code{load} reads the header "
2943 :     "line, unserializes a single object (a pairlist or a vector list) and assigns "
2944 :     "the elements of the object in the specified environment. The header line "
2945 :     "serves two purposes in @R{}: it identifies the serialization format so "
2946 :     "@code{load} can switch to the appropriate reader code, and the linefeed "
2947 :     "allows the detection of files which have been subjected to a non-binary "
2948 :     "transfer which re-mapped line endings. It can also be thought of as a "
2949 :     "`magic number' in the sense used by the @command{file} program (although "
2950 :     "@R{} save files are not yet by default known to that program)."
2951 : gnustats 1339 msgstr ""
2952 : gnustats 1804
2953 : gnustats 1751 #
2954 : gnustats 1339 #. type: Plain text
2955 : gnustats 1804 #: R-ints.texi:1175
2956 :     msgid ""
2957 :     "Serialization in @R{} needs to take into account that objects may contain "
2958 :     "references to environments, which then have enclosing environments and so "
2959 :     "on. (Environments recognized as package or name space environments are "
2960 :     "saved by name.) There are `reference objects' which are not duplicated on "
2961 :     "copy and should remain shared on unserialization. These are weak "
2962 :     "references, external pointers and environments other than those associated "
2963 :     "with packages, namespaces and the global environment. These are handled via "
2964 :     "a hash table, and references after the first are written out as a reference "
2965 :     "marker indexed by the table entry."
2966 : gnustats 1339 msgstr ""
2967 : gnustats 1804
2968 : gnustats 1751 #
2969 : gnustats 1339 #. type: Plain text
2970 : gnustats 1804 #: R-ints.texi:1185
2971 :     msgid ""
2972 :     "Version-2 serialization first writes a header indicating the format "
2973 :     "(normally @samp{X\\n} for an XDR format binary save, but @samp{A\\n}, ASCII, "
2974 :     "and @samp{B\\n}, native word-order binary, can also occur) and then three "
2975 :     "integers giving the version of the format and two @R{} versions (packed by "
2976 :     "the @code{R_Version} macro from @file{Rversion.h}). (Unserialization "
2977 :     "interprets the two versions as the version of @R{} which wrote the file "
2978 :     "followed by the minimal version of @R{} needed to read the format.) "
2979 :     "Serialization then writes out the object recursively using function "
2980 :     "@code{WriteItem} in file @file{src/main/serialize.c}."
2981 : gnustats 1339 msgstr ""
2982 : gnustats 1804
2983 : gnustats 1751 #
2984 : gnustats 1339 #. type: Plain text
2985 : gnustats 1804 #: R-ints.texi:1190
2986 :     msgid ""
2987 :     "Some objects are written as if they were @code{SEXPTYPE}s: such pseudo-"
2988 :     "@code{SEXPTYPE}s cover @code{R_NilValue}, @code{R_EmptyEnv}, "
2989 :     "@code{R_BaseEnv}, @code{R_GlobalEnv}, @code{R_UnboundValue}, "
2990 :     "@code{R_MissingArg} and @code{R_BaseNamespace}."
2991 : gnustats 1339 msgstr ""
2992 : gnustats 1804
2993 : gnustats 1751 #
2994 : gnustats 1339 #. type: Plain text
2995 : gnustats 1804 #: R-ints.texi:1209
2996 :     msgid ""
2997 :     "For all @code{SEXPTYPE}s except @code{NILSXP}, @code{SYMSXP} and "
2998 :     "@code{ENVSXP} serialization starts with an integer with the @code{SEXPTYPE} "
2999 :     "in bits 0:7@footnote{only bits 0:4 are currently used for @code{SEXPTYPE}s "
3000 :     "but values 241:255 are used for pseudo-@code{SEXPTYPE}s.} followed by the "
3001 :     "object bit, two bits indicating if there are any attributes and if there is "
3002 :     "a tag (for the pairlist types), an unused bit and then the @code{gp} "
3003 :     "field@footnote{Currently the only relevant bits are 0:1, 4, 14:15.} in bits "
3004 :     "12:27. Pairlist-like objects write their attributes (if any), tag (if any), "
3005 :     "CAR and then CDR (using tail recursion): other objects write their "
3006 :     "attributes after themselves. Atomic vector objects write their length "
3007 :     "followed by the data: generic vector-list objects write their length "
3008 :     "followed by a call to @code{WriteItem} for each element. The code for "
3009 :     "@code{CHARSXP}s special-cases @code{NA_STRING} and writes it as length "
3010 :     "@code{-1} with no data. Lengths no more than @code{2^31 - 1} are written in "
3011 :     "that way and larger lengths (which only occur on 64-bit systems) as "
3012 :     "@code{-1} followed by the upper and lower 32-bits as integers (regarded as "
3013 :     "unsigned)."
3014 : gnustats 1339 msgstr ""
3015 : gnustats 1804
3016 : gnustats 1751 #
3017 : gnustats 1339 #. type: Plain text
3018 : gnustats 1804 #: R-ints.texi:1216
3019 :     msgid ""
3020 :     "Environments are treated in several ways: as we have seen, some are written "
3021 :     "as specific pseudo-@code{SEXPTYPE}s. Package and namespace environments are "
3022 :     "written with pseudo-@code{SEXPTYPE}s followed by the name. `Normal' "
3023 :     "environments are written out as @code{ENVSXP}s with an integer indicating if "
3024 :     "the environment is locked followed by the enclosure, frame, `tag' (the hash "
3025 :     "table) and attributes."
3026 : gnustats 1339 msgstr ""
3027 : gnustats 1804
3028 : gnustats 1751 #
3029 : gnustats 1339 #. type: Plain text
3030 : gnustats 1804 #: R-ints.texi:1221
3031 :     msgid ""
3032 :     "In the `XDR' format integers and doubles are written in bigendian order: "
3033 :     "however the format is not fully XDR (as defined in RFC 1832) as byte "
3034 :     "quantities (such as the contents of @code{CHARSXP} and @code{RAWSXP} types) "
3035 :     "are written as-is and not padded to a multiple of four bytes."
3036 : gnustats 1339 msgstr ""
3037 : gnustats 1804
3038 : gnustats 1751 #
3039 : gnustats 1339 #. type: Plain text
3040 : gnustats 1804 #: R-ints.texi:1228
3041 :     msgid ""
3042 :     "The `ASCII' format writes 7-bit characters. Integers are formatted with "
3043 :     "@code{%d} (except that @code{NA_integer_} is written as @code{NA}), doubles "
3044 :     "formatted with @code{%.16g} (plus @code{NA}, @code{Inf} and @code{-Inf}) and "
3045 :     "bytes with @code{%02x}. Strings are written using standard escapes (e.g.@: "
3046 :     "@code{\\t} and @code{\\013}) for non-printing and non-@acronym{ASCII} bytes."
3047 : gnustats 1339 msgstr ""
3048 : gnustats 1804
3049 : gnustats 1751 #
3050 : gnustats 1339 #. type: Plain text
3051 : gnustats 1804 #: R-ints.texi:1233
3052 : gnustats 1339 msgid "Character data in @R{} are stored in the sexptype @code{CHARSXP}."
3053 :     msgstr ""
3054 : gnustats 1804
3055 : gnustats 1751 #
3056 : gnustats 1339 #. type: Plain text
3057 : gnustats 1804 #: R-ints.texi:1245
3058 :     msgid ""
3059 :     "There is support for encodings other than that of the current locale, in "
3060 :     "particular UTF-8 and the multi-byte encodings used on Windows for CJK "
3061 :     "languages. A limited means to indicate the encoding of a @code{CHARSXP} is "
3062 :     "@emph{via} two of the `general purpose' bits which are used to declare the "
3063 :     "encoding to be either Latin-1 or UTF-8. (Note that it is possible for a "
3064 :     "character vector to contain elements in different encodings.) Both printing "
3065 :     "and plotting notice the declaration and convert the string to the current "
3066 :     "locale (possibly using @code{<xx>} to display in hexadecimal bytes that are "
3067 :     "not valid in the current locale). Many (but not all) of the character "
3068 :     "manipulation functions will either preserve the declaration or re-encode the "
3069 :     "character string."
3070 : gnustats 1339 msgstr ""
3071 : gnustats 1804
3072 : gnustats 1751 #
3073 : gnustats 1339 #. type: Plain text
3074 : gnustats 1804 #: R-ints.texi:1248
3075 :     msgid ""
3076 :     "Strings that refer to the OS such as file names need to be passed through a "
3077 :     "wide-character interface on some OSes (e.g. Windows)."
3078 : gnustats 1339 msgstr ""
3079 : gnustats 1804
3080 : gnustats 1751 #
3081 : gnustats 1339 #. type: Plain text
3082 : gnustats 1804 #: R-ints.texi:1255
3083 :     msgid ""
3084 :     "When are character strings declared to be of known encoding? One way is to "
3085 :     "do so directly via @code{Encoding}. The parser declares the encoding if "
3086 :     "this is known, either via the @code{encoding} argument to @code{parse} or "
3087 :     "from the locale within which parsing is being done at the @R{} command "
3088 :     "line. (Other ways are recorded on the help page for @code{Encoding}.)"
3089 : gnustats 1339 msgstr ""
3090 : gnustats 1804
3091 : gnustats 1751 #
3092 : gnustats 1339 #. type: Plain text
3093 : gnustats 1804 #: R-ints.texi:1260
3094 :     msgid ""
3095 :     "It is not necessary to declare the encoding of @acronym{ASCII} strings as "
3096 :     "they will work in any locale. @acronym{ASCII} strings should never have a "
3097 :     "marked encoding, as any encoding will be ignored when entering such strings "
3098 :     "into the @code{CHARSXP} cache."
3099 : gnustats 1339 msgstr ""
3100 : gnustats 1804
3101 : gnustats 1751 #
3102 : gnustats 1339 #. type: Plain text
3103 : gnustats 1804 #: R-ints.texi:1273
3104 :     msgid ""
3105 :     "The rationale behind considering only UTF-8 and Latin-1 was that most "
3106 :     "systems are capable of producing UTF-8 strings and this is the nearest we "
3107 :     "have to a universal format. For those that do not (for example those "
3108 :     "lacking a powerful enough @code{iconv}), it is likely that they work in "
3109 :     "Latin-1, the old @R{} assumption. The the parser can return a UTF-8-encoded "
3110 :     "string if it encounters a @samp{\\uxxx} escape for a Unicode point that "
3111 :     "cannot be represented in the current charset. (This needs MBCS support, and "
3112 :     "was only enabled@footnote{See define @code{USE_UTF8_IF_POSSIBLE} in file "
3113 :     "@file{src/main/gram.c}.} on Windows.) This is enabled for all platforms, "
3114 :     "and a @samp{\\uxxx} or @samp{\\Uxxxxxxxx} escape ensures that the parsed "
3115 :     "string will be marked as UTF-8."
3116 : gnustats 1339 msgstr ""
3117 : gnustats 1804
3118 : gnustats 1751 #
3119 : gnustats 1339 #. type: Plain text
3120 : gnustats 1804 #: R-ints.texi:1278
3121 :     msgid ""
3122 :     "Most of the character manipulation functions now preserve UTF-8 encodings: "
3123 :     "there are some notes as to which at the top of file @file{src/main/character."
3124 :     "c} and in file @file{src/library/base/man/Encoding.Rd}."
3125 : gnustats 1339 msgstr ""
3126 : gnustats 1804
3127 : gnustats 1751 #
3128 : gnustats 1339 #. type: Plain text
3129 : gnustats 1804 #: R-ints.texi:1289
3130 :     msgid ""
3131 :     "Graphics devices are offered the possibility of handing UTF-8-encoded "
3132 :     "strings without re-encoding to the native character set, by setting "
3133 :     "@code{hasTextUTF8} to be @samp{TRUE} and supplying functions @code{textUTF8} "
3134 :     "and @code{strWidthUTF8} that expect UTF-8-encoded inputs. Normally the "
3135 :     "symbol font is encoded in Adobe Symbol encoding, but that can be re-encoded "
3136 :     "to UTF-8 by setting @code{wantSymbolUTF8} to @samp{TRUE}. The Windows' port "
3137 :     "of cairographics has a rather peculiar assumption: it wants the symbol font "
3138 :     "to be encoded in UTF-8 as if it were encoded in Latin-1 rather than Adobe "
3139 :     "Symbol: this is selected by @code{wantSymbolUTF8 = NA_LOGICAL}."
3140 : gnustats 1339 msgstr ""
3141 : gnustats 1804
3142 : gnustats 1751 #
3143 : gnustats 1339 #. type: Plain text
3144 : gnustats 1804 #: R-ints.texi:1301
3145 :     msgid ""
3146 :     "Windows has no UTF-8 locales, but rather expects to work with "
3147 :     "UCS-2@footnote{or UTF-16 if support for surrogates is enabled in the OS, "
3148 :     "which it is not normally so at least for Western versions of Windows, "
3149 :     "despite some claims to the contrary on the Microsoft website.} strings. "
3150 :     "@R{} (being written in standard C) would not work internally with UCS-2 "
3151 :     "without extensive changes. The @file{Rgui} console@footnote{but not the "
3152 :     "GraphApp toolkit.} uses UCS-2 internally, but communicates with the @R{} "
3153 :     "engine in the native encoding. To allow UTF-8 strings to be printed in "
3154 :     "UTF-8 in @file{Rgui.exe}, an escape convention is used (see header file "
3155 :     "@file{rgui_UTF8.h}) which is used by @code{cat}, @code{print} and "
3156 :     "autoprinting."
3157 : gnustats 1339 msgstr ""
3158 : gnustats 1804
3159 : gnustats 1751 #
3160 : gnustats 1339 #. type: Plain text
3161 : gnustats 1804 #: R-ints.texi:1306
3162 :     msgid ""
3163 :     "`Unicode' (UCS-2LE) files are common in the Windows world, and "
3164 :     "@code{readLines} and @code{scan} will read them into UTF-8 strings on "
3165 :     "Windows if the encoding is declared explicitly on an unopened connection "
3166 :     "passed to those functions."
3167 : gnustats 1339 msgstr ""
3168 : gnustats 1804
3169 : gnustats 1751 #
3170 : gnustats 1339 #. type: findex
3171 : gnustats 1804 #: R-ints.texi:1310
3172 : gnustats 1339 #, no-wrap
3173 :     msgid "mkChar"
3174 :     msgstr ""
3175 : gnustats 1804
3176 : gnustats 1751 #
3177 : gnustats 1339 #. type: Plain text
3178 : gnustats 1804 #: R-ints.texi:1318
3179 :     msgid ""
3180 :     "There is a global cache for @code{CHARSXP}s created by @code{mkChar} --- the "
3181 :     "cache ensures that most @code{CHARSXP}s with the same contents share storage "
3182 :     "(`contents' including any declared encoding). Not all @code{CHARSXP}s are "
3183 :     "part of the cache -- notably @samp{NA_STRING} is not. @code{CHARSXP}s "
3184 :     "reloaded from the @code{save} formats of @R{} prior to 0.99.0 are not cached "
3185 :     "(since the code used is frozen and very few examples still exist)."
3186 : gnustats 1339 msgstr ""
3187 : gnustats 1804
3188 : gnustats 1751 #
3189 : gnustats 1339 #. type: findex
3190 : gnustats 1804 #: R-ints.texi:1319
3191 : gnustats 1339 #, no-wrap
3192 :     msgid "mkCharLenCE"
3193 :     msgstr ""
3194 : gnustats 1804
3195 : gnustats 1751 #
3196 : gnustats 1339 #. type: Plain text
3197 : gnustats 1804 #: R-ints.texi:1324
3198 :     msgid ""
3199 :     "The cache records the encoding of the string as well as the bytes: all "
3200 :     "requests to create a @code{CHARSXP} should be @emph{via} a call to "
3201 :     "@code{mkCharLenCE}. Any encoding given in @code{mkCharLenCE} call will be "
3202 :     "ignored if the string's bytes are all @acronym{ASCII} characters."
3203 : gnustats 1339 msgstr ""
3204 : gnustats 1804
3205 : gnustats 1751 #
3206 : gnustats 1339 #. type: findex
3207 : gnustats 1804 #: R-ints.texi:1329
3208 : gnustats 1339 #, no-wrap
3209 :     msgid "warning"
3210 :     msgstr ""
3211 : gnustats 1804
3212 : gnustats 1751 #
3213 : gnustats 1339 #. type: findex
3214 : gnustats 1804 #: R-ints.texi:1330
3215 : gnustats 1339 #, no-wrap
3216 :     msgid "warningcall"
3217 :     msgstr ""
3218 : gnustats 1804
3219 : gnustats 1751 #
3220 : gnustats 1339 #. type: findex
3221 : gnustats 1804 #: R-ints.texi:1331
3222 : gnustats 1339 #, no-wrap
3223 :     msgid "error"
3224 :     msgstr ""
3225 : gnustats 1804
3226 : gnustats 1751 #
3227 : gnustats 1339 #. type: findex
3228 : gnustats 1804 #: R-ints.texi:1332
3229 : gnustats 1339 #, no-wrap
3230 :     msgid "errorcall"
3231 :     msgstr ""
3232 : gnustats 1804
3233 : gnustats 1751 #
3234 : gnustats 1339 #. type: Plain text
3235 : gnustats 1804 #: R-ints.texi:1342
3236 :     msgid ""
3237 :     "Each of @code{warning} and @code{stop} have two C-level equivalents, "
3238 :     "@code{warning}, @code{warningcall}, @code{error} and @code{errorcall}. The "
3239 :     "relationship between the pairs is similar: @code{warning} tries to fathom "
3240 :     "out a suitable call, and then calls @code{warningcall} with that call as the "
3241 :     "first argument if it succeeds, and with @code{call = R_NilValue} if it does "
3242 :     "not. When @code{warningcall} is called, it includes the deparsed call in "
3243 :     "its printout unless @code{call = R_NilValue}."
3244 : gnustats 1339 msgstr ""
3245 : gnustats 1804
3246 : gnustats 1751 #
3247 : gnustats 1339 #. type: Plain text
3248 : gnustats 1804 #: R-ints.texi:1354
3249 :     msgid ""
3250 :     "@code{warning} and @code{error} look at the context stack. If the topmost "
3251 :     "context is not of type @code{CTXT_BUILTIN}, it is used to provide the call, "
3252 :     "otherwise the next context provides the call. This means that when these "
3253 :     "functions are called from a primitive or @code{.Internal}, the imputed call "
3254 :     "will not be to primitive/@code{.Internal} but to the function calling the "
3255 :     "primitive/@code{.Internal} . This is exactly what one wants for a @code{."
3256 :     "Internal}, as this will give the call to the closure wrapper. (Further, for "
3257 :     "a @code{.Internal}, the call is the argument to @code{.Internal}, and so may "
3258 :     "not correspond to any @R{} function.) However, it is unlikely to be what is "
3259 :     "needed for a primitive."
3260 : gnustats 1339 msgstr ""
3261 : gnustats 1804
3262 : gnustats 1751 #
3263 : gnustats 1339 #. type: Plain text
3264 : gnustats 1804 #: R-ints.texi:1363
3265 :     msgid ""
3266 :     "The upshot is that that @code{warningcall} and @code{errorcall} should "
3267 :     "normally be used for code called from a primitive, and @code{warning} and "
3268 :     "@code{error} should be used for code called from a @code{.Internal} (and "
3269 :     "necessarily from @code{.Call}, @code{.C} and so on, where the call is not "
3270 :     "passed down). However, there are two complications. One is that code might "
3271 :     "be called from either a primitive or a @code{.Internal}, in which case "
3272 :     "probably @code{warningcall} is more appropriate. The other involves "
3273 :     "replacement functions, where the call was once of the form"
3274 : gnustats 1339 msgstr ""
3275 : gnustats 1804
3276 : gnustats 1751 #
3277 : gnustats 1339 #. type: example
3278 : gnustats 1804 #: R-ints.texi:1366
3279 : gnustats 1339 #, no-wrap
3280 :     msgid ""
3281 :     "> length(x) <- y ~ x\n"
3282 :     "Error in \"length<-\"(`*tmp*`, value = y ~ x) : invalid value\n"
3283 :     msgstr ""
3284 : gnustats 1804
3285 : gnustats 1751 #
3286 : gnustats 1339 #. type: Plain text
3287 : gnustats 1804 #: R-ints.texi:1373
3288 :     msgid ""
3289 :     "which is unpalatable to the end user. For replacement functions there will "
3290 :     "be a suitable context at the top of the stack, so @code{warning} should be "
3291 :     "used. (The results for @code{.Internal} replacement functions such as "
3292 :     "@code{substr<-} are not ideal.)"
3293 : gnustats 1339 msgstr ""
3294 : gnustats 1804
3295 : gnustats 1751 #
3296 : gnustats 1339 #. type: Plain text
3297 : gnustats 1804 #: R-ints.texi:1382
3298 :     msgid ""
3299 :     "[This section is currently a preliminary draft and should not be taken as "
3300 :     "definitive. The description assumes that @env{R_NO_METHODS_TABLES} has not "
3301 :     "been set.]"
3302 : gnustats 1339 msgstr ""
3303 : gnustats 1804
3304 : gnustats 1751 #
3305 : gnustats 1339 #. type: node
3306 : gnustats 1804 #: R-ints.texi:1388
3307 :     #: R-ints.texi:1390
3308 :     #: R-ints.texi:1391
3309 :     #: R-ints.texi:1411
3310 : gnustats 1339 #, no-wrap
3311 :     msgid "Representation of S4 objects"
3312 :     msgstr ""
3313 : gnustats 1804
3314 : gnustats 1751 #
3315 : gnustats 1339 #. type: node
3316 : gnustats 1804 #: R-ints.texi:1388
3317 :     #: R-ints.texi:1390
3318 :     #: R-ints.texi:1411
3319 :     #: R-ints.texi:1412
3320 :     #: R-ints.texi:1428
3321 : gnustats 1339 #, no-wrap
3322 :     msgid "S4 classes"
3323 :     msgstr ""
3324 : gnustats 1804
3325 : gnustats 1751 #
3326 : gnustats 1339 #. type: node
3327 : gnustats 1804 #: R-ints.texi:1388
3328 :     #: R-ints.texi:1411
3329 :     #: R-ints.texi:1428
3330 :     #: R-ints.texi:1429
3331 :     #: R-ints.texi:1479
3332 : gnustats 1339 #, no-wrap
3333 :     msgid "S4 methods"
3334 :     msgstr ""
3335 : gnustats 1804
3336 : gnustats 1751 #
3337 : gnustats 1339 #. type: subsection
3338 : gnustats 1804 #: R-ints.texi:1388
3339 :     #: R-ints.texi:1428
3340 :     #: R-ints.texi:1479
3341 :     #: R-ints.texi:1480
3342 : gnustats 1339 #, no-wrap
3343 :     msgid "Mechanics of S4 dispatch"
3344 :     msgstr ""
3345 : gnustats 1804
3346 : gnustats 1751 #
3347 : gnustats 1339 #. type: Plain text
3348 : gnustats 1804 #: R-ints.texi:1398
3349 :     msgid ""
3350 :     "S4 objects can be of any @code{SEXPTYPE}. They are either an object of a "
3351 :     "simple type (such as an atomic vector or function) with S4 class information "
3352 :     "or of type @code{S4SXP}. In all cases, the `S4 bit' (bit 4 of the `general "
3353 :     "purpose' field) is set, and can be tested by the macro/function "
3354 :     "@code{IS_S4_OBJECT}."
3355 : gnustats 1339 msgstr ""
3356 : gnustats 1804
3357 : gnustats 1751 #
3358 : gnustats 1339 #. type: Plain text
3359 : gnustats 1804 #: R-ints.texi:1407
3360 :     msgid ""
3361 :     "S4 objects are created via @code{new()}@footnote{This can also create non-S4 "
3362 :     "objects, as in @code{new(\"integer\")}.} and thence via the C function "
3363 :     "@code{R_do_new_object}. This duplicates the prototype of the class, adds a "
3364 :     "class attribute and sets the S4 bit. All S4 class attributes should be "
3365 :     "character vectors of length one with an attribute giving (as a character "
3366 :     "string) the name of the package (or @code{.GlobalEnv}) containing the class "
3367 :     "definition. Since S4 objects have a class attribute, the @code{OBJECT} bit "
3368 :     "is set."
3369 : gnustats 1339 msgstr ""
3370 : gnustats 1804
3371 : gnustats 1751 #
3372 : gnustats 1339 #. type: Plain text
3373 : gnustats 1804 #: R-ints.texi:1410
3374 :     msgid ""
3375 :     "It is currently unclear what should happen if the class attribute is removed "
3376 :     "from an S4 object, or if this should be allowed."
3377 : gnustats 1339 msgstr ""
3378 : gnustats 1804
3379 : gnustats 1751 #
3380 : gnustats 1339 #. type: Plain text
3381 : gnustats 1804 #: R-ints.texi:1417
3382 :     msgid ""
3383 :     "S4 classes are stored as @R{} objects in the environment in which they are "
3384 :     "created, with names @code{.__C__@var{classname}}: as such they are not "
3385 :     "listed by default by @code{ls}."
3386 : gnustats 1339 msgstr ""
3387 : gnustats 1804
3388 : gnustats 1751 #
3389 : gnustats 1339 #. type: Plain text
3390 : gnustats 1804 #: R-ints.texi:1420
3391 :     msgid ""
3392 :     "The objects are S4 objects of class @code{\"classRepresentation\"} which is "
3393 :     "defined in the @pkg{methods} package."
3394 : gnustats 1339 msgstr ""
3395 : gnustats 1804
3396 : gnustats 1751 #
3397 : gnustats 1339 #. type: Plain text
3398 : gnustats 1804 #: R-ints.texi:1427
3399 :     msgid ""
3400 :     "Since these are just objects, they are subject to the normal scoping rules "
3401 :     "and can be imported and exported from namespaces like other objects. The "
3402 :     "directives @code{importClassesFrom} and @code{exportClasses} are merely "
3403 :     "convenient ways to refer to class objects without needing to know their "
3404 :     "internal `metaname' (although @code{exportClasses} does a little sanity "
3405 :     "checking via @code{isClass})."
3406 : gnustats 1339 msgstr ""
3407 : gnustats 1804
3408 : gnustats 1751 #
3409 : gnustats 1339 #. type: Plain text
3410 : gnustats 1804 #: R-ints.texi:1436
3411 :     msgid ""
3412 :     "Details of methods are stored in S4 objects of class @code{\"MethodsList"
3413 :     "\"}. They have a non-syntactic name of the form @code{.__M__@var{generic}:"
3414 :     "@var{package}} for all methods defined in the current environment for the "
3415 :     "named generic derived from a specific package (which might be @code{."
3416 :     "GlobalEnv})."
3417 : gnustats 1339 msgstr ""
3418 : gnustats 1804
3419 : gnustats 1751 #
3420 : gnustats 1339 #. type: Plain text
3421 : gnustats 1804 #: R-ints.texi:1441
3422 :     msgid ""
3423 :     "There is also environment @code{.__T__@var{generic}:@var{package}} which has "
3424 :     "names the signatures of the methods defined, and values the corresponding "
3425 :     "method functions. This is often referred to as a `methods table'."
3426 : gnustats 1339 msgstr ""
3427 : gnustats 1804
3428 : gnustats 1751 #
3429 : gnustats 1339 #. type: Plain text
3430 : gnustats 1804 #: R-ints.texi:1445
3431 :     msgid ""
3432 :     "When a package without a namespace is attached these objects become visible "
3433 :     "on the search path. @code{library} calls @code{methods:::cacheMetaData} to "
3434 :     "update the internal tables."
3435 : gnustats 1339 msgstr ""
3436 : gnustats 1804
3437 : gnustats 1751 #
3438 : gnustats 1339 #. type: Plain text
3439 : gnustats 1804 #: R-ints.texi:1452
3440 :     msgid ""
3441 :     "During an @R{} session there is an environment associated with each non-"
3442 :     "primitive generic containing objects @code{.AllMTable}, @code{.Generic}, "
3443 :     "@code{.Methods}, @code{.MTable}, @code{.SigArgs} and @code{.SigLength}. "
3444 :     "@code{.MTable} and @code{AllMTable} are merged methods tables containing all "
3445 :     "the methods defined directly and via inheritance respectively. @code{."
3446 :     "Methods} is a merged methods list."
3447 : gnustats 1339 msgstr ""
3448 : gnustats 1804
3449 : gnustats 1751 #
3450 : gnustats 1339 #. type: Plain text
3451 : gnustats 1804 #: R-ints.texi:1461
3452 :     msgid ""
3453 :     "Exporting methods from a namespace is more complicated than exporting a "
3454 :     "class. Note first that you do not export a method, but rather the directive "
3455 :     "@code{exportMethods} will export all the methods defined in the namespace "
3456 :     "for a specified generic: the code also adds to the list of generics any that "
3457 :     "are exported directly. For generics which are listed via "
3458 :     "@code{exportMethods} or exported themselves, the corresponding "
3459 :     "@code{\"MethodsList\"} and environment are exported and so will appear (as "
3460 :     "hidden objects) in the package environment."
3461 : gnustats 1339 msgstr ""
3462 : gnustats 1804
3463 : gnustats 1751 #
3464 : gnustats 1339 #. type: Plain text
3465 : gnustats 1804 #: R-ints.texi:1464
3466 :     msgid ""
3467 :     "Methods for primitives which are internally S4 generic (see below) are "
3468 :     "always exported, whether mentioned in the @file{NAMESPACE} file or not."
3469 : gnustats 1339 msgstr ""
3470 : gnustats 1804
3471 : gnustats 1751 #
3472 : gnustats 1339 #. type: Plain text
3473 : gnustats 1804 #: R-ints.texi:1473
3474 :     msgid ""
3475 :     "Methods can be imported either via the directive @code{importMethodsFrom} or "
3476 :     "via importing a namespace by @code{import}. Also, if a generic is imported "
3477 :     "via @code{importFrom}, its methods are also imported. In all cases the "
3478 :     "generic will be imported if it is in the namespace, so "
3479 :     "@code{importMethodsFrom} is most appropriate for methods defined on generics "
3480 :     "in other packages. Since methods for a generic could be imported from "
3481 :     "several different packages, the methods tables are merged."
3482 : gnustats 1339 msgstr ""
3483 : gnustats 1804
3484 : gnustats 1751 #
3485 : gnustats 1339 #. type: Plain text
3486 : gnustats 1804 #: R-ints.texi:1477
3487 :     msgid ""
3488 :     "When a package with a namespace is attached @code{methods:::cacheMetaData} "
3489 :     "is called to update the internal tables: only the visible methods will be "
3490 :     "cached."
3491 : gnustats 1339 msgstr ""
3492 : gnustats 1804
3493 : gnustats 1339 #. type: Plain text
3494 : gnustats 1804 #: R-ints.texi:1484
3495 :     msgid ""
3496 : gnustats 2640 "This subsection does not discuss how S4 methods are chosen: see "
3497 :     "@uref{https://@/developer.@/r-project.org/howMethodsWork.pdf}."
3498 : gnustats 1339 msgstr ""
3499 : gnustats 1804
3500 : gnustats 1751 #
3501 : gnustats 1339 #. type: Plain text
3502 : gnustats 1804 #: R-ints.texi:1499
3503 :     msgid ""
3504 :     "For all but primitive functions, setting a method on an existing function "
3505 :     "that is not itself S4 generic creates a new object in the current "
3506 :     "environment which is a call to @code{standardGeneric} with the old "
3507 :     "definition as the default method. Such S4 generics can also be created "
3508 :     "@emph{via} a call to @code{setGeneric}@footnote{although this is not "
3509 :     "recommended as it is less future-proof.} and are standard closures in the "
3510 :     "@R{} language, with environment the environment within which they are "
3511 :     "created. With the advent of namespaces this is somewhat problematic: if "
3512 :     "@code{myfn} was previously in a package with a name space there will be two "
3513 :     "functions called @code{myfn} on the search paths, and which will be called "
3514 :     "depends on which search path is in use. This is starkest for functions in "
3515 :     "the base namespace, where the original will be found ahead of the newly "
3516 :     "created function from any other package with a namespace."
3517 : gnustats 1339 msgstr ""
3518 : gnustats 1804
3519 : gnustats 1751 #
3520 : gnustats 1339 #. type: Plain text
3521 : gnustats 1804 #: R-ints.texi:1509
3522 :     msgid ""
3523 :     "Primitive functions are treated quite differently, for efficiency reasons: "
3524 :     "this results in different semantics. @code{setGeneric} is disallowed for "
3525 :     "primitive functions. The @pkg{methods} namespace contains a list @code{."
3526 :     "BasicFunsList} named by primitive functions: the entries are either "
3527 :     "@code{FALSE} or a standard S4 generic showing the effective definition. "
3528 :     "When @code{setMethod} (or @code{setReplaceMethod}) is called, it either "
3529 :     "fails (if the list entry is @code{FALSE}) or a method is set on the "
3530 :     "effective generic given in the list."
3531 : gnustats 1339 msgstr ""
3532 : gnustats 1804
3533 : gnustats 1751 #
3534 : gnustats 1339 #. type: Plain text
3535 : gnustats 1804 #: R-ints.texi:1526
3536 :     msgid ""
3537 :     "Actual dispatch of S4 methods for almost all primitives piggy-backs on the "
3538 :     "S3 dispatch mechanism, so S4 methods can only be dispatched for primitives "
3539 :     "which are internally S3 generic. When a primitive that is internally S3 "
3540 :     "generic is called with a first argument which is an S4 object and S4 "
3541 :     "dispatch is on (that is, the @pkg{methods} namespace is loaded), "
3542 :     "@code{DispatchOrEval} calls @code{R_possible_dispatch} (defined in file "
3543 :     "@file{src/main/objects.c}). (Members of the S3 group generics, which "
3544 :     "includes all the generic operators, are treated slightly differently: the "
3545 :     "first two arguments are checked and @code{DispatchGroup} is called.) "
3546 :     "@code{R_possible_dispatch} first checks an internal table to see if any S4 "
3547 :     "methods are set for that generic (and S4 dispatch is currently enabled for "
3548 :     "that generic), and if so proceeds to S4 dispatch using methods stored in "
3549 :     "another internal table. All primitives are in the base namespace, and this "
3550 :     "mechanism means that S4 methods can be set for (some) primitives and will "
3551 :     "always be used, in contrast to setting methods on non-primitives."
3552 : gnustats 1339 msgstr ""
3553 : gnustats 1804
3554 : gnustats 1751 #
3555 : gnustats 1339 #. type: Plain text
3556 : gnustats 1804 #: R-ints.texi:1529
3557 :     msgid ""
3558 :     "The exception is @code{%*%}, which is S4 generic but not S3 generic as its C "
3559 :     "code contains a direct call to @code{R_possible_dispatch}."
3560 : gnustats 1339 msgstr ""
3561 : gnustats 1804
3562 : gnustats 1751 #
3563 : gnustats 1339 #. type: Plain text
3564 : gnustats 1804 #: R-ints.texi:1535
3565 :     msgid ""
3566 :     "The primitive @code{as.double} is special, as @code{as.numeric} and @code{as."
3567 :     "real} are copies of it. The @pkg{methods} package code partly refers to "
3568 :     "generics by name and partly by function, and maps @code{as.double} and "
3569 :     "@code{as.real} to @code{as.numeric} (since that is the name used by packages "
3570 :     "exporting methods for it)."
3571 : gnustats 1339 msgstr ""
3572 : gnustats 1804
3573 : gnustats 1751 #
3574 : gnustats 1339 #. type: Plain text
3575 : gnustats 1804 #: R-ints.texi:1539
3576 :     msgid ""
3577 :     "Some elements of the language are implemented as primitives, for example "
3578 :     "@code{@}}. This includes the subset and subassignment `functions' and they "
3579 :     "are S4 generic, again piggybacking on S3 dispatch."
3580 : gnustats 1339 msgstr ""
3581 : gnustats 1804
3582 : gnustats 1751 #
3583 : gnustats 1339 #. type: Plain text
3584 : gnustats 1804 #: R-ints.texi:1546
3585 :     msgid ""
3586 :     "@code{.BasicFunsList} is generated when @pkg{methods} is installed, by "
3587 :     "computing all primitives, initially disallowing methods on all and then "
3588 :     "setting generics for members of @code{.GenericArgsEnv}, the S4 group "
3589 :     "generics and a short exceptions list in file @file{BasicFunsList.R}: this "
3590 :     "currently contains the subsetting and subassignment operators and an "
3591 :     "override for @code{c}."
3592 : gnustats 1339 msgstr ""
3593 : gnustats 1804
3594 : gnustats 1751 #
3595 : gnustats 1339 #. type: Plain text
3596 : gnustats 1804 #: R-ints.texi:1567
3597 :     msgid ""
3598 :     "@R{}'s memory allocation is almost all done via routines in file @file{src/"
3599 :     "main/memory.c}. It is important to keep track of where memory is allocated, "
3600 :     "as the Windows port (by default) makes use of a memory allocator that "
3601 :     "differs from @code{malloc} etc as provided by MinGW. Specifically, there "
3602 :     "are entry points @code{Rm_malloc}, @code{Rm_free}, @code{Rm_calloc} and "
3603 :     "@code{Rm_free} provided by file @file{src/gnuwin32/malloc.c}. This was done "
3604 :     "for two reasons. The primary motivation was performance: the allocator "
3605 :     "provided by MSVCRT @emph{via} MinGW was far too slow at handling the many "
3606 :     "small allocations that the allocation system for @code{SEXPREC}s uses. As a "
3607 :     "side benefit, we can set a limit on the amount of allocated memory: this is "
3608 :     "useful as whereas Windows does provide virtual memory it is relatively far "
3609 :     "slower than many other @R{} platforms and so limiting @R{}'s use of swapping "
3610 :     "is highly advantageous. The high-performance allocator is only called from "
3611 :     "@file{src/main/memory.c}, @file{src/main/regex.c}, @file{src/extra/pcre} and "
3612 :     "@file{src/extra/xdr}: note that this means that it is not used in packages."
3613 : gnustats 1339 msgstr ""
3614 : gnustats 1804
3615 : gnustats 1751 #
3616 : gnustats 1339 #. type: Plain text
3617 : gnustats 1804 #: R-ints.texi:1571
3618 :     msgid ""
3619 :     "The rest of @R{} should where possible make use of the allocators made "
3620 :     "available by file @file{src/main/memory.c}, which are also the methods "
3621 :     "recommended in"
3622 : gnustats 1339 msgstr ""
3623 : gnustats 1804
3624 : gnustats 1751 #
3625 : gnustats 1339 #. type: ref{#1}
3626 : gnustats 1804 #: R-ints.texi:1573
3627 : gnustats 1339 msgid "Memory allocation, , Memory allocation, R-exts, Writing R Extensions"
3628 :     msgstr ""
3629 : gnustats 1804
3630 : gnustats 1751 #
3631 : gnustats 1339 #. type: ifclear
3632 : gnustats 1804 #: R-ints.texi:1576
3633 : gnustats 1339 msgid "`Writing R Extensions'"
3634 :     msgstr ""
3635 : gnustats 1804
3636 : gnustats 1751 #
3637 : gnustats 1339 #. type: findex
3638 : gnustats 1804 #: R-ints.texi:1577
3639 : gnustats 1339 #, no-wrap
3640 :     msgid "R_alloc"
3641 :     msgstr ""
3642 : gnustats 1804
3643 : gnustats 1751 #
3644 : gnustats 1339 #. type: findex
3645 : gnustats 1804 #: R-ints.texi:1578
3646 : gnustats 1339 #, no-wrap
3647 :     msgid "Calloc"
3648 :     msgstr ""
3649 : gnustats 1804
3650 : gnustats 1751 #
3651 : gnustats 1339 #. type: findex
3652 : gnustats 1804 #: R-ints.texi:1579
3653 : gnustats 1339 #, no-wrap
3654 :     msgid "Realloc"
3655 :     msgstr ""
3656 : gnustats 1804
3657 : gnustats 1751 #
3658 : gnustats 1339 #. type: findex
3659 : gnustats 1804 #: R-ints.texi:1580
3660 : gnustats 1339 #, no-wrap
3661 :     msgid "Free"
3662 :     msgstr ""
3663 : gnustats 1804
3664 : gnustats 1751 #
3665 : gnustats 1339 #. type: Plain text
3666 : gnustats 1804 #: R-ints.texi:1585
3667 :     msgid ""
3668 :     "for use in @R{} packages, namely the use of @code{R_alloc}, @code{Calloc}, "
3669 :     "@code{Realloc} and @code{Free}. Memory allocated by @code{R_alloc} is freed "
3670 :     "by the garbage collector once the `watermark' has been reset by calling"
3671 : gnustats 1339 msgstr ""
3672 : gnustats 1804
3673 : gnustats 1751 #
3674 : gnustats 1339 #. type: findex
3675 : gnustats 1804 #: R-ints.texi:1585
3676 : gnustats 1339 #, no-wrap
3677 :     msgid "vmaxset"
3678 :     msgstr ""
3679 : gnustats 1804
3680 : gnustats 1751 #
3681 : gnustats 1339 #. type: Plain text
3682 : gnustats 1804 #: R-ints.texi:1589
3683 :     msgid ""
3684 :     "@code{vmaxset}. This is done automatically by the wrapper code calling "
3685 :     "primitives and @code{.Internal} functions (and also by the wrapper code to "
3686 :     "@code{.Call} and @code{.External}), but"
3687 : gnustats 1339 msgstr ""
3688 : gnustats 1804
3689 : gnustats 1751 #
3690 : gnustats 1339 #. type: findex
3691 : gnustats 1804 #: R-ints.texi:1589
3692 : gnustats 1339 #, no-wrap
3693 :     msgid "vmaxget"
3694 :     msgstr ""
3695 : gnustats 1804
3696 : gnustats 1751 #
3697 : gnustats 1339 #. type: Plain text
3698 : gnustats 1804 #: R-ints.texi:1593
3699 :     msgid ""
3700 :     "@code{vmaxget} and @code{vmaxset} can be used to reset the watermark from "
3701 :     "within internal code if the memory is only required for a short time."
3702 : gnustats 1339 msgstr ""
3703 : gnustats 1804
3704 : gnustats 1751 #
3705 : gnustats 1339 #. type: findex
3706 : gnustats 1804 #: R-ints.texi:1594
3707 : gnustats 1339 #, no-wrap
3708 :     msgid "alloca"
3709 :     msgstr ""
3710 : gnustats 1804
3711 : gnustats 1751 #
3712 : gnustats 1339 #. type: Plain text
3713 : gnustats 1804 #: R-ints.texi:1599
3714 :     msgid ""
3715 :     "All of the methods of memory allocation mentioned so far are relatively "
3716 :     "expensive. All @R{} platforms support @code{alloca}, and in almost all "
3717 :     "cases@footnote{but apparently not on Windows.} this is managed by the "
3718 :     "compiler, allocates memory on the C stack and is very efficient."
3719 : gnustats 1339 msgstr ""
3720 : gnustats 1804
3721 : gnustats 1751 #
3722 : gnustats 1339 #. type: Plain text
3723 : gnustats 1804 #: R-ints.texi:1606
3724 :     msgid ""
3725 :     "There are two disadvantages in using @code{alloca}. First, it is fragile "
3726 :     "and care is needed to avoid writing (or even reading) outside the bounds of "
3727 :     "the allocation block returned. Second, it increases the danger of "
3728 :     "overflowing the C stack. It is suggested that it is only used for smallish "
3729 :     "allocations (up to tens of thousands of bytes), and that"
3730 : gnustats 1339 msgstr ""
3731 : gnustats 1804
3732 : gnustats 1751 #
3733 : gnustats 1339 #. type: findex
3734 : gnustats 1804 #: R-ints.texi:1607
3735 : gnustats 1339 #, no-wrap
3736 :     msgid "R_CheckStack"
3737 :     msgstr ""
3738 : gnustats 1804
3739 : gnustats 1751 #
3740 : gnustats 1339 #. type: example
3741 : gnustats 1804 #: R-ints.texi:1610
3742 : gnustats 1339 #, no-wrap
3743 :     msgid " R_CheckStack();\n"
3744 :     msgstr ""
3745 : gnustats 1804
3746 : gnustats 1751 #
3747 : gnustats 1339 #. type: Plain text
3748 : gnustats 1804 #: R-ints.texi:1617
3749 :     msgid ""
3750 :     "is called immediately after the allocation (as @R{}'s stack checking "
3751 :     "mechanism will warn far enough from the stack limit to allow for modest use "
3752 :     "of alloca). (@code{do_makeunique} in file @file{src/main/unique.c} provides "
3753 :     "an example of both points.)"
3754 : gnustats 1339 msgstr ""
3755 : gnustats 1804
3756 : gnustats 1751 #
3757 : gnustats 1339 #. type: Plain text
3758 : gnustats 1804 #: R-ints.texi:1619
3759 : gnustats 1339 msgid "There is an alternative check,"
3760 :     msgstr ""
3761 : gnustats 1804
3762 : gnustats 1751 #
3763 : gnustats 1339 #. type: findex
3764 : gnustats 1804 #: R-ints.texi:1619
3765 : gnustats 1339 #, no-wrap
3766 :     msgid "R_CheckStack2"
3767 :     msgstr ""
3768 : gnustats 1804
3769 : gnustats 1751 #
3770 : gnustats 1339 #. type: example
3771 : gnustats 1804 #: R-ints.texi:1622
3772 : gnustats 1339 #, no-wrap
3773 :     msgid " R_CheckStack2(size_t extra);\n"
3774 :     msgstr ""
3775 : gnustats 1804
3776 : gnustats 1751 #
3777 : gnustats 1339 #. type: Plain text
3778 : gnustats 1804 #: R-ints.texi:1627
3779 :     msgid ""
3780 :     "to be called immediately @emph{before} trying an allocation of @code{extra} "
3781 :     "bytes."
3782 : gnustats 1339 msgstr ""
3783 : gnustats 1804
3784 : gnustats 1751 #
3785 : gnustats 1339 #. type: Plain text
3786 : gnustats 1804 #: R-ints.texi:1633
3787 :     msgid ""
3788 :     "An alternative strategy has been used for various functions which require "
3789 :     "intermediate blocks of storage of varying but usually small size, and this "
3790 :     "has been consolidated into the routines in the header file @file{src/main/"
3791 :     "RBufferUtils.h}. This uses a structure which contains a buffer, the current "
3792 :     "size and the default size. A call to"
3793 : gnustats 1339 msgstr ""
3794 : gnustats 1804
3795 : gnustats 1751 #
3796 : gnustats 1339 #. type: findex
3797 : gnustats 1804 #: R-ints.texi:1633
3798 : gnustats 1339 #, no-wrap
3799 :     msgid "R_AllocStringBuffer"
3800 :     msgstr ""
3801 : gnustats 1804
3802 : gnustats 1751 #
3803 : gnustats 1339 #. type: example
3804 : gnustats 1804 #: R-ints.texi:1636
3805 : gnustats 1339 #, no-wrap
3806 :     msgid " R_AllocStringBuffer(size_t blen, R_StringBuffer *buf);\n"
3807 :     msgstr ""
3808 : gnustats 1804
3809 : gnustats 1751 #
3810 : gnustats 1339 #. type: Plain text
3811 : gnustats 1804 #: R-ints.texi:1642
3812 :     msgid ""
3813 :     "sets @code{buf->data} to a memory area of at least @code{blen+1} bytes. At "
3814 :     "least the default size is used, which means that for small allocations the "
3815 :     "same buffer can be reused. A call to"
3816 : gnustats 1339 msgstr ""
3817 : gnustats 1804
3818 : gnustats 1751 #
3819 : gnustats 1339 #. type: findex
3820 : gnustats 1804 #: R-ints.texi:1642
3821 : gnustats 1339 #, no-wrap
3822 :     msgid "R_FreeStringBufferL"
3823 :     msgstr ""
3824 : gnustats 1804
3825 : gnustats 1751 #
3826 : gnustats 1339 #. type: findex
3827 : gnustats 1804 #: R-ints.texi:1643
3828 : gnustats 1339 #, no-wrap
3829 :     msgid "R_FreeStringBuffer"
3830 :     msgstr ""
3831 : gnustats 1804
3832 : gnustats 1751 #
3833 : gnustats 1339 #. type: Plain text
3834 : gnustats 1804 #: R-ints.texi:1647
3835 :     msgid ""
3836 :     "@code{R_FreeStringBufferL} releases memory if more than the default has been "
3837 :     "allocated whereas a call to @code{R_FreeStringBuffer} frees any memory "
3838 :     "allocated."
3839 : gnustats 1339 msgstr ""
3840 : gnustats 1804
3841 : gnustats 1751 #
3842 : gnustats 1339 #. type: Plain text
3843 : gnustats 1804 #: R-ints.texi:1649
3844 :     msgid ""
3845 :     "The @code{R_StringBuffer} structure needs to be initialized, for example by"
3846 : gnustats 1339 msgstr ""
3847 : gnustats 1804
3848 : gnustats 1751 #
3849 : gnustats 1339 #. type: example
3850 : gnustats 1804 #: R-ints.texi:1652
3851 : gnustats 1339 #, no-wrap
3852 :     msgid "static R_StringBuffer ex_buff = @{NULL, 0, MAXELTSIZE@};\n"
3853 :     msgstr ""
3854 : gnustats 1804
3855 : gnustats 1751 #
3856 : gnustats 1339 #. type: Plain text
3857 : gnustats 1804 #: R-ints.texi:1660
3858 :     msgid ""
3859 :     "which uses a default size of @code{MAXELTSIZE = 8192} bytes. Most current "
3860 :     "uses have a static @code{R_StringBuffer} structure, which allows the "
3861 :     "(default-sized) buffer to be shared between calls to e.g.@: @code{grep} and "
3862 :     "even between functions: this will need to be changed if @R{} ever allows "
3863 :     "concurrent evaluation threads. So the idiom is"
3864 : gnustats 1339 msgstr ""
3865 : gnustats 1804
3866 : gnustats 1751 #
3867 : gnustats 1339 #. type: example
3868 : gnustats 1804 #: R-ints.texi:1673
3869 : gnustats 1339 #, no-wrap
3870 :     msgid ""
3871 :     "static R_StringBuffer ex_buff = @{NULL, 0, MAXELTSIZE@};\n"
3872 :     "...\n"
3873 :     " char *buf;\n"
3874 :     " for(i = 0; i < n; i++) @{\n"
3875 :     " compute len\n"
3876 :     " buf = R_AllocStringBuffer(len, &ex_buff);\n"
3877 :     " use buf\n"
3878 :     " @}\n"
3879 :     " /* free allocation if larger than the default, but leave\n"
3880 :     " default allocated for future use */\n"
3881 :     " R_FreeStringBufferL(&ex_buff);\n"
3882 :     msgstr ""
3883 : gnustats 1804
3884 : gnustats 1751 #
3885 : gnustats 1339 #. type: subsection
3886 : gnustats 1804 #: R-ints.texi:1678
3887 :     #: R-ints.texi:1680
3888 :     #: R-ints.texi:1681
3889 : gnustats 1339 #, no-wrap
3890 :     msgid "Internals of R_alloc"
3891 :     msgstr ""
3892 : gnustats 1804
3893 : gnustats 1751 #
3894 : gnustats 1339 #. type: Plain text
3895 : gnustats 1804 #: R-ints.texi:1689
3896 :     msgid ""
3897 :     "The memory used by @code{R_alloc} is allocated as @R{} vectors, of type "
3898 :     "@code{RAWSXP}. Thus the allocation is in units of 8 bytes, and is rounded "
3899 :     "up. A request for zero bytes currently returns @code{NULL} (but this should "
3900 :     "not be relied on). For historical reasons, in all other cases 1 byte is "
3901 :     "added before rounding up so the allocation is always 1--8 bytes more than "
3902 :     "was asked for: again this should not be relied on."
3903 : gnustats 1339 msgstr ""
3904 : gnustats 1804
3905 : gnustats 1751 #
3906 : gnustats 1339 #. type: Plain text
3907 : gnustats 1804 #: R-ints.texi:1700
3908 :     msgid ""
3909 :     "The vectors allocated are protected via the setting of @code{R_VStack}, as "
3910 :     "the garbage collector marks everything that can be reached from that "
3911 :     "location. When a vector is @code{R_alloc}ated, its @code{ATTRIB} pointer is "
3912 :     "set to the current @code{R_VStack}, and @code{R_VStack} is set to the latest "
3913 :     "allocation. Thus @code{R_VStack} is a single-linked chain of the vectors "
3914 :     "currently allocated via @code{R_alloc}. Function @code{vmaxset} resets the "
3915 :     "location @code{R_VStack}, and should be to a value that has previously be "
3916 :     "obtained @emph{via} @code{vmaxget}: allocations after the value was obtained "
3917 :     "will no longer be protected and hence available for garbage collection."
3918 : gnustats 1339 msgstr ""
3919 : gnustats 1804
3920 : gnustats 1751 #
3921 : gnustats 1339 #. type: Plain text
3922 : gnustats 1804 #: R-ints.texi:1706
3923 :     msgid ""
3924 :     "This section notes known use by the system of these environments: the "
3925 :     "intention is to minimize or eliminate such uses."
3926 : gnustats 1339 msgstr ""
3927 : gnustats 1804
3928 : gnustats 1751 #
3929 : gnustats 1339 #. type: node
3930 : gnustats 1804 #: R-ints.texi:1710
3931 :     #: R-ints.texi:1712
3932 :     #: R-ints.texi:1713
3933 :     #: R-ints.texi:1739
3934 : gnustats 1339 #, no-wrap
3935 :     msgid "Base environment"
3936 :     msgstr ""
3937 : gnustats 1804
3938 : gnustats 1751 #
3939 : gnustats 1339 #. type: subsection
3940 : gnustats 1804 #: R-ints.texi:1710
3941 :     #: R-ints.texi:1712
3942 :     #: R-ints.texi:1739
3943 :     #: R-ints.texi:1740
3944 : gnustats 1339 #, no-wrap
3945 :     msgid "Global environment"
3946 :     msgstr ""
3947 : gnustats 1804
3948 : gnustats 1751 #
3949 : gnustats 1339 #. type: findex
3950 : gnustats 1804 #: R-ints.texi:1717
3951 : gnustats 1339 #, no-wrap
3952 :     msgid ".Device"
3953 :     msgstr ""
3954 : gnustats 1804
3955 : gnustats 1751 #
3956 : gnustats 1339 #. type: findex
3957 : gnustats 1804 #: R-ints.texi:1718
3958 : gnustats 1339 #, no-wrap
3959 :     msgid ".Devices"
3960 :     msgstr ""
3961 : gnustats 1804
3962 : gnustats 1751 #
3963 : gnustats 1339 #. type: Plain text
3964 : gnustats 1804 #: R-ints.texi:1724
3965 :     msgid ""
3966 :     "The graphics devices system maintains two variables @code{.Device} and "
3967 :     "@code{.Devices} in the base environment: both are always set. The variable "
3968 :     "@code{.Devices} gives a list of character vectors of the names of open "
3969 :     "devices, and @code{.Device} is the element corresponding to the currently "
3970 :     "active device. The null device will always be open."
3971 : gnustats 1339 msgstr ""
3972 : gnustats 1804
3973 : gnustats 1751 #
3974 : gnustats 1339 #. type: findex
3975 : gnustats 1804 #: R-ints.texi:1725
3976 : gnustats 1339 #, no-wrap
3977 :     msgid ".Options"
3978 :     msgstr ""
3979 : gnustats 1804
3980 : gnustats 1751 #
3981 : gnustats 1339 #. type: Plain text
3982 : gnustats 1804 #: R-ints.texi:1729
3983 :     msgid ""
3984 :     "There appears to be a variable @code{.Options}, a pairlist giving the "
3985 :     "current options settings. But in fact this is just a symbol with a value "
3986 :     "assigned, and so shows up as a base variable."
3987 : gnustats 1339 msgstr ""
3988 : gnustats 1804
3989 : gnustats 1751 #
3990 : gnustats 1339 #. type: findex
3991 : gnustats 1804 #: R-ints.texi:1730
3992 : gnustats 1339 #, no-wrap
3993 :     msgid ".Last.value"
3994 :     msgstr ""
3995 : gnustats 1804
3996 : gnustats 1751 #
3997 : gnustats 1339 #. type: Plain text
3998 : gnustats 1804 #: R-ints.texi:1733
3999 :     msgid ""
4000 :     "Similarly, the evaluator creates a symbol @code{.Last.value} which appears "
4001 :     "as a variable in the base environment."
4002 : gnustats 1339 msgstr ""
4003 : gnustats 1804
4004 : gnustats 1751 #
4005 : gnustats 1339 #. type: findex
4006 : gnustats 1804 #: R-ints.texi:1734
4007 : gnustats 1339 #, no-wrap
4008 :     msgid ".Traceback"
4009 :     msgstr ""
4010 : gnustats 1804
4011 : gnustats 1751 #
4012 : gnustats 1339 #. type: findex
4013 : gnustats 1804 #: R-ints.texi:1735
4014 : gnustats 1339 #, no-wrap
4015 :     msgid "last.warning"
4016 :     msgstr ""
4017 : gnustats 1804
4018 : gnustats 1751 #
4019 : gnustats 1339 #. type: Plain text
4020 : gnustats 1804 #: R-ints.texi:1738
4021 :     msgid ""
4022 :     "Errors can give rise to objects @code{.Traceback} and @code{last.warning} in "
4023 :     "the base environment."
4024 : gnustats 1339 msgstr ""
4025 : gnustats 1804
4026 : gnustats 1751 #
4027 : gnustats 1339 #. type: cindex
4028 : gnustats 1804 #: R-ints.texi:1742
4029 : gnustats 1339 #, no-wrap
4030 :     msgid "global environment"
4031 :     msgstr ""
4032 : gnustats 1804
4033 : gnustats 1751 #
4034 : gnustats 1339 #. type: cindex
4035 : gnustats 1804 #: R-ints.texi:1743
4036 : gnustats 1339 #, no-wrap
4037 :     msgid "environment, global"
4038 :     msgstr ""
4039 : gnustats 1804
4040 : gnustats 1751 #
4041 : gnustats 1339 #. type: findex
4042 : gnustats 1804 #: R-ints.texi:1744
4043 : gnustats 1339 #, no-wrap
4044 :     msgid ".Random.seed"
4045 :     msgstr ""
4046 : gnustats 1804
4047 : gnustats 1751 #
4048 : gnustats 1339 #. type: Plain text
4049 : gnustats 1804 #: R-ints.texi:1747
4050 :     msgid ""
4051 :     "The seed for the random number generator is stored in object @code{.Random."
4052 :     "seed} in the global environment."
4053 : gnustats 1339 msgstr ""
4054 : gnustats 1804
4055 : gnustats 1751 #
4056 : gnustats 1339 #. type: findex
4057 : gnustats 1804 #: R-ints.texi:1748
4058 : gnustats 1339 #, no-wrap
4059 :     msgid "dump.frames"
4060 :     msgstr ""
4061 : gnustats 1804
4062 : gnustats 1751 #
4063 : gnustats 1339 #. type: Plain text
4064 : gnustats 1804 #: R-ints.texi:1751
4065 :     msgid ""
4066 :     "Some error handlers may give rise to objects in the global environment: for "
4067 :     "example @code{dump.frames} by default produces @code{last.dump}."
4068 : gnustats 1339 msgstr ""
4069 : gnustats 1804
4070 : gnustats 1751 #
4071 : gnustats 1339 #. type: findex
4072 : gnustats 1804 #: R-ints.texi:1752
4073 : gnustats 1339 #, no-wrap
4074 :     msgid ".SavedPlots"
4075 :     msgstr ""
4076 : gnustats 1804
4077 : gnustats 1751 #
4078 : gnustats 1339 #. type: Plain text
4079 : gnustats 1804 #: R-ints.texi:1756
4080 :     msgid ""
4081 :     "The @code{windows()} device makes use of a variable @code{.SavedPlots} to "
4082 :     "store display lists of saved plots for later display. This is regarded as a "
4083 :     "variable created by the user."
4084 : gnustats 1339 msgstr ""
4085 : gnustats 1804
4086 : gnustats 1751 #
4087 : gnustats 1339 #. type: cindex
4088 : gnustats 1804 #: R-ints.texi:1761
4089 : gnustats 1339 #, no-wrap
4090 :     msgid "modules"
4091 :     msgstr ""
4092 : gnustats 1804
4093 : gnustats 1751 #
4094 : gnustats 1339 #. type: Plain text
4095 : gnustats 1804 #: R-ints.texi:1766
4096 :     msgid ""
4097 :     "@R{} makes use of a number of shared objects/DLLs stored in the "
4098 :     "@file{modules} directory. These are parts of the code which have been "
4099 :     "chosen to be loaded `on demand' rather than linked as dynamic libraries or "
4100 :     "incorporated into the main executable/dynamic library."
4101 : gnustats 1339 msgstr ""
4102 : gnustats 1804
4103 : gnustats 1751 #
4104 : gnustats 1339 #. type: Plain text
4105 : gnustats 1804 #: R-ints.texi:1770
4106 :     msgid ""
4107 :     "For the remaining modules the motivation has been the amount of (often "
4108 :     "optional) code they will bring in @emph{via} libraries to which they are "
4109 :     "linked."
4110 : gnustats 1339 msgstr ""
4111 : gnustats 1804
4112 : gnustats 1751 #
4113 : gnustats 1339 #. type: code{#1}
4114 : gnustats 1804 #: R-ints.texi:1773
4115 : gnustats 1339