Skip to main content
5 events
when toggle format what by license comment
Apr 5, 2025 at 20:41 comment added Friede We have make.unique: "Makes the elements of a character vector unique by appending sequence numbers to duplicates." With rep it is concise, easy to understand, complete. It's already suggested. With vapply(), as.vector(), c(), paste0() we add functions which are not needed or redundand for the given case. "At least it brings vapply back to mind and shows how to turn a matrix into a vector." seems to confirm my impression. Sometimes answers are written to answer questions and and sometimes they are written to write one. I strongly recommend to use make.unique() + rep().
Apr 5, 2025 at 19:43 history edited zephryl CC BY-SA 4.0
added 1 character in body
Apr 5, 2025 at 19:29 comment added TarJae @Friede That is at your discretion whether you consider it useful or not. Just comment. You are not in a position to give the OP advice on what they should do. So stop preventing users from participating here and creating a productive environment. At least it brings vapply back to mind and shows how to turn a matrix into a vector. So I think it's great—otherwise, I wouldn’t have posted it!
S Apr 5, 2025 at 18:53 history answered TarJae CC BY-SA 4.0
S Apr 5, 2025 at 18:53 history notice added TarJae Posted by Recognized Member/Admin in R Language