I want to show big numbers in a plot in r. but I get this error:
my numbers are:
[1] \"9,02E+11\" \"9,02E+11\" \"9,02E+11\" \"9,02E+11\" \"9,02E+11\" \"9
Try this:
plot(sapply(dataliste, function(x)gsub(",", ".", x)))
As Roman Luštrik pointed out, you most likely have characters in your data. You can generally plot them or convert them with as.numeric. However, since you have a ,
instead of a .
in your strings, the conversion to numeric fails.
Example:
> as.numeric("9,02E+11")
[1] NA
Warning message:
NAs introduced by coercion
> as.numeric("9.02E+11")
[1] 9.02e+11
With gsub, as above, you can substitute the ,
for a .
for each number and plotting should work.