@@ -147,46 +147,47 @@ setMethod("isLocal",
147147 callJMethod(x @ sdf , " isLocal" )
148148 })
149149
150- # ' show
150+ # ' showDF
151151# '
152152# ' Print the first numRows rows of a DataFrame
153153# '
154154# ' @param x A SparkSQL DataFrame
155155# ' @param numRows The number of rows to print. Defaults to 20.
156156# '
157- # ' @rdname show
157+ # ' @rdname showDF
158158# ' @export
159159# ' @examples
160160# '\dontrun{
161161# ' sc <- sparkR.init()
162162# ' sqlCtx <- sparkRSQL.init(sc)
163163# ' path <- "path/to/file.json"
164164# ' df <- jsonFile(sqlCtx, path)
165- # ' show (df)
165+ # ' showDF (df)
166166# '}
167- setMethod ("show ",
167+ setMethod ("showDF ",
168168 signature(x = " DataFrame" ),
169169 function (x , numRows = 20 ) {
170- callJMethod(x @ sdf , " showString" , numToInt(numRows ))
170+ s <- callJMethod(x @ sdf , " showString" , numToInt(numRows ))
171+ cat(s )
171172 })
172173
173- # ' showDF
174+ # ' show
174175# '
175176# ' Print the DataFrame column names and types
176177# '
177178# ' @param x A SparkSQL DataFrame
178179# '
179- # ' @rdname showDF
180+ # ' @rdname show
180181# ' @export
181182# ' @examples
182183# '\dontrun{
183184# ' sc <- sparkR.init()
184185# ' sqlCtx <- sparkRSQL.init(sc)
185186# ' path <- "path/to/file.json"
186187# ' df <- jsonFile(sqlCtx, path)
187- # ' showDF
188+ # ' show
188189# '}
189- setMethod ("showDF ", "DataFrame",
190+ setMethod ("show ", "DataFrame",
190191 function (object ) {
191192 cols <- lapply(dtypes(object ), function (l ) {
192193 paste(l , collapse = " :" )
0 commit comments