col_vec: Column Vectors

Description Usage Arguments Value Examples

View source: R/row_vec.R

Description

Constructs a column vector.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
col_vec(..., use.names = TRUE)

## Default S3 method:
col_vec(..., use.names = TRUE)

## S3 method for class 'matrix'
col_vec(..., use.names = TRUE)

## S3 method for class 'data.frame'
col_vec(..., use.names = TRUE)

Arguments

...

The elements of the columns vector.

use.names

Logical indicating whether or not names should be preserved.

Value

A row vector of dimension length(x) x 1.

Examples

1
2
3
4
5
6
col_vec(1:5)
col_vec(row_vec(1:5))

X <- matrix(rnorm(20), ncol = 2)
b <- col_vec(1.5, 3)
(yhat <- X %*% b)

bgreenwell/bmisc documentation built on Sept. 24, 2019, 11:09 a.m.