Re: [R] Error "sufficient values in manual scale. 10 needed but only 7 provided"

2019-01-23 Thread greg holly
Hi Jeff; I figured out the problem. I do apologize to you and members in the list to bother you with this simple problem. Regards, Greg On Wed, Jan 23, 2019 at 6:46 PM Jeff Newmiller wrote: > Problem is in your data not matching your values, but you did not share > your data. Try using the

Re: [R] Error "sufficient values in manual scale. 10 needed but only 7 provided"

2019-01-23 Thread Jeff Newmiller
Problem is in your data not matching your values, but you did not share your data. Try using the unique() function to see what values you have in your data. I will say that when I want to assign discrete colors I always start by converting my character column in the data frame to a factor and

[R] Error "sufficient values in manual scale. 10 needed but only 7 provided"

2019-01-23 Thread greg holly
Hi Dear all; I am getting the "sufficient values in manual scale. 10 needed but only 7 provided." problem when running the followings. Your help is highly appreciated. Regards, Greg p2<-p1+scale_color_manual(name="Diseases", labels=c("Myocardial Infarction", "Coronary artery disease", "Stroke",