Comment: Search and Replace

January 7, 2013
By

(This article was first published on XRGB, and kindly contributed to R-bloggers)

A post in R bloggers caught my attention this morning. The main idea was that how can you change objects in a string. For example given a basket of fruits we would like to change apples to bananas by using R and the ifelse funtion. There are two main solutions how to change one object into another:#Given a basket of fruits basket = c("apple", "banana", "lemon", "orange", "orange", "pear", "

To leave a comment for the author, please follow the link and comment on his blog: XRGB.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.