Boxplot error R Studio: Error in boxplot.default(x = cataract_opths$pop.blind.cataract, range = 100) : adding class "factor" to an invalid object -


i'm trying make simple boxplot following data:

pop.blind.cataract 2,994,231 17,038,617 87,572 2,130,689 2,425,043 26,551,580 8,332,035 377,354 2,554,610 8,734 128,809 396,198 619,308 25,922 1,944,676

i've tried both these commands , gotten both these errors:

boxplot( x=pop.blind.cataract, range=100) 

error in boxplot(x = pop.blind.cataract, range = 100) : object 'pop.blind.cataract' not found

boxplot( x=cataract_opths$pop.blind.cataract, range=100) 

error in boxplot.default(x = cataract_opths$pop.blind.cataract, range = 100) : adding class "factor" invalid object

i can't figure out what's going on. there no "na"s in data. numbers. can't figure out what's going on. please help!

thanks.

if understand question correctly, problem in data. commas cleaned , put character vector (use data.frame if like), this:

pop.blind.cataract <- c(2994231, 17038617, 87572, 2130689, 2425043, 26551580, 8332035, 377354, 2554610, 8734, 128809, 396198, 619308, 25922, 1944676) 

now boxplot(pop.blind.cataract) should trick: boxplot(pop.blind.cataract)


Comments

Popular posts from this blog

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -