@eagleoutice/flowr - v2.10.4
    Preparing search index...

    Used to deal with the underlying input-output streams of the R process

    Index

    Constructors

    • Parameters

      • options: {
            commandLineOptions: readonly string[];
            cwd: string;
            env: { readonly [key: string]: string | undefined } | undefined;
            eol: string;
            homeLibPath: string | undefined;
            onRevive: (code: number, signal: string | null) => void;
            pathToRExecutable: string;
            revive: RShellReviveOptions;
            readonly [key: string]: unknown;
        }
        • readonly [key: string]: unknown
        • ReadonlycommandLineOptions: readonly string[]

          Command line options to use when starting the R session.

        • Readonlycwd: string

          The current working directory of the R session.

        • Readonlyenv: { readonly [key: string]: string | undefined } | undefined

          The environment variables available in the R session.

        • Readonlyeol: string

          The character to use to mark the end of a line. Is probably always \n (even on windows).

        • ReadonlyhomeLibPath: string | undefined

          The path to the library directory, use undefined to let R figure that out for itself

        • ReadonlyonRevive: (code: number, signal: string | null) => void

          Called when the R session is restarted, this makes only sense if revive is not set to 'never'

        • ReadonlypathToRExecutable: string

          The path to the R executable, can be only the executable if it is to be found on the PATH.

        • Readonlyrevive: RShellReviveOptions

          If set, the R session will be restarted if it exits due to an error

      • log: Logger<ILogObj>

      Returns RShellSession

    Methods

    • Collect lines from the selected streams until the given condition is met or the timeout is reached

      This method does allow other listeners to consume the same input

      Parameters

      • from: OutputStreamSelector

        The stream(s) to collect the information from

      • until: CollectorUntil

        If the predicate returns true, this will stop the collection and resolve the promise

      • timeout: CollectorTimeout

        Configuration for how and when to timeout

      • Optionalaction: () => void

        Event to be performed after all listeners are installed, this might be the action that triggers the output you want to collect

      Returns Promise<string[]>

    • close the current R session, makes the object effectively invalid (can no longer be reopened etc.)

      Parameters

      • OptionalfilesToUnlink: readonly string[]

        If set, these files will be unlinked before closing the session (e.g., to clean up tempfiles)

      Returns boolean

      true if the kill succeeds, false otherwise

      RShell#close

    • Parameters

      • callback: (code: number, signal: string | null) => void

      Returns void