I have the following dataset
df_temp$ID:
chr4 chr4 chr5 chr7 chr7 chr7
df_temp$value_beta:
0.01960784 0.01960784 0.01960784 0.00000000 0.00990099 0.01941748
df_temp$value_model:
0.7605 0.1261 4.3766 0.7605 0.1261 4.3766 ## which are repeated
I would like to extract only the unique values, such that
df_temp$ID:
chr4 chr4 chr5
df_temp$value_beta:
0.01960784 0.01960784 0.01960784
df_temp$value_model:
0.7605 0.1261 4.3766
To accomplish that I have started with the following code
df_temp_beta = data.frame("ID" = names(reduced_beta), "value_beta" = as.numeric(reduced_beta))
df_temp_model = data.frame("ID" = names(f$coefficients), "value_model" = as.numeric(f$coefficients))
df_temp <- full_join(df_temp_beta, df_temp_model, by = "ID")
unique(df_temp[, 2:3]) ## I get a memory error that says that it has reached max cappacity
algorithmically speaking this code seems completely inifficient and most likelly the error is not due to the memory max capacity but the algorithm that I have used