[SPARK-24537][R] Add array_remove / array_zip / map_from_arrays / array_distinct
[spark.git] / R / pkg / NAMESPACE
1 #
2 # Licensed to the Apache Software Foundation (ASF) under one or more
3 # contributor license agreements.  See the NOTICE file distributed with
4 # this work for additional information regarding copyright ownership.
5 # The ASF licenses this file to You under the Apache License, Version 2.0
6 # (the "License"); you may not use this file except in compliance with
7 # the License.  You may obtain a copy of the License at
8 #
9 #    http://www.apache.org/licenses/LICENSE-2.0
10 #
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16 #
17
18 # Imports from base R
19 # Do not include stats:: "rpois", "runif" - causes error at runtime
20 importFrom("methods", "setGeneric", "setMethod", "setOldClass")
21 importFrom("methods", "is", "new", "signature", "show")
22 importFrom("stats", "gaussian", "setNames")
23 importFrom("utils", "download.file", "object.size", "packageVersion", "tail", "untar")
24
25 # Disable native libraries till we figure out how to package it
26 # See SPARKR-7839
27 #useDynLib(SparkR, stringHashCode)
28
29 # S3 methods exported
30 export("sparkR.session")
31 export("sparkR.init")
32 export("sparkR.stop")
33 export("sparkR.session.stop")
34 export("sparkR.conf")
35 export("sparkR.version")
36 export("sparkR.uiWebUrl")
37 export("print.jobj")
38
39 export("sparkR.newJObject")
40 export("sparkR.callJMethod")
41 export("sparkR.callJStatic")
42
43 export("install.spark")
44
45 export("sparkRSQL.init",
46        "sparkRHive.init")
47
48 # MLlib integration
49 exportMethods("glm",
50               "spark.glm",
51               "predict",
52               "summary",
53               "spark.kmeans",
54               "fitted",
55               "spark.mlp",
56               "spark.naiveBayes",
57               "spark.survreg",
58               "spark.lda",
59               "spark.posterior",
60               "spark.perplexity",
61               "spark.isoreg",
62               "spark.gaussianMixture",
63               "spark.als",
64               "spark.kstest",
65               "spark.logit",
66               "spark.decisionTree",
67               "spark.randomForest",
68               "spark.gbt",
69               "spark.bisectingKmeans",
70               "spark.svmLinear",
71               "spark.fpGrowth",
72               "spark.freqItemsets",
73               "spark.associationRules")
74
75 # Job group lifecycle management methods
76 export("setJobGroup",
77        "clearJobGroup",
78        "cancelJobGroup",
79        "setJobDescription",
80        "setLocalProperty",
81        "getLocalProperty")
82
83 # Export Utility methods
84 export("setLogLevel")
85
86 exportClasses("SparkDataFrame")
87
88 exportMethods("arrange",
89               "as.data.frame",
90               "attach",
91               "broadcast",
92               "cache",
93               "checkpoint",
94               "coalesce",
95               "collect",
96               "colnames",
97               "colnames<-",
98               "coltypes",
99               "coltypes<-",
100               "columns",
101               "count",
102               "cov",
103               "corr",
104               "covar_samp",
105               "covar_pop",
106               "createOrReplaceTempView",
107               "crossJoin",
108               "crosstab",
109               "cube",
110               "dapply",
111               "dapplyCollect",
112               "describe",
113               "dim",
114               "distinct",
115               "drop",
116               "dropDuplicates",
117               "dropna",
118               "dtypes",
119               "except",
120               "explain",
121               "fillna",
122               "filter",
123               "first",
124               "freqItems",
125               "gapply",
126               "gapplyCollect",
127               "getNumPartitions",
128               "group_by",
129               "groupBy",
130               "head",
131               "hint",
132               "insertInto",
133               "intersect",
134               "isLocal",
135               "isStreaming",
136               "join",
137               "limit",
138               "localCheckpoint",
139               "merge",
140               "mutate",
141               "na.omit",
142               "names",
143               "names<-",
144               "ncol",
145               "nrow",
146               "orderBy",
147               "persist",
148               "printSchema",
149               "randomSplit",
150               "rbind",
151               "registerTempTable",
152               "rename",
153               "repartition",
154               "repartitionByRange",
155               "rollup",
156               "sample",
157               "sample_frac",
158               "sampleBy",
159               "saveAsParquetFile",
160               "saveAsTable",
161               "saveDF",
162               "schema",
163               "select",
164               "selectExpr",
165               "show",
166               "showDF",
167               "storageLevel",
168               "subset",
169               "summarize",
170               "summary",
171               "take",
172               "toJSON",
173               "transform",
174               "union",
175               "unionAll",
176               "unionByName",
177               "unique",
178               "unpersist",
179               "where",
180               "with",
181               "withColumn",
182               "withColumnRenamed",
183               "withWatermark",
184               "write.df",
185               "write.jdbc",
186               "write.json",
187               "write.orc",
188               "write.parquet",
189               "write.stream",
190               "write.text",
191               "write.ml")
192
193 exportClasses("Column")
194
195 exportMethods("%<=>%",
196               "%in%",
197               "abs",
198               "acos",
199               "add_months",
200               "alias",
201               "approxCountDistinct",
202               "approxQuantile",
203               "array_contains",
204               "array_distinct",
205               "array_join",
206               "array_max",
207               "array_min",
208               "array_position",
209               "array_remove",
210               "array_repeat",
211               "array_sort",
212               "arrays_overlap",
213               "arrays_zip",
214               "asc",
215               "ascii",
216               "asin",
217               "atan",
218               "atan2",
219               "avg",
220               "base64",
221               "between",
222               "bin",
223               "bitwiseNOT",
224               "bround",
225               "cast",
226               "cbrt",
227               "ceil",
228               "ceiling",
229               "collect_list",
230               "collect_set",
231               "column",
232               "concat",
233               "concat_ws",
234               "contains",
235               "conv",
236               "cos",
237               "cosh",
238               "count",
239               "countDistinct",
240               "crc32",
241               "create_array",
242               "create_map",
243               "current_date",
244               "current_timestamp",
245               "hash",
246               "cume_dist",
247               "date_add",
248               "date_format",
249               "date_sub",
250               "date_trunc",
251               "datediff",
252               "dayofmonth",
253               "dayofweek",
254               "dayofyear",
255               "decode",
256               "dense_rank",
257               "desc",
258               "element_at",
259               "encode",
260               "endsWith",
261               "exp",
262               "explode",
263               "explode_outer",
264               "expm1",
265               "expr",
266               "factorial",
267               "first",
268               "flatten",
269               "floor",
270               "format_number",
271               "format_string",
272               "from_json",
273               "from_unixtime",
274               "from_utc_timestamp",
275               "getField",
276               "getItem",
277               "greatest",
278               "grouping_bit",
279               "grouping_id",
280               "hex",
281               "histogram",
282               "hour",
283               "hypot",
284               "ifelse",
285               "initcap",
286               "input_file_name",
287               "instr",
288               "isNaN",
289               "isNotNull",
290               "isNull",
291               "is.nan",
292               "isnan",
293               "kurtosis",
294               "lag",
295               "last",
296               "last_day",
297               "lead",
298               "least",
299               "length",
300               "levenshtein",
301               "like",
302               "lit",
303               "locate",
304               "log",
305               "log10",
306               "log1p",
307               "log2",
308               "lower",
309               "lpad",
310               "ltrim",
311               "map_entries",
312               "map_from_arrays",
313               "map_keys",
314               "map_values",
315               "max",
316               "md5",
317               "mean",
318               "min",
319               "minute",
320               "monotonically_increasing_id",
321               "month",
322               "months_between",
323               "n",
324               "n_distinct",
325               "nanvl",
326               "negate",
327               "next_day",
328               "not",
329               "ntile",
330               "otherwise",
331               "over",
332               "percent_rank",
333               "pmod",
334               "posexplode",
335               "posexplode_outer",
336               "quarter",
337               "rand",
338               "randn",
339               "rank",
340               "regexp_extract",
341               "regexp_replace",
342               "repeat_string",
343               "reverse",
344               "rint",
345               "rlike",
346               "round",
347               "row_number",
348               "rpad",
349               "rtrim",
350               "second",
351               "sha1",
352               "sha2",
353               "shiftLeft",
354               "shiftRight",
355               "shiftRightUnsigned",
356               "sd",
357               "sign",
358               "signum",
359               "sin",
360               "sinh",
361               "size",
362               "skewness",
363               "slice",
364               "sort_array",
365               "soundex",
366               "spark_partition_id",
367               "split_string",
368               "stddev",
369               "stddev_pop",
370               "stddev_samp",
371               "struct",
372               "sqrt",
373               "startsWith",
374               "substr",
375               "substring_index",
376               "sum",
377               "sumDistinct",
378               "tan",
379               "tanh",
380               "toDegrees",
381               "toRadians",
382               "to_date",
383               "to_json",
384               "to_timestamp",
385               "to_utc_timestamp",
386               "translate",
387               "trim",
388               "trunc",
389               "unbase64",
390               "unhex",
391               "unix_timestamp",
392               "upper",
393               "var",
394               "variance",
395               "var_pop",
396               "var_samp",
397               "weekofyear",
398               "when",
399               "window",
400               "year")
401
402 exportClasses("GroupedData")
403 exportMethods("agg")
404 exportMethods("pivot")
405
406 export("as.DataFrame",
407        "cacheTable",
408        "clearCache",
409        "createDataFrame",
410        "createExternalTable",
411        "createTable",
412        "currentDatabase",
413        "dropTempTable",
414        "dropTempView",
415        "jsonFile",
416        "listColumns",
417        "listDatabases",
418        "listFunctions",
419        "listTables",
420        "loadDF",
421        "parquetFile",
422        "read.df",
423        "read.jdbc",
424        "read.json",
425        "read.orc",
426        "read.parquet",
427        "read.stream",
428        "read.text",
429        "recoverPartitions",
430        "refreshByPath",
431        "refreshTable",
432        "setCheckpointDir",
433        "setCurrentDatabase",
434        "spark.lapply",
435        "spark.addFile",
436        "spark.getSparkFilesRootDirectory",
437        "spark.getSparkFiles",
438        "sql",
439        "str",
440        "tableToDF",
441        "tableNames",
442        "tables",
443        "uncacheTable",
444        "print.summary.GeneralizedLinearRegressionModel",
445        "read.ml",
446        "print.summary.KSTest",
447        "print.summary.DecisionTreeRegressionModel",
448        "print.summary.DecisionTreeClassificationModel",
449        "print.summary.RandomForestRegressionModel",
450        "print.summary.RandomForestClassificationModel",
451        "print.summary.GBTRegressionModel",
452        "print.summary.GBTClassificationModel")
453
454 export("structField",
455        "structField.jobj",
456        "structField.character",
457        "print.structField",
458        "structType",
459        "structType.character",
460        "structType.jobj",
461        "structType.structField",
462        "print.structType")
463
464 exportClasses("WindowSpec")
465
466 export("partitionBy",
467        "rowsBetween",
468        "rangeBetween")
469
470 export("windowPartitionBy",
471        "windowOrderBy")
472
473 exportClasses("StreamingQuery")
474
475 export("awaitTermination",
476        "isActive",
477        "lastProgress",
478        "queryName",
479        "status",
480        "stopQuery")
481
482
483 S3method(print, jobj)
484 S3method(print, structField)
485 S3method(print, structType)
486 S3method(print, summary.GeneralizedLinearRegressionModel)
487 S3method(print, summary.KSTest)
488 S3method(print, summary.DecisionTreeRegressionModel)
489 S3method(print, summary.DecisionTreeClassificationModel)
490 S3method(print, summary.RandomForestRegressionModel)
491 S3method(print, summary.RandomForestClassificationModel)
492 S3method(print, summary.GBTRegressionModel)
493 S3method(print, summary.GBTClassificationModel)
494 S3method(structField, character)
495 S3method(structField, jobj)
496 S3method(structType, character)
497 S3method(structType, jobj)
498 S3method(structType, structField)