as.sq {tidysq}R Documentation

Convert an object to sq

Description

Takes an object of arbitrary type and returns an sq object as an output.

Usage

as.sq(x, ...)

## Default S3 method:
as.sq(x, ...)

## S3 method for class 'character'
as.sq(x, ...)

Arguments

x

[any] An object of a class that supports conversion to sq class.

...

further arguments to be passed from or to other methods.

Details

There are two possible cases: if x is a character vector, then this method calls sq function, else it passes x to import_sq and hopes it works.

Value

An sq object.

See Also

Functions from output module: as.character.sq(), as.matrix.sq(), export_sq(), write_fasta()

Examples

# Constructing an example sequence in the usual way:
sq_1 <- sq("CTGA")

# Using a method for character vector:
sq_2 <- as.sq("CTGA")

# Checking that both objects are identical:
identical(sq_1, sq_2)


[Package tidysq version 1.1.3 Index]