[Rd] R FAQ 2.6, 7.21

Iñaki Ucar |uc@r @end|ng |rom |edor@project@org
Thu Jul 4 11:52:35 CEST 2024


On Thu, 4 Jul 2024 at 11:44, Ivan Krylov via R-devel <r-devel using 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},
> + using code{result3}, and so on: instead of fighting against the language to
> +use
>
> + using example
> +# 'i'th result <- process('i'th dataset)
> +assign(paste0("result", i), process(get(paste0("dataset", i))))
> + using end example
> +
> +it is much easier to put the related variables in lists and use
> +
> + using example
> +result[[i]] <- process(dataset[[i]])
> + using end example
> +
> +and, eventually,
> +
> + using example
> +result <- lapply(dataset, process)
> + using 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 using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>


-- 
Iñaki Úcar

	[[alternative HTML version deleted]]



More information about the R-devel mailing list