Versions in this module Expand all Collapse all v2 v2.0.0 Apr 5, 2022 Changes in this version + var ImpossibleMatrix = errors.New("matrix size and underlying data length are not compatible") + var IndexOutOfBounds = errors.New("index is out of bounds (ie too large)") + var InvalidIndex = errors.New("given index is impossible (ie < 0)") + var LengthMismatch = errors.New("lengths of provided inputs are not the same") + var NotASEXP = errors.New("non-SEXP object provided to a function that needs a SEXP") + var SizeMismatch = errors.New("operation is not possible with given input dimensions") + var TypeMismatch = errors.New("input SEXP type does not match desired output type") + var UnsupportedType = errors.New("type provided is not currently supported in Rgo for this operation") + func AreMatricesEqual(A, B Matrix) bool + func AreMatricesEqualTol(A, B Matrix, tolerance float64) bool + func AsCharacter(r RSEXP) (out []t, err error) + func AsNumeric(r RSEXP) (out []t, err error) + func ExportRSEXP(r *RSEXP) (out t, err error) + func LENGTH(r RSEXP) int + type Matrix struct + Data []float64 + Ncol int + Nrow int + func AsMatrix(r RSEXP) (out Matrix, err error) + func CopyMatrix(in Matrix) (out Matrix) + func CreateIdentity(size int) (*Matrix, error) + func CreateZeros(Nrow, Ncol int) (*Matrix, error) + func MatrixAdd(A, B *Matrix) (C *Matrix, err error) + func MatrixMultiply(A, B *Matrix) (C *Matrix, err error) + func NewMatrix(Nrow, Ncol int, data []float64) (*Matrix, error) + func (m *Matrix) AddConstant(c float64) + func (m *Matrix) AppendCol(data []float64) error + func (m *Matrix) AppendRow(data []float64) error + func (m *Matrix) CreateTranspose() *Matrix + func (m *Matrix) GetCol(ind int) ([]float64, error) + func (m *Matrix) GetInd(row, col int) (float64, error) + func (m *Matrix) GetRow(ind int) ([]float64, error) + func (m *Matrix) MultiplyConstant(c float64) + func (m *Matrix) SetCol(ind int, data []float64) error + func (m *Matrix) SetInd(row, col int, data float64) error + func (m *Matrix) SetRow(ind int, data []float64) error + type RCharacter interface + type RNumeric interface + type RSEXP C.SEXP + func CharacterToRSEXP(in []t) *RSEXP + func MakeDataFrame(rowNames, colNames []string, dataColumns ...*RSEXP) (*RSEXP, error) + func MakeList(in ...*RSEXP) *RSEXP + func MakeNamedList(names []string, data ...*RSEXP) (*RSEXP, error) + func MatrixToRSEXP(in Matrix) *RSEXP + func NewRSEXP(in any) (r RSEXP, err error) + func NumericToRSEXP(in []t) *RSEXP + type RSEXPTYPE int + const CHARSXP + const INTSXP + const REALSXP + const STRSXP + const VECSXP + func TYPEOF(r RSEXP) RSEXPTYPE