##rename
tmp <- example
## back to class data.frame
class(tmp) <- 'data.frame'
## back again to the 'profile.data.frame' class
profile.data <- build.profile(tmp)
## if the table is not complete, we remove the Profile column
tmp2 <- tmp[,-1]
##running the following will return a warning
profile.data <- build.profile(tmp2)
##and Profile column is NA
head(profile.data)
##
Profile <- tmp[,1]
##check information in output when we add the Profile vector
profile.data <- build.profile(tmp2, Profile=Profile)
Run the code above in your browser using DataLab