With With
[This article was first published on R Tips's blog, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
No that is not a typo in the title. In my programming a came across a solution that I thought was pretty cool. I have a function that basically takes two objects and passes the elements of the objects to another function as arguments. This is a pretty simple thing to do but can be painful to type everything out
f<-function(obj1,obj2){
g(obj1$a,obj1$b,obj1$c,obj2$x,obj2$y,obj2%z)
}
To leave a comment for the author, please follow the link and comment on their blog: R Tips's blog.
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.