BSkyloadDataset: Load dataset

View source: R/UA_UI_Functions.R

BSkyloadDatasetR Documentation

Load dataset

Description

loads a dataset into R by reading data from a disk file. When this function is executed from BlueSky R Command Editor it loads the dataset in the UI datagrid. [supported file types : .SAV, .XLSX, .XLS, .CSV, .SAS7BDAT, .DTA, .RDATA, .DBF, and .DAT]

Usage

BSkyloadDataset(
  fullpathfilename,
  filetype,
  worksheetName = NULL,
  replace_ds = FALSE,
  load.missing = FALSE,
  csvHeader = TRUE,
  character.to.factor = FALSE,
  isBasketData = FALSE,
  trimSPSStrailing = FALSE,
  sepChar = ",",
  deciChar = ".",
  datasetName,
  encoding = NULL
)

Arguments

fullpathfilename

is a full path filename of a disk file, that is to be loaded into R. Use forward slash as a path separator.

filetype

is one of the ("SPSS", "SAS7BDAT", "DTA", "XLS", "XLSX", "CSV", "DBF", "RDATA" and "DAT").

worksheetName

is the name of the worksheet. Used only when reading Excel file type.

datasetName

is a name of the object in R that corresponds to the dataset you have loaded.

Parameters replace_ds, load.missing, csvHeader are for internal use.

Examples

fullpathfilename <- 'C:/BlueSky Statistics/Sample Datasets/Sample R Datasets(.rdata)/caranalysis.RData'
BSkyloadDataset(fullpathfilename=fullpathfilename, filetype <- 'RDATA', datasetName <- 'rdataset')
BSkyLoadRefresh(rdataset)

fullpathfilename <- 'C:/BlueSky Statistics/Sample Datasets/Excel/sample.xls'
BSkyloadDataset(fullpathfilename=fullpathfilename, filetype <- 'XLS', worksheetName = 'Sheet1', datasetName <- 'exceldata')
BSkyLoadRefresh(exceldata)

BlueSkyStatistics/BlueSky documentation built on April 14, 2025, 7:39 a.m.