0

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>)
  • 4
    Change it to `%>%`. `%.%` is an old version of that, see: https://github.com/hadley/dplyr/releases/tag/v0.2.0 – Thomas K Apr 02 '17 at 20:16
  • Thank you, that solved the problem. Unfortunately I receive another error in the same line 22 –  Apr 02 '17 at 20:28
  • 2
    Please make your example [reproducible](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) by sharing some data. – Thomas K Apr 02 '17 at 20:32
  • Check the edit, I added some reproducible data. –  Apr 02 '17 at 20:56
  • R and rstudio are independent pieces of software. Please do not include the rstudio tag unless you have a question about it in particular. – lmo Apr 02 '17 at 21:24
  • 1
    I'm not going to debug all of that script... Please update your question, so it contains code to reproduce a single problem (the data you shared leads to other problems, not described in your question). – Thomas K Apr 02 '17 at 22:48

0 Answers0