New to R so need a hand with converting excel to a ggplot please!
I have an excel spreadsheet of two columns: RSeq value (number) and tumour_type (Normal/Cancer)
I'm trying to convert the first column to a vector variable:
but this always saves a list not a vector- not sure why though! this makes it difficult to convert to a dataframe and make a box-plot though.
Secondly I convert the second column to a factor by:
tumour_type_factor=factor(tumour_type, levels=c( "Normal", "Cancer"))
But when I run the factor it comes up with
levels = Normal, Cancer"
so clearly it can't read the values in the column properly.
When I generate a box plot of ggplot it returns: default method not implemented for type 'list'
I have managed to do it right one time but can't replicate it! Am I importing the data wrongly from excel? I have tried .xlsl and .csv formats?
Any help much appreciated! Thanks!