File: internet.Rout.save

package info (click to toggle)
r-base 4.5.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 112,924 kB
  • sloc: ansic: 291,338; fortran: 111,889; javascript: 14,798; yacc: 6,154; sh: 5,689; makefile: 5,239; tcl: 4,562; perl: 963; objc: 791; f90: 758; asm: 258; java: 31; sed: 1
file content (171 lines) | stat: -rw-r--r-- 6,992 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171

R Under development (unstable) (2023-05-04 r84393) -- "Unsuffered Consequences"
Copyright (C) 2023 The R Foundation for Statistical Computing
Platform: aarch64-apple-darwin22.4.0 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> ## These are tests that require a working Internet connection.
> ## We attempt to test for that on Unix.
> 
> if(.Platform$OS.type == "unix" &&
+    is.null(nsl("cran.r-project.org"))) q()
> 
> ## As virtually all http sites redirect to https:, we only test the latter
> 
> # test do_download (and "record" #{packages}):
> ap <- available.packages(contrib.url("https://cran.r-project.org"))
> ## IGNORE_RDIFF_BEGIN
> nrow(ap)
[1] 19457
> ## IGNORE_RDIFF_END
> 
> # test url connections
> zz <- url("https://cran.r-project.org/")
> readLines(zz)
 [1] "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Frameset//EN\" \"http://www.w3.org/TR/html4/frameset.dtd\">"
 [2] "<html lang=en>"                                                                                                   
 [3] "<head>"                                                                                                   
 [4] "<title>The Comprehensive R Archive Network</title>"                                                       
 [5] "<META HTTP-EQUIV=\"content-type\" CONTENT=\"text/html; charset=utf-8\">"                                  
 [6] "<link rel=\"icon\" href=\"favicon.ico\" type=\"image/x-icon\">"                                           
 [7] "<link rel=\"shortcut icon\" href=\"favicon.ico\" type=\"image/x-icon\">"                                  
 [8] "<link rel=\"stylesheet\" type=\"text/css\" href=\"R.css\">"                                               
 [9] "</head>"                                                                                                  
[10] ""                                                                                                         
[11] "<FRAMESET cols=\"1*, 4*\" style=\"border: none;\">"                                                       
[12] "<FRAMESET rows=\"120, 1*\">"                                                                              
[13] "<FRAME src=\"logo.html\" name=\"logo\" frameborder=0>"                                                    
[14] "<FRAME src=\"navbar.html\" name=\"contents\" frameborder=0>"                                              
[15] "</FRAMESET>"                                                                                              
[16] "<FRAME src=\"banner.shtml\" name=\"banner\" frameborder=0>"                                               
[17] "<noframes>"                                                                                               
[18] "<h1>The Comprehensive R Archive Network</h1>"                                                             
[19] ""                                                                                                         
[20] "Your browser seems not to support frames,"                                                                
[21] "here is the <A href=\"navbar.html\">contents page</A> of CRAN."                                           
[22] "</noframes>"                                                                                              
[23] "</FRAMESET>"                                                                                              
[24] "</html>"                                                                                                  
> close(zz)
> 
> # and via read.table, using an r-project.org site
> read.table("https://developer.R-project.org/inet-tests/ch11b.dat")
     V1  V2   V3    V4 V5
1     1 307  930 36.58  0
2     2 307  940 36.73  0
3     3 307  950 36.93  0
4     4 307 1000 37.15  0
5     5 307 1010 37.23  0
6     6 307 1020 37.24  0
7     7 307 1030 37.24  0
8     8 307 1040 36.90  0
9     9 307 1050 36.95  0
10   10 307 1100 36.89  0
11   11 307 1110 36.95  0
12   12 307 1120 37.00  0
13   13 307 1130 36.90  0
14   14 307 1140 36.99  0
15   15 307 1150 36.99  0
16   16 307 1200 37.01  0
17   17 307 1210 37.04  0
18   18 307 1220 37.04  0
19   19 307 1230 37.14  0
20   20 307 1240 37.07  0
21   21 307 1250 36.98  0
22   22 307 1300 37.01  0
23   23 307 1310 36.97  0
24   24 307 1320 36.97  0
25   25 307 1330 37.12  0
26   26 307 1340 37.13  0
27   27 307 1350 37.14  0
28   28 307 1400 37.15  0
29   29 307 1410 37.17  0
30   30 307 1420 37.12  0
31   31 307 1430 37.12  0
32   32 307 1440 37.17  0
33   33 307 1450 37.28  0
34   34 307 1500 37.28  0
35   35 307 1510 37.44  0
36   36 307 1520 37.51  0
37   37 307 1530 37.64  0
38   38 307 1540 37.51  0
39   39 307 1550 37.98  1
40   40 307 1600 38.02  1
41   41 307 1610 38.00  1
42   42 307 1620 38.24  1
43   43 307 1630 38.10  1
44   44 307 1640 38.24  1
45   45 307 1650 38.11  1
46   46 307 1700 38.02  1
47   47 307 1710 38.11  1
48   48 307 1720 38.01  1
49   49 307 1730 37.91  1
50   50 307 1740 37.96  1
51   51 307 1750 38.03  1
52   52 307 1800 38.17  1
53   53 307 1810 38.19  1
54   54 307 1820 38.18  1
55   55 307 1830 38.15  1
56   56 307 1840 38.04  1
57   57 307 1850 37.96  1
58   58 307 1900 37.84  1
59   59 307 1910 37.83  1
60   60 307 1920 37.84  1
61   61 307 1930 37.74  1
62   62 307 1940 37.76  1
63   63 307 1950 37.76  1
64   64 307 2000 37.64  1
65   65 307 2010 37.63  1
66   66 307 2020 38.06  1
67   67 307 2030 38.19  1
68   68 307 2040 38.35  1
69   69 307 2050 38.25  1
70   70 307 2100 37.86  1
71   71 307 2110 37.95  1
72   72 307 2120 37.95  1
73   73 307 2130 37.76  1
74   74 307 2140 37.60  1
75   75 307 2150 37.89  1
76   76 307 2200 37.86  1
77   77 307 2210 37.71  1
78   78 307 2220 37.78  1
79   79 307 2230 37.82  1
80   80 307 2240 37.76  1
81   81 307 2250 37.81  1
82   82 307 2300 37.84  1
83   83 307 2310 38.01  1
84   84 307 2320 38.10  1
85   85 307 2330 38.15  1
86   86 307 2340 37.92  1
87   87 307 2350 37.64  1
88   88 308    0 37.70  1
89   89 308   10 37.46  1
90   90 308   20 37.41  1
91   91 308   30 37.46  1
92   92 308   40 37.56  1
93   93 308   50 37.55  1
94   94 308  100 37.75  1
95   95 308  110 37.76  1
96   96 308  120 37.73  1
97   97 308  130 37.77  1
98   98 308  140 38.01  1
99   99 308  150 38.04  1
100 100 308  200 38.07  1
> 
> showConnections(all = TRUE)
  description class      mode text   isopen   can read can write
0 "stdin"     "terminal" "r"  "text" "opened" "yes"    "no"     
1 "stdout"    "terminal" "w"  "text" "opened" "no"     "yes"    
2 "stderr"    "terminal" "w"  "text" "opened" "no"     "yes"    
>