turn_values_randomly: Randomly Turn Values In A Matrix

View source: R/analysis.R

turn_values_randomlyR Documentation

Randomly Turn Values In A Matrix

Description

Turns x% of 1 into 2 and y% 1 into 0 to mimick expert's desagreement.

Usage

turn_values_randomly(data_links, percentage, binary = TRUE)

Arguments

data_links

a dataframe with links bewteen targets -in columns- and NCS -in rows-, use sheets_to_df

percentage

percentage -from 0 to 1- of values that match to be replaced

binary

if statement to turn all values 2 into values 1 for binary analysis

Value

a dataframe with modified values for a given number of matrices


GaelMariani/NCSSDGproj documentation built on April 1, 2024, 9:18 a.m.