3/14/2024 0 Comments For loop in r slowI'm trying to optimize this function using an apply function instead of a for loop, but am struggling to do so. However, as my dataset is huge with many rows, I realise that the for loop is taking too long to perform this request. # Bind the new vectors back to the dataframeĪnd when I want to encrypt the data, I just call this function as such: df <- encryptdata(df) Store the encrypted name, class and nonce SerializedName <- serialize(df$Name, NULL)Ĭipher <- data_encrypt(serializedName, key, rnonce) Generate a singular nonce for each row of data. # Loop through each row to encrypt the Name Column # Generate a list of 0 vectors based on nrows of df I currently have a function that does something like this: key <- "somespecialkey" I have a dataframe that looks like this which has over 30 thousand rows: ID Name AttrĪnd I am trying to encrypt certain columns of the dataframe using the sodium package.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |