I would like to find the number of unique company name from data frame:
/organization/-fame
/ORGANIZATION/-QOUNTER
/organization/-qounter
/ORGANIZATION/-THE-ONE-OF-THEM-INC-
/ORGANIZATION/0NDINE-BIOMEDICAL-INC
/organization/0ndine-biomedical-inc
I have separated the company name above using the split
function,
split_prod <- str_split_fixed(rounds2$company_permalink,"/", 4)
and converted into a new data frame:
companyname <- data.frame(split_prod, stringsAsFactors = FALSE)
I got the output in four columns as mentioned below:
X1 X2 X3 X4
organization -fame
ORGANIZATION -QOUNTER
organization -qounter
ORGANIZATION -THE-ONE-OF-THEM-INC-
organization 0-6-com
ORGANIZATION 004-TECHNOLOGIES
organization 01games-technology
ORGANIZATION 0NDINE-BIOMEDICAL-INC
organization 0ndine-biomedical-inc
How can I calculate the number of unique company name now? I have tried:
`distinct(rounds$X3)` ----- not working
`length(unique(rounds$X3)` --- wrong output number i m getting.
Please help. Also, I m not sure the way I used the split function is correct or not. Particularity I m concerning about the number "4". I have calculated this number as slash, organization, company name, slash so tried to separate into four columns.