BSkysaveDataset: Save a memory dataset to a file

View source: R/UA_UI_Functions.R

BSkysaveDatasetR Documentation

Save a memory dataset to a file

Description

saves a BlueSky Statistics UI datagrid loaded dataset to the supported file formats. [supported file formats : .SAV, .SAS7BDAT, .DTA, .XLSX, .CSV, .RDATA, and .DBF]

Usage

BSkysaveDataset(
  fullpathfilename,
  filetype,
  Rownames = TRUE,
  Colnames = FALSE,
  newWorksheetName = NULL,
  factor2char = TRUE,
  dataSetNameOrIndex
)

Arguments

fullpathfilename

is a full path filename of a disk file to which will dataset will be written. Use forward slash as path separator.

filetype

is the file format you want to save to. It must be one of the ("XLSX", "CSV", "DBF", "RDATA", "SAV", "SAS7BDAT", "DTA").

newWorksheetName

is the name of the excel worksheet. Used only when saving to an Excel file format.

dataSetNameOrIndex

is a name of the dataset that already loaded in the BlueSky Statistics UI datagrid. Use single quotes around dataset name.

Examples

df <-data.frame(A=c(1,2,3), B=c(4,5,6), C=c(6,7,8))
BSkyLoadRefresh('df') #dataframe must be loaded in the grid before you try to save it to different formats.
BSkysaveDataset("D:/mytestdata.rdata", filetype="RDATA", dataSetNameOrIndex='df')

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