Event JSON
{
"id": "90326db979feb9208cbfb86ee6d36032b486fd32df82c7ec2c1f4a89a67b669f",
"pubkey": "96d78c6e675c0bac76b8c83c58ce80975d23785748803a185ed105f7cb03eb32",
"created_at": 1781118906,
"kind": 1,
"tags": [
[
"t",
"rlang"
],
[
"t",
"r"
],
[
"t",
"datascience"
],
[
"proxy",
"https://mastodon.social/@doctorambient/116727408641573122",
"web"
],
[
"t",
"dataanalysis"
],
[
"t",
"rstats"
],
[
"proxy",
"https://mastodon.social/users/doctorambient/statuses/116727408641573122",
"activitypub"
],
[
"L",
"pink.momostr"
],
[
"l",
"pink.momostr.activitypub:https://mastodon.social/users/doctorambient/statuses/116727408641573122",
"pink.momostr"
],
[
"-"
]
],
"content": "TIL (1) that R has a function called `dput()` that writes a text representation of an R object and (2) that a `c()` in an index will effectively flatten a mixture of indices. Hence:\n\n`dput(names(df)[c(1:4, 7)]`\n\nsolves the problem of picking out a list of column names from a data frame and turning that into an object ready to insert into code. 🙃\n\n#rlang #r #rstats #datascience #dataanalysis",
"sig": "cd9356264d55519d28b9abed68c552ed5a99fce803e0c4ec951ffce5145930fb587f717a33da35a307050158a2e3f08183afd042f64599bf788bffd6ee349603"
}