Re: [R] question about for loop

2021-12-24 Thread Kai Yang via R-help
riday, December 24, 2021 5:37 PM To: Kai Yang Cc: R-help Mailing List Subject: Re: [R] question about for loop y, c, and f only exist in the context of mac2 If you want to use them, you'll have to write mac2$y, mac2$c, or mac2$f (or the [[ versions mac2[["y"]], mac2[["c"]],

Re: [R] question about for loop

2021-12-24 Thread Avi Gross via R-help
, December 24, 2021 5:37 PM To: Kai Yang Cc: R-help Mailing List Subject: Re: [R] question about for loop y, c, and f only exist in the context of mac2 If you want to use them, you'll have to write mac2$y, mac2$c, or mac2$f (or the [[ versions mac2[["y"]], mac2[["c"]],

Re: [R] question about for loop

2021-12-24 Thread Kai Yang via R-help
Thanks Andrew. This is super helpful. --- Kai On Friday, December 24, 2021, 02:37:14 PM PST, Andrew Simmons wrote: y, c, and f only exist in the context of mac2If you want to use them, you'll have to write mac2$y, mac2$c, or mac2$f (or the [[ versions mac2[["y"]], mac2[["c"]], or mac2

Re: [R] question about for loop

2021-12-24 Thread Andrew Simmons
y, c, and f only exist in the context of mac2 If you want to use them, you'll have to write mac2$y, mac2$c, or mac2$f (or the [[ versions mac2[["y"]], mac2[["c"]], or mac2[["f"]]) Combining that with index i would then look like mac2$y[[i]] or mac2[[i, "y"]] Also, I think you want to use aes_strin