Learn R Programming

LLIC (version 3.0.0)

data_pc: Data Processing for LLIC Analysis

Description

This function processes the data generated for the LLIC analysis, including filtering, mutation, and selection of specific columns.

Usage

data_pc(data)

Value

A data frame with the following columns:

X1

The filtered values of the original `X1` column, keeping only rows where `X1 <= 2`.

X2

The original `X2` column.

X1_squared

A new column containing the square of the `X1` values.

Arguments

data

A data frame containing the raw data generated for the LLIC analysis.

Examples

Run this code
set.seed(12)
library(dplyr)
library(VGAM)
raw_data <- data.frame(
  X1 = sample(1:3, 1200, replace = TRUE),
  X2 = sample(1:3, 1200, replace = TRUE),
  X3 = sample(1:3, 1200, replace = TRUE),
  X4 = sample(1:3, 1200, replace = TRUE),
  X5 = sample(1:3, 1200, replace = TRUE),
  Y = rlaplace(1200, 0, 1)
)
processed_data <- data_pc(raw_data)

Run the code above in your browser using DataLab