Learn R Programming

IPDFileCheck

IPDFileCheck is a package that can be used to check the data file from a randomised clinical trial (RCT). The standard checks on data file from RCT will be of the following

  1. To check the file exists and readable
  2. To check if the column exists,
  3. To get the column number if the column name is known,
  4. To test column contents ie do they contain specific items in a given list?
  5. To test column names of a data being different from what specified,
  6. To check the format of column 'age' in data
  7. To check the format of column 'gender' in data
  8. To check the format of column contents -numeric or string
  9. To return the column number if the pattern is contained in the colnames of a data
  10. To return descriptive statistics, sum, no of observations, mean, mode. median, range, standard deviation and standard error
  11. To present the mean and sd of a data set in the form Mean (SD)
  12. To return a subgroup when certain variable equals the given value while omitting those with NA
  13. To find the number and percentages of categories
  14. To calculate age from date of birth and year of birth

There are some other helper functions included. Usage See the User Guide Vignette for examples on using the package Installation Latest release can be installed from www.github.com/sheejamk/ipdfilecheck

Copy Link

Version

Install

install.packages('IPDFileCheck')

Monthly Downloads

140

Version

0.8.1

License

GPL-3

Maintainer

Sheeja Manchira Krishnan

Last Published

March 8th, 2024

Functions in IPDFileCheck (0.8.1)

get_summary_gtsummary

Function to return the summary table using gtsummary package
keep_required_columns

############################################################################ Function to keep only certain variables
represent_categorical_data_exclude_missing

Function to find the number and percentages of categories
represent_categorical_data_forsubgroups

Function to find the number and percentages of categories
present_mean_sd_rmna_text

############################################################################ Function to present the mean and sd of a data set in the form Mean (SD)
get_columnno_fornames

Function to return the column number for column name
convert_date_string_stdform

Helper function to keep date formats in year-month-date
get_colno_pattern_colname

Function to return the column number if a given pattern is contained in the column names of a data
cohensd

Function to find the effect size Cohen's d
get_contents_cols

Function to return the unique contents of the column given the column name
get_effect_size

Function to get the effect size
represent_numerical_data_forsubgroups

Function to find the number and percentages of categories
return_longitudinal_summary

Function to get the longitudinal summary mean and sd
get_sem

############################################################################ Function to estimate standard error of the mean
descriptive_stats_col_excl_nrcode

Function to return descriptive statistics, sum, no of observations, mean, mode. median, range, standard deviation and standard error
get_mode_from_vector

############################################################################ Function to return mode
test_age

Function to check the format of 'age' in data
test_column_contents

Function to check the format of column contents
represent_categorical_data_include_missing

Function to find the number and percentages of categories
represent_categorical_textdata

Function to represent categorical data in the form - numbers (percentage)
test_columnnames

Function to test column names of a data being different from what specified
test_file_exist_read

Function to throw error on invalid directory or file and if not readable
return_subgroup_omitna

Function to return a subgroup when certain variable equals the given value while omitting those with NA
return_subgroup_withNA

Function to return a subgroup when certain variable equals the given value while omitting those with NA
get_value_from_codes

Function to get the actual value of column content if its coded
test_data_string_restriction

Function to check the format of a string column when the string values are given
test_gender

Function to check the format of 'gender' column in data
test_data_numeric_norange

Function to check the format of a numeric column when the values are not bounded
test_data_numeric

Function to check the format of a numeric column
test_data_string

Function to check the format of a string column
convert_date_numeric_stdform

Helper function to keep date formats in year-month-date
calculate_age_from_dob

Function to calculate age from date of birth
check_col_pattern_colname

############################################################################ Function to check if a given pattern is contained in the column names of a data
convert_to_number

Function that convert a number represented as character array
check_column_exists

Function to check the given column exists
calculate_age_from_year

Function to calculate age from year of birth
check_load_packages

Function to check the package is installed, if not install