**I am new user in R. Am trying to do data visualization using the ggvis to plot scatter plot for my data. A m using the iris data from the url("http://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data repository. when running the code iris%>%ggvis(Septal_length, Septal_width, fill= species)%>% layer_points() i am getting the Error: Error in eval(expr, env) : object 'species' not found. How can i fix this?
Thank you for the answer. But i have checked my colnames and the are;
colnames(iris)
[1] "Sepal.Length" "Sepal.Width" "Petal.Length" "Petal.Width" "Species"
using the Print(iris) my table is displayed with this names
print(iris)
Sepal.Length Sepal.Width Petal.Length Petal.Width Species
1 5.1 3.5 1.4 0.2 setosa
2 4.9 3.0 1.4 0.2 setosa
3 4.7 3.2 1.3 0.2 setosa
4 4.6 3.1 1.5 0.2 setosa
5 5.0 3.6 1.4 0.2 setosa
6 5.4 3.9 1.7 0.4 setosa
7 4.6 3.4 1.4 0.3 setosa
But once i run the code
iris%>%ggvis(Sepal.Length , Sepal.Width, fill= Species )%>% layer_points()
i get the Error
Error in eval(expr, env) : object 'Species' not found
i have tried to rename the colnames but still am getting the error
#install.packages("ggvis")
library(ggvis)
data(iris)
head(iris)
help(ggvis) # In the Help pane, scroll down to the Examples section re: syntax
iris %>% ggvis(~Sepal.Length , ~Sepal.Width, fill= ~Species) # The points layer is guessed
iris %>%
ggvis(~Sepal.Length , ~Sepal.Width) %>%
layer_points(fill:="blue") # The points layer is specified
i have drawn my scatter plot using
iris%>%ggvis("Sepal.Length" , "Sepal.Width", fill= "Species" )%>% layer_points() however, my graph is blank
i feel that my grids maybe are too big but i don't know how to adjust them.. Or probably there are no points in my plot. How can i solve this