On Wed, 15 Nov 2023 20:53:54 +0000 (UTC)
varin sacha via R-help <r-help@r-project.org> wrote:

> # Sample the data
>   d <- data[indices, ]
>  
>  # Calculate the Spearman correlation coefficients for every sample
>   cor1 <- cor(x1, y1, method="spearman")
>   cor2 <- cor(x2, y2, method="spearman")

You're sampling the data into the `d` variable, but then you use the
original `x1`, `y1`, `x2`, `y2` variables unchanged. You need to access
the columns in `d` instead.

-- 
Best regards,
Ivan

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to