I have the dataframe below:
Name<-c("BO","DF","FG","GH","BO","DF")
Target<-c("sd","vc","vc","dd","sd","jk")
NT<-data.frame(Name,Target)
From this dataframe I want to extract the unique values of the Name
and then count how many Target
each unique Name
has in order to create a second dataframe like:
Name NumberofTargets
1 BO 1
2 DF 2
3 FG 1
4 GH 1