ch.getRowsByColItemsFiles: A function to extract the rows in FileA that contain the...

ch.getRowsByColItemsFilesR Documentation

A function to extract the rows in FileA that contain the elements in FileB.

Description

This function extracts the rows in FileA that contain the elements in FileB. FileA is a dataframe and FileB is a vector.

Usage

ch.getRowsByColItemsFiles(datafile, itemColName, colItemFile, saveFile = NULL)

Arguments

datafile

a string specifying the name of the file containing the vector of elements used to identify the rows to extract from the datafile (i.e., FileB).

itemColName

a string specifying the column name in the datafile that contains the items to be matched.

colItemFile

a file containing a dataframe (i.e., FileA).

saveFile

a string specifying the name of the file to save the output. DEFAULT = NULL (no output).

Value

a dataframe containing the extracted rows.

Examples

ch.getRowsByColItemsFiles ("myfile.txt", "prompt", "myItems.txt", "myOutput.txt")

ccpluncw/ccpl_R_chutils documentation built on Feb. 28, 2024, 1:17 a.m.