Good morning,
I'm a new user of R and I would like to create a map with genotype frequency using pies chart
My data are in a .csv file.
I imported it in R using this command :
data <- read.table ("datacarte.csv", sep=",", header = TRUE)
attributes (data)
$names
[1] "countryname" "ISOcountry" "genotype1" "genotype2" "genotype3" "effectifs"
[7] "genotype1freq" "genotype2fred" "genotype3freq"
$class
[1] "data.frame"
$row.names
[1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
[26] 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
[51] 51 52 53 54 55 56 57 58 59 60 61 62
I loaded the package rworldmap
I joined my country data
> sPDF <- joinCountryData2Map (data
+ ,joinCode = "ISO2"
+ , nameJoinColumn = "ISOcountry")
Then I tried to obtain the map :
>mapDevice ()
> dF <- data
> mapPies (dF = dF
+ , nameZs = c("genotype1freq", "genotype2freq","genotype3freq")
+ , mapRegion = "world")
symbolMaxSize= 7.2 maxSumValues= 100.01 symbolScale= 0.719964
List of 2
$ x: num [1:100] -158 -158 -158 -159 -159 ...
$ y: num [1:100] 72.2 72.6 73.1 73.5 74 ...
But I have nothing on my map.
I don't understand where come from my mystake.
Thank you for your help
Aurélie