File tree Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -147,46 +147,46 @@ setMethod("isLocal",
147
147
callJMethod(x @ sdf , " isLocal" )
148
148
})
149
149
150
- # ' ShowDF
150
+ # ' show
151
151
# '
152
152
# ' Print the first numRows rows of a DataFrame
153
153
# '
154
154
# ' @param x A SparkSQL DataFrame
155
155
# ' @param numRows The number of rows to print. Defaults to 20.
156
156
# '
157
- # ' @rdname showDF
157
+ # ' @rdname show
158
158
# ' @export
159
159
# ' @examples
160
160
# '\dontrun{
161
161
# ' sc <- sparkR.init()
162
162
# ' sqlCtx <- sparkRSQL.init(sc)
163
163
# ' path <- "path/to/file.json"
164
164
# ' df <- jsonFile(sqlCtx, path)
165
- # ' showDF (df)
165
+ # ' show (df)
166
166
# '}
167
- setMethod ("showDF ",
167
+ setMethod ("show ",
168
168
signature(x = " DataFrame" ),
169
169
function (x , numRows = 20 ) {
170
170
callJMethod(x @ sdf , " showString" , numToInt(numRows ))
171
171
})
172
172
173
- # ' show
173
+ # ' showDF
174
174
# '
175
175
# ' Print the DataFrame column names and types
176
176
# '
177
177
# ' @param x A SparkSQL DataFrame
178
178
# '
179
- # ' @rdname show
179
+ # ' @rdname showDF
180
180
# ' @export
181
181
# ' @examples
182
182
# '\dontrun{
183
183
# ' sc <- sparkR.init()
184
184
# ' sqlCtx <- sparkRSQL.init(sc)
185
185
# ' path <- "path/to/file.json"
186
186
# ' df <- jsonFile(sqlCtx, path)
187
- # ' show(df)
187
+ # ' showDF
188
188
# '}
189
- setMethod ("show ", "DataFrame",
189
+ setMethod ("showDF ", "DataFrame",
190
190
function (object ) {
191
191
cols <- lapply(dtypes(object ), function (l ) {
192
192
paste(l , collapse = " :" )
Original file line number Diff line number Diff line change @@ -639,9 +639,9 @@ test_that("toJSON() returns an RDD of the correct values", {
639
639
expect_equal(collect(testRDD )[[1 ]], mockLines [1 ])
640
640
})
641
641
642
- test_that(" showDF ()" , {
642
+ test_that(" show ()" , {
643
643
df <- jsonFile(sqlCtx , jsonPath )
644
- expect_output(showDF (df ), " +----+-------+\n | age| name|\n +----+-------+\n |null|Michael|\n | 30| Andy|\n | 19| Justin|\n +----+-------+\n " )
644
+ expect_output(show (df ), " +----+-------+\n | age| name|\n +----+-------+\n |null|Michael|\n | 30| Andy|\n | 19| Justin|\n +----+-------+\n " )
645
645
})
646
646
647
647
test_that(" isLocal()" , {
You can’t perform that action at this time.
0 commit comments