SparkR (version 2.1.2)

attach: Attach SparkDataFrame to R search path

Description

The specified SparkDataFrame is attached to the R search path. This means that the SparkDataFrame is searched by R when evaluating a variable, so columns in the SparkDataFrame can be accessed by simply giving their names.

Usage

attach(what, pos = 2L, name = deparse(substitute(what)),
  warn.conflicts = TRUE)

# S4 method for SparkDataFrame attach(what, pos = 2, name = deparse(substitute(what)), warn.conflicts = TRUE)

Arguments

what

(SparkDataFrame) The SparkDataFrame to attach

pos

(integer) Specify position in search() where to attach.

name

(character) Name to use for the attached SparkDataFrame. Names starting with package: are reserved for library.

warn.conflicts

(logical) If TRUE, warnings are printed about conflicts from attaching the database, unless that SparkDataFrame contains an object

See Also

detach

Other SparkDataFrame functions: SparkDataFrame-class, agg, arrange, as.data.frame, cache, coalesce, collect, colnames, coltypes, createOrReplaceTempView, crossJoin, dapplyCollect, dapply, describe, dim, distinct, dropDuplicates, dropna, drop, dtypes, except, explain, filter, first, gapplyCollect, gapply, getNumPartitions, group_by, head, histogram, insertInto, intersect, isLocal, join, limit, merge, mutate, ncol, nrow, persist, printSchema, randomSplit, rbind, registerTempTable, rename, repartition, sample, saveAsTable, schema, selectExpr, select, showDF, show, storageLevel, str, subset, take, union, unpersist, withColumn, with, write.df, write.jdbc, write.json, write.orc, write.parquet, write.text

Examples

Run this code
# NOT RUN {
attach(irisDf)
summary(Sepal_Width)
# }

Run the code above in your browser using DataLab