Skip to content

Instantly share code, notes, and snippets.

@NaridaL
Created August 8, 2017 21:58
Show Gist options
  • Save NaridaL/b4cdc575cc62ed4496adb335e5213c72 to your computer and use it in GitHub Desktop.
Save NaridaL/b4cdc575cc62ed4496adb335e5213c72 to your computer and use it in GitHub Desktop.
declare module 'r-script' {
interface R {
data(...args: any[]): this
call(callback: (err: any, d: any) => void): void
call(options: R.Options, callback: (err: any, d: any) => void): void
callSync(options: R.Options): any
}
namespace R {
interface Options {
dataframe?: 'rows' | 'colums' | 'values'
matrix?: 'rowmajor' | 'columnmajor'
Date?: "ISO8601" | "epoch"
POSIXt?: "string" | "ISO8601" | "epoch" | "mongo"
factor?: "string" | "integer"
complex?: "string" | "list"
raw?: "base64" | "hex" | "mongo"
null?: "list" | "null"
na?: "null" | "string"
auto_unbox?: boolean
digits?: number
pretty?: boolean
force?: boolean
[key: string]: any
}
}
function R(scriptPath: string): R
export = R
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment