From |uc@r @end|ng |rom |edor@project@org  Thu Jul  4 11:52:35 2024
From: |uc@r @end|ng |rom |edor@project@org (=?UTF-8?Q?I=C3=B1aki_Ucar?=)
Date: Thu, 4 Jul 2024 11:52:35 +0200
Subject: [Rd] R FAQ 2.6, 7.21
In-Reply-To: <20240704124306.41fb029f@trisector>
References: <20240704124306.41fb029f@trisector>
Message-ID: <CALEXWq3qOGUqkTh2apDR8ZLRmtQH+4MwConcYEs-pqEY=POFrw@mail.gmail.com>

On Thu, 4 Jul 2024 at 11:44, Ivan Krylov via R-devel <r-devel at r-project.org>
wrote:

> Hello R-devel,
>
> I would like to suggest a couple of updates for the R FAQ.
>
> https://CRAN.R-project.org/bin/linux/suse is currently empty and the
> directory has mtime from 2012, so it probably doesn't help to reference
> it in FAQ 2.6.
>

And now that we are at it, I would like to suggest also a mention to
https://cran.r-project.org/bin/linux/fedora/

I?aki


> There seems to be increased interest in using variables as variable
> names [1,2], so it might be useful to expand 7.21 a little. Can an R
> FAQ entry link to R-intro section 6.1?
>
> Index: doc/manual/R-FAQ.texi
> ===================================================================
> --- doc/manual/R-FAQ.texi       (revision 86871)
> +++ doc/manual/R-FAQ.texi       (working copy)
> @@ -503,9 +503,6 @@
>  @abbr{RPM}s for @I{RedHat Enterprise Linux} and compatible distributions
> (e.g.,
>  @I{Centos}, Scientific Linux, Oracle Linux).
>
> -See @url{https://CRAN.R-project.org/bin/linux/suse/README.html} for
> -information about @abbr{RPM}s for openSUSE.
> -
>  No other binary distributions are currently publicly available via
>  @CRAN{}.
>
> @@ -2624,8 +2621,31 @@
>  @end example
>
>  @noindent
> -without any of this messing about.
> +without any of this messing about. This becomes especially true if you
> +are finding yourself creating and trying to programmatically access
> +groups of related variables such as @code{result1}, @code{result2},
> + at code{result3}, and so on: instead of fighting against the language to
> +use
>
> + at example
> +# 'i'th result <- process('i'th dataset)
> +assign(paste0("result", i), process(get(paste0("dataset", i))))
> + at end example
> +
> +it is much easier to put the related variables in lists and use
> +
> + at example
> +result[[i]] <- process(dataset[[i]])
> + at end example
> +
> +and, eventually,
> +
> + at example
> +result <- lapply(dataset, process)
> + at end example
> +
> +which is easy to replace with @code{parLapply} for parallel processing.
> +
>  @node Why do lattice/trellis graphics not work?
>  @section Why do lattice/trellis graphics not work?
>
>
>
> --
> Best regards,
> Ivan
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>


-- 
I?aki ?car

	[[alternative HTML version deleted]]



[Rd] R FAQ 2.6, 7.21
=?UTF-8?Q?I=C3=B1aki_Ucar?=