similar to: WISH: Optional mechanism preventing var <<- value from assigning non-existing variable

Displaying 20 results from an estimated 10000 matches similar to: "WISH: Optional mechanism preventing var <<- value from assigning non-existing variable"

2023 Mar 19
1
WISH: Optional mechanism preventing var <<- value from assigning non-existing variable
I think that should be the default behaviour. It's pretty late to get that into R 4.3.0, but I think your proposal (with check.superassignment = FALSE being the default) could make it in, and 4.4.0 could change the default to TRUE. Duncan On 19/03/2023 12:08 p.m., Henrik Bengtsson wrote: > I'd like to be able to prevent the <<- assignment operator ("super >
2023 Mar 19
2
WISH: Optional mechanism preventing var <<- value from assigning non-existing variable
Why should it make an exception for cases where the about-to-be-assigned-to name is present in the global environment? I think it should warn or give an error if the altered variable is in any environment on the search list. -Bill On Sun, Mar 19, 2023 at 10:54?AM Duncan Murdoch <murdoch.duncan at gmail.com> wrote: > I think that should be the default behaviour. It's pretty late to
2023 Mar 19
1
WISH: Optional mechanism preventing var <<- value from assigning non-existing variable
I have to say <<- is a core debugging tool when assigning into the global environment. I suppose I could use assign but that would be somewhat annoying. That said I'm still for this change, the vast overwhelming number of times that <<- is in my package code - already rare but it does happen - it would absolutely be a bug (typo most likely) for it to get to the global environment
2004 Oct 08
2
Evaluating Assignment-Operator R 2.0.0
Dear Helpers, in which way I have to use the assignment-operator evaluating left to right with R 2.0.0? With R 2.0.0 (w2k-installation) the "superassignment" operator '<<-' seems to have a different behaviour compared with R 1.9.1 : > x<<-4 > x [1] 4 > attr(x,'y')<<-5 Error: Object "x" not found > Using earlier
2017 Mar 27
2
A trap for young players with the lapply() function.
On Mon, Mar 27, 2017 at 1:17 AM, Rolf Turner <r.turner at auckland.ac.nz> wrote: > > Is there any way to trap/detect the use of an optional argument called > "X" and thereby issue a more perspicuous error message? > > This would be helpful to those users who, like myself, are bears of very > little brain. > > Failing that (it does look impossible) You can
2017 Jun 07
2
purrr::pmap does not work
Hi All, I try to do a scatterplot for a bunch of variables. I plot a dependent variable against a bunch of independent variables: -- cut -- graphics::plot( v01_r01 ~ v08_01_up11, data = dataset, xlab = "Dependent", ylab = "Independent #1" ) -- cut -- It is tedious to repeat the statement for all independent variables. Found an alternative, i.e. : -- cut -- mu
2009 Jun 03
3
Return variable assignments from a function
I'd like to perform return variable assignments like matlab. For example, the following function would return A, B, and c to the script that called it. ================================= function [A,B,c] = simple(m,n) A=[ 3 2; 3 3] B=m c=1:n ================================= I'd like to do similar assignments in R, but I seem to be able to only return one variable. I tried to use a
2017 Dec 08
1
lmerTest Issues
Hello all, Everything was working very well. Now when I try to load lmerTest using: library("lmerTest"), I get this error: Error: package or namespace load failed for ?lmerTest? in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]): there is no package called ?purrr? Nothing I've done has worked. I have uninstalled both R and R studio. I've
2017 Aug 14
2
tidyverse repeating error: "object 'rlang_mut_env_parent' not found"
Thanks for the feedback Jeff. Before I pursue a bug report, let me give a full example: ###### begin console output R version 3.4.1 (2017-06-30) -- "Single Candle" Copyright (C) 2017 The R Foundation for Statistical Computing Platform: i386-w64-mingw32/i386 (32-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions.
2017 Aug 14
0
tidyverse repeating error: "object 'rlang_mut_env_parent' not found"
> On Aug 14, 2017, at 8:37 AM, Szumiloski, John <John.Szumiloski at bms.com> wrote: > > Thanks for the feedback Jeff. Before I pursue a bug report, let me give a full example: > > ###### begin console output > > R version 3.4.1 (2017-06-30) -- "Single Candle" > Copyright (C) 2017 The R Foundation for Statistical Computing > Platform:
2020 Apr 16
2
suggestion: "." in [lsv]apply()
I'm sure this exists elsewhere, but, as a trade-off, could you achieve what you want with a separate helper function F(expr) that constructs the function you want to pass to [lsv]apply()? Something that would allow you to write: sapply(split(mtcars, mtcars$cyl), F(summary(lm(mpg ~ wt,.))$r.squared)) Such an F() function would apply elsewhere too. /Henrik On Thu, Apr 16, 2020 at 9:30 AM
2017 Nov 22
2
Tibble o data.table?
Buenas Os queria preguntar que ventaja le veis a las tibbles frente a los data.table, ya que para mi, quitando el uso de librerias como tidyr o purrr, en el resto prefiero usar data.table. Me parece igual de potente y mucho más rápido, y no le veo las supuestas ventajas, pero quiero conocer vuestra opinion. Gracias Jesús [[alternative HTML version deleted]]
2017 Jun 08
2
add_model paquete modeval
Estimados compañeros me gustaría saber si alguno ha utilizado la función add_model del paquete modeval cuando la variable de clasificación (y) tiene más de dos niveles. Porque si la utilizo con más niveles siempre me sale el error: Error: length(levels(factor((purrr::as_vector(y))))) == 2 is not TRUE Me parece muy interesante el paquete y no veo donde indica esta limitación. Un cordial
2017 Aug 17
2
How to install Tidyverse on Ubuntu 17.04? Getting gcc errors for -fstack-protector-strong and -Wdate-time
I'm running Ubuntu 17.04 and R 3.4.1. I installed the latter yesterday, so I presume it's the latest version. I want to install Tidyverse, which I've spent many happy hours with under Windows. But when I do install.packages("tidyverse") , I get errors about unrecognized command line options to gcc. These start when the install hits the colorspace and munsell packages.
2019 Jul 21
1
Recommended Reading: Advanced R Second Edition
Dear R Developers, After having fully read "Advanced R First Edition" , and having just bought my physical copy of "Advanced R Second Edition", I recommend that: Any community member interested in the development of R reads "Advanced R Second Edition", which explains R Language Core concepts cristal clear, and shows the motivation behind libraries such as
2020 Oct 04
0
how to get a numeric vector?
Always hard to tell if THIS is a homework project. As with most things in R, if you can not find at least a dozen ways to do it, it is not worth doing. The question (way below) was how to take two vectors of length two and make a longer results based on using the ":" operator to generate a range between the first element of each array and then between the second elements and return the
2023 Apr 09
1
can't install nser...
Dear members, I can't install "nser" package. It is not in cran but install_version and install_github both are not working: > install_version("nser",version = "1.4.0") Downloading package from url: https://cran.rstudio.com//src/contrib/Archive/nser/nser_1.4.0.tar.gz These packages have more recent versions available. It is
2024 Mar 16
1
Problem when trying to install packages
Though Navigator may mess up any Rtools stuff because it handles the directory trees where packages and dependencies are located, does it not? If so, maybe just reinstall RStudio directly from its website to proceed. Just a guess obviously. Bert On Sat, Mar 16, 2024, 05:09 javad bayat <j.bayat194 at gmail.com> wrote: > Dear Rui; > Many thanks for your reply. I have installed Rtools
2024 Mar 16
1
Problem when trying to install packages
Dear all; I found a useful video on youtube that has explained how to install Rtools. I followed the instructions and the problem was solved. " Installing R version 4.0 + RTools 4.0 + RStudio For Data Science (#R #RTools #RStudio #DataScience) - YouTube <https://www.youtube.com/watch?v=h2IPWVXaUuU> " Sincerely On Sat, Mar 16, 2024 at 10:15?AM Bert Gunter <bgunter.4567 at
2005 Sep 02
2
Superassignment (<<-) and indexing
In a clean environment under R-2.1.0 on Linux: > x <- 1:5 > x[3] <<- 9 Error: Object "x" not found Isn't that odd? (Note x <<- 9 works just fine.) Why am I doing this? Because I'm stepping through code that normally lives inside a function, where "<<-" is appropriate. -- David Brahm (brahm at alum.mit.edu)