Hi ! I'm new to R studio and I'm only using the programme as per the requirements of my final year research project. We are hoping to analyse the somatic mutation data available on the ICGC website by creating a waterfall plot. However, upon converting the file to MAF format and entering the code:
waterfall(icgc_maf, fileType = "MAF")
R studio yields:
Checking if input is properly formatted...
Error in colnames<-(*tmp*, value = c("sample", "gene", "trv_type")) :
attempt to set 'colnames' on an object with less than two dimensions
What is wrong ?
Here's a screenshot of what the data looks like
Hello and welcome to the RStudio Community Forum.
I assume, since you don't say, that you are using the waterfalls package?
If you type
library(waterfalls)
help(waterfall)
you will see that the waterfall() function requires a dataframe with two columns (values and labels), but your dataframe has many columns. Check out the examples at the bottom of the PDF help document.
Of course, you may be using a different (bioconductor?) package.
Giving us a reproducible example with code and sample data is likely to improve the help you receive. Check out: https://www.tidyverse.org/help/#reprex