8
8
# '@param x a URL, or vector of URLs
9
9
# '
10
10
# '@param value a replacement value for x's scheme.
11
+ # '
12
+ # '@seealso \code{\link{domain}}, \code{\link{port}}, \code{\link{path}},
13
+ # '\code{\link{parameters}} and \code{\link{fragment}} for other accessors.
14
+ # '
11
15
# '@examples
12
16
# '#Get a component
13
17
# 'example_url <- "http://cran.r-project.org/submit.html"
20
24
scheme <- function (x ){
21
25
return (get_component_(x ,0 ))
22
26
}
27
+
23
28
" scheme<-" <- function (x , value ) standardGeneric(" scheme<-" )
24
29
# '@rdname scheme
25
30
# '@export
@@ -38,6 +43,9 @@ setGeneric("scheme<-", useAsDefault = function(x, value){
38
43
# '
39
44
# '@param value a replacement value for x's scheme.
40
45
# '
46
+ # '@seealso \code{\link{scheme}}, \code{\link{port}}, \code{\link{path}},
47
+ # '\code{\link{parameters}} and \code{\link{fragment}} for other accessors.
48
+ # '
41
49
# '@examples
42
50
# '#Get a component
43
51
# 'example_url <- "http://cran.r-project.org/submit.html"
@@ -60,12 +68,16 @@ setGeneric("domain<-", useAsDefault = function(x, value){
60
68
# '@description as in the lubridate package, individual components of a URL
61
69
# 'can be both extracted or set using the relevant function call - see the
62
70
# 'examples.
71
+ # '
63
72
# '@aliases port
64
73
# '@rdname port
65
74
# '
66
75
# '@param x a URL, or vector of URLs
67
76
# '
68
- # '@param value a replacement value for x's scheme.
77
+ # '@param value a replacement value for x's port.
78
+ # '
79
+ # '@seealso \code{\link{scheme}}, \code{\link{domain}}, \code{\link{path}},
80
+ # '\code{\link{parameters}} and \code{\link{fragment}} for other accessors.
69
81
# '
70
82
# '@examples
71
83
# '#Get a component
@@ -94,7 +106,10 @@ setGeneric("port<-", useAsDefault = function(x, value){
94
106
# '
95
107
# '@param x a URL, or vector of URLs
96
108
# '
97
- # '@param value a replacement value for x's scheme.
109
+ # '@param value a replacement value for x's path
110
+ # '
111
+ # '@seealso \code{\link{scheme}}, \code{\link{domain}}, \code{\link{port}},
112
+ # '\code{\link{parameters}} and \code{\link{fragment}} for other accessors.
98
113
# '
99
114
# '@examples
100
115
# '#Get a component
@@ -114,36 +129,41 @@ setGeneric("path<-", useAsDefault = function(x, value){
114
129
return (set_component_(x , 3 , value ))
115
130
})
116
131
117
- # '@title Get or set a URL's query string
132
+ # '@title Get or set a URL's parameters
118
133
# '@description as in the lubridate package, individual components of a URL
119
134
# 'can be both extracted or set using the relevant function call - see the
120
135
# 'examples.
121
- # '@aliases query
122
- # '@rdname query
136
+ # '
137
+ # '@aliases parameters
138
+ # '@rdname parameters
123
139
# '
124
140
# '@param x a URL, or vector of URLs
125
141
# '
126
- # '@param value a replacement value for x's scheme.
142
+ # '@param value a replacement value for x's parameters.
143
+ # '
144
+ # '@seealso \code{\link{scheme}}, \code{\link{domain}}, \code{\link{port}},
145
+ # '\code{\link{path}} and \code{\link{fragment}} for other accessors.
127
146
# '
128
147
# '@examples
129
148
# '#Get a component
130
149
# 'example_url <- "http://en.wikipedia.org/wiki/Aaron_Halfaker?debug=true"
131
- # 'query(example_url)
150
+ # 'parameters(example_url)
151
+ # '#[1] "debug=true"
132
152
# '
133
153
# '#Set a component
134
- # 'query (example_url) <- "debug=false"
154
+ # 'parameters (example_url) <- "debug=false"
135
155
# '@export
136
- query <- function (x ){
156
+ parameters <- function (x ){
137
157
return (get_component_(x ,4 ))
138
158
}
139
- " query <-" <- function (x , value ) standardGeneric(" query <-" )
140
- # '@rdname query
159
+ " parameters <-" <- function (x , value ) standardGeneric(" parameters <-" )
160
+ # '@rdname parameters
141
161
# '@export
142
- setGeneric(" query <-" , useAsDefault = function (x , value ){
162
+ setGeneric(" parameters <-" , useAsDefault = function (x , value ){
143
163
return (set_component_(x , 4 , value ))
144
164
})
145
165
146
- # '@title Get or set a URL's fragment identifier
166
+ # '@title Get or set a URL's fragment
147
167
# '@description as in the lubridate package, individual components of a URL
148
168
# 'can be both extracted or set using the relevant function call - see the
149
169
# 'examples.
@@ -152,7 +172,10 @@ setGeneric("query<-", useAsDefault = function(x, value){
152
172
# '
153
173
# '@param x a URL, or vector of URLs
154
174
# '
155
- # '@param value a replacement value for x's scheme.
175
+ # '@param value a replacement value for x's fragment.
176
+ # '
177
+ # '@seealso \code{\link{scheme}}, \code{\link{domain}}, \code{\link{port}},
178
+ # '\code{\link{path}} and \code{\link{parameters}} for other accessors.
156
179
# '
157
180
# '@examples
158
181
# '#Get a component
@@ -167,6 +190,7 @@ setGeneric("query<-", useAsDefault = function(x, value){
167
190
fragment <- function (x ){
168
191
return (get_component_(x ,5 ))
169
192
}
193
+
170
194
" fragment<-" <- function (x , value ) standardGeneric(" fragment<-" )
171
195
# '@rdname fragment
172
196
# '@export
0 commit comments