[R] problem with plotting clustered data with convex hull using ggfortify

Karl Schilling k@r|@@ch||||ng @end|ng |rom un|-bonn@de
Mon Oct 25 01:00:07 CEST 2021


Dear Mr Barradas,

thank you so much. After going back to the 4.1.1  version, the convex 
hulls were plotted again (R 4.1.0. Windows).

Will forward all this to the package maintainer.

But for the moment, your hint is of great help.

Thank you, all my best

Karl

On 25.10.2021 00:32, Rui Barradas wrote:
> Hello,
> 
> R 4.1.1 on Ubuntu 20.04.3 LTS.
> 
> I can reproduce this error. It happens with ggfortify 0.4.12 but not 
> with 0.4.11.
> 
> First ggfortify 0.4.11, notice the warnings.
> 
> 
> rui using rui:~$ R -q -f rhelp.R
>  > library(ggfortify)
> Loading required package: ggplot2
>  > library(cluster)
>  >
>  > autoplot(fanny(iris[-5], 3), frame = TRUE)
> Warning messages:
> 1: `select_()` was deprecated in dplyr 0.7.0.
> Please use `select()` instead.
> This warning is displayed once every 8 hours.
> Call `lifecycle::last_warnings()` to see where this warning was generated.
> 2: `group_by_()` was deprecated in dplyr 0.7.0.
> Please use `group_by()` instead.
> See vignette('programming') for more help
> This warning is displayed once every 8 hours.
> Call `lifecycle::last_warnings()` to see where this warning was generated.
>  > packageVersion("cluster")
> [1] ‘2.1.2’
>  > packageVersion("ggfortify")
> [1] ‘0.4.11’
>  >
>  > sessionInfo()
> R version 4.1.1 (2021-08-10)
> Platform: x86_64-pc-linux-gnu (64-bit)
> Running under: Ubuntu 20.04.3 LTS
> [...]
> 
> 
> #---------------
> 
> Now ggfortify 0.4.12, notice that the errors are gone but there's a 
> message, probably printed with cat().
> 
> 
> 
> rui using rui-p6550pt:~$ R -q -f rhelp.R
>  > library(ggfortify)
> Loading required package: ggplot2
>  > library(cluster)
>  >
>  > autoplot(fanny(iris[-5], 3), frame = TRUE)
> Adding missing grouping variables: `cluster`
>  > packageVersion("cluster")
> [1] ‘2.1.2’
>  > packageVersion("ggfortify")
> [1] ‘0.4.12’
>  >
>  > sessionInfo()
> R version 4.1.1 (2021-08-10)
> Platform: x86_64-pc-linux-gnu (64-bit)
> Running under: Ubuntu 20.04.3 LTS
> [...]
> 
> 
> One problem was fixed, another showed up.
> You should contact the package maintainer.
> 
> 
> Hope this helps,
> 
> Rui Barradas
> 
> 
> Às 21:57 de 24/10/21, Karl Schilling escreveu:
>> Dear all:
>>
>> I have some data that I want to cluster and display as groups 
>> surrounded by convex hulls. Here, i use the iris data as an example:
>>
>> library(ggfortify)
>> autoplot(fanny(iris[-5], 3), frame = TRUE)
>>
>> I used this code before, about a year ago, and then it resulted in 
>> data surrounded by convex hulls., just as may be seen in the 
>> description of ggfortify here:
>>
>>
>> http://rstudio-pubs-static.s3.amazonaws.com/53162_cd16ee63c24747459ccd180f69f07810.html 
>>
>>
>>
>> Presently, no hulls are drawn; instead some line is projected on each 
>> cluster.
>>
>> I found out that there is an addition to autoplot command, "frame.type 
>> = c("convex", "norm", "t"). Whereas ""norm" and "t"  give confidence 
>> ellipses as expected, "convex" results in a straight line as mentioned 
>> above.
>>
>> Any help would be appreciated.
>>
>> Best

-- 
Karl Schilling



More information about the R-help mailing list