0
$\begingroup$

I have been struggling to find clearly described R code explaining how to input variables for the clr transformation in R. I only need to transform columns 20-201 in my dataset. Can anyone provide an example or 2? That would help tremendously. Thanks in advance!!

$\endgroup$
3
  • $\begingroup$ Did you look at? search.r-project.org/CRAN/refmans/Hotelling/html/clr.html $\endgroup$ Commented Jan 17, 2023 at 18:17
  • 1
    $\begingroup$ The duplicate includes R code to compute the CLR. The function ilr does this by default (and can be modified by using a non-default value of its second argument p). You can find this and related posts by searching our site for "CLR" $\endgroup$
    – whuber
    Commented Jan 17, 2023 at 18:22
  • $\begingroup$ I did see the CRAN page but I was confused about how to apply it since I only want to transform columns 20-201. Lets say call my dataset 'mydataset', but I only want certain columns transformed. So, here is the code: clr(data, group = NULL) Do I plug it in like this? clr(data(mydataset[,20:201]) , group = NULL) I tried this but it doesn't work $\endgroup$ Commented Jan 17, 2023 at 19:04

0

Browse other questions tagged or ask your own question.