I want to replicate this :https://gist.github.com/jdavidson/11130754
But I am receiving the following error:
Error: could not find function "%.%"
EDIT
changing it to %>% solved the problem.
Now I receive another error:
Error in n() : This function should not be called directly
Solution I solved this error by adding dplyr::
dplyr::summarise(companies=n(),...
Here is reproducible data:
structure(list(company_permalink = c("/organization/-fame","/organization/hashoff", "/organization/waywire", "/organization/tv-communications", "/organization/tv-communications"), company_name = c("#fame", "#HASHOFF", "#waywire", "&TV Communications","&TV Communications"), company_category_list = c("|Media|", "|Digital Media|Internet|Social Media|","|Entertainment|Politics|Social Media|News|", "|Games|", "|Games|"), company_market = c("Media", "Digital Media", "News", "Games","Games"), company_country_code = c("IND", "USA", "USA", "USA", "USA"), company_state_code = c("", "CO", "NY", "CA", "CA"), company_region = c("Mumbai", "Denver", "New York City", "Los Angeles", "Los Angeles"), company_city = c("Mumbai", "Denver", "New York", "Los Angeles", "Los Angeles"), funding_round_permalink = c("/funding-round/9a01d05418af9f794eebff7ace91f638", "/funding-round/669d6203c0374e6cf0e8d10f75ba0b8a", "/funding-round/cc409188fa2b63482bd9008f682c2efa", "/funding-round/86d22afc65107b6941e6c43c671ecbb8", "/funding-round/59a3669a64e39360c2b939300bcda162"), funding_round_type = c("venture", "debt_financing", "seed", "venture", "venture"), funding_round_code = c("B", "", "", "", ""), funded_at = c("2015-01-05", "2014-12-08", "2012-06-30", "2010-06-04", "2010-09-23"), funded_month = c("2015-01", "2014-12", "2012-06", "2010-06", "2010-09"), funded_quarter = c("2015-Q1", "2014-Q4", "2012-Q2", "2010-Q2", "2010-Q3"), funded_year = c(2015L, 2014L, 2012L, 2010L, 2010L), raised_amount_usd = c(" \t10.000.000 ", " \t455.000 ", " \t1.750.000 ", " \t1.000.000 ", " \t3.000.000 "), X = c(NA, NA, NA, NA, NA)), .Names = c("company_permalink", "company_name", "company_category_list", "company_market", "company_country_code", "company_state_code", "company_region", "company_city", "funding_round_permalink", "funding_round_type", "funding_round_code", "funded_at", "funded_month", "funded_quarter", "funded_year", "raised_amount_usd", "X"), class = c("data.table", "data.frame"), row.names = c(NA, -5L), .internal.selfref = <pointer: 0x10180d178>)