nlp_topics_translate: NLP Topics Translator

View source: R/nlp_translators.R

nlp_topics_translateR Documentation

NLP Topics Translator

Description

It will read the score code that is written as SAS Code extract the astore and hostame information, then write an R code equivalent in SWAT.

Usage

nlp_topics_translate(
  in_file = NULL,
  out_file = "topicsScoreCode.R",
  zip = TRUE,
  in_caslib,
  in_castable,
  out_caslib,
  out_castable,
  hostname = NULL,
  copyVars = NULL
)

Arguments

in_file

Path to zip/sas file with the score code.

out_file

Path to the translated .R code file.

zip

Boolean, if the score code is inside a zip file. Default to TRUE. It will look for dmcas_epscorecode.sas file inside the zip.

in_caslib

caslib name of the input table

in_castable

input table name

out_caslib

caslib name of the output table

out_castable

name of the output table

hostname

NULL by default, extracts the server name from scoring code file.

copyVars

default NULL, will not copy variables to the output. If "ALL" will copy all variables to the scored table output, if it is a vector, will copy named vars e.g: ⁠c("var1", "var2)⁠

Value

List object with the Rscore code, out castable, out caslib and the written file path.

Examples

nlp_topics_translate("filepath.zip")


sassoftware/sas-scoring-translator-r documentation built on Dec. 7, 2023, 11:55 p.m.