INNER CODE UNIT · Python

_string_to_character_vector

briscverse/ryp · ryp.py:714

def _string_to_character_vector(string: str,
                                rmemory: _RMemory) -> _cffi_backend._CDataBase:
    """
    Convert a Python string into a length-1 R character vector.
    
    Args:
        string: a Python string
        rmemory: an instance of the _RMemory class

    Returns:
        A length-1 R character vector (STRSXP).
    """
    return _bytestring_to_character_vector(string.encode('utf-8'), rmemory)


def _call(function_call: _cffi_backend._CDataBase, rmemory: _RMemory,
          error_description: str, *,
          environment: _cffi_backend._CDataBase = None) -> \

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…