search for: subassign

Displaying 20 results from an estimated 197 matches for "subassign".

2019 Feb 27
2
Intermittent crashes with inset `[<-` command
..., y == 'a', x[y == 'b']) + cat(i, '') + } 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 ==4711== Invalid read of size 1 ==4711== at 0x501A40F: Rf_xlength (Rinlinedfuns.h:542) ==4711== by 0x501A40F: VectorAssign (subassign.c:658) ==4711== by 0x501CDFE: do_subassign_dflt (subassign.c:1641) ==4711== by 0x5020100: do_subassign (subassign.c:1571) ==4711== by 0x4F66398: bcEval (eval.c:6795) ==4711== by 0x4F7D86D: R_compileAndExecute (eval.c:1407) ==4711== by 0x4F7DA70: do_for (eval.c:2185) ==4711== by 0x...
2019 Feb 27
0
Intermittent crashes with inset `[<-` command
On an azure centos VM, I can reproduce this bug which reports either: *** caught segfault *** address 0x70000006a, cause 'memory not mapped' (crash) Or incompatible types (from builtin to integer) in subassignment type fix (no crash) Like Gabriel, I could not reproduce the bug on a mac laptop. Both R versions 3.5.1. Travers On Wed, Feb 27, 2019 at 9:08 AM William Dunlap via R-devel <r-devel at r-project.org> wrote: > > Valgrind (without gctorture) reports memory misuse: > > % R --de...
2019 Feb 26
8
Intermittent crashes with inset `[<-` command
The following code crashes after about 300 iterations on my?x86_64-w64-mingw32?machine on R 3.5.2 --vanilla.?? Others have duplicated this (see?https://github.com/tidyverse/magrittr/issues/190?if necessary), but I don't know how machine/OS-dependent it may be.?? If it doesn't crash for you, please try increasing the length of the x vector. Substituting the commented-out line for the one
2011 Aug 12
1
Details of subassignment (for vectors and data frames)
Hi All: I'm looking to find out a bit more about how subassignment actually works and am hoping someone with knowledge of the details can fill me in (I've looked at the source code, but my knowledge of C is lacking). In the case of vectors, my reading of ?"[" would indicate that for a vector, vec <- 1:25, vec[c(1,5,25)] <- c(101,102,103)...
2005 Jun 09
1
Subassignments involving NAs in data frames
...ata frame to 2s, the second fails to do so. > df1 <- data.frame(a = c(NA, 0, 3, 4)) > df2 <- data.frame(a = c(NA, 0, 0, 4)) > df1[df1 == 0] <- 2 ## Works > df2[df2 == 0] <- 2 Error: NAs are not allowed in subscripted assignments Checking an old news file I see this: o Subassignments involving NAs and with a replacement value of length > 1 are now disallowed. (They were handled inconsistently in R < 2.0.0, see PR#7210.) For data frames they are disallowed altogether, even for logical matrix indices (the only case which used to work). which leaves me to believe...
2004 Sep 03
0
Inconsistencies in subassignment with NA index. (PR#7210)
Apart from the inconsistencies, there are two clear bugs here: 1) miscalculating the number of values needed, in the matrix case. E.g. > AA[idx, 1] <- B[1:4] Error in "[<-"(`*tmp*`, idx, 1, value = B[1:4]) : number of items to replace is not a multiple of replacement length although only 4 values are replaced by AA[idx, 1] <- B. 2) the behaviour of the 3D case.
2004 Sep 04
1
Inconsistencies in subassignment (PR#7210)
I have made the 3-d case do the same as the vector case, which is what the C code clearly intended (a goto label was in the wrong place). This leaves the bigger question of the right thing to do. I note that data frames give an error when any indices are NA. -thomas On Fri, 3 Sep 2004 ripley@stats.ox.ac.uk wrote: > Apart from the inconsistencies, there are two clear bugs here: > > 1)
2005 Feb 19
0
Translation commentaries
...in simple quotes: msgid "'method' must be a character object". This already happens for some msgs, but not for all of them. 2) Some messages are essentially the same, with minor variations. I think they should be merged into just one. For instance: #: src/main/subassign.c:396 src/main/subassign.c:669 src/main/subassign.c:917 msgid "number of items to replace is not a multiple of replacement length" #: src/main/subassign.c:1099 msgid "no of items to replace is not a multiple of replacement length" 3) There's at least once t...
2012 Mar 13
0
111 FIXMEs in main/src
...real string allocation. */ -- scan.c: goto inquote; /* FIXME: Ick! Clean up logic */ scan.c- } -- seq.c: /* FIXME: possibly UTF-8 version */ seq.c- for (i = 0; i < nls; i++) { -- serialize.c: stream->OutBytes(stream, (void *)s, length); /* FIXME: is this case right? */ serialize.c-} -- subassign.c: /* FIXME : this should be a shallow copy for list */ subassign.c- /* objects. A full duplication is wasteful. */ -- subassign.c: /* FIXME : this should be a shallow copy for list */ subassign.c- /* objects. A full duplication is wasteful. */ -- subassign.c: /* FIXME : this shoul...
2012 Feb 21
0
Help with debugging message
...n't large at all. That return process never completes --- infinite wait. Kill it with cntrl\, claims to have died in Rf_alloc : ==5420== ==5420== Process terminating with default action of signal 3 (SIGQUIT) ==5420== at 0x4D14695: Rf_allocVector (memory.c:2445) ==5420== by 0x4D8FCAC: SubassignTypeFix (subassign.c:113) ==5420== by 0x4D91146: do_subassign2_dflt (subassign.c:1568) ==5420== by 0x4D92012: do_subassign2 (subassign.c:1451) ==5420== by 0x4CD940D: Rf_eval (eval.c:469) ==5420== by 0x4CDBEB6: do_set (eval.c:1724) ==5420== by 0x4CD940D: Rf_eval (eval.c:469) ==5420==...
2010 May 19
3
Strange case of partial matching in .[ - possible bug / wrong documentation?
Hi all, This occurred in R-2.11.0 (WinXP). The R-help page of .[ says that: "Character indices can in some circumstances be partially matched (see pmatch) to the names or dimnames of the object being subsetted (but never for subassignment). Unlike S (Becker et al p. 358)), R has never used partial matching when extracting by [, and as from R 2.7.0 partial matching is not by default used by [[ (see argument exact)." My understanding is therefore that .[ should never try partial matching. However: > df = data.frame(a=c(...
2005 Sep 01
2
SpatStat Kest - Error Message help
...the Kest function runs OK for most of the different point patterns that I have but for a particular point pattern, which have only 17 points, it runs until the 34th iteration and then I receive this message: Error in "[<-"(`*tmp*`, index, value = NULL) : incompatible types (1000) in subassignment type fix Execution halted Do you have any idea about what could be the cause of this ? Thanks in advance D. ----------------------------------------- Stay ahead of the information curve. Receive EDA news and jobs on your desktop daily. Subscribe today to the EDA CafeNews newsl...
1999 May 17
1
minor installation problems
...ourier.o gram.o gram-ex.o graphics.o iosupport.o list.o logic.o main.o match.o memory.o model.o names.o objects.o optimize.o options.o par.o paste.o platform.o plot.o plot3d.o plotmath.o print.o printarray.o printvector.o printutils.o random.o relop.o saveload.o scan.o seq.o sort.o source.o split.o subassign.o subscript.o subset.o summary.o unique.o util.o version.o ../unix/libunix.a ../appl/libappl.a ../nmath/libmath.a -lSM -lICE -L/usr/X11R6/lib -lX11 -lreadline -lz -ldl -lncurses -lm the binary would exit with the error /usr/local/lib/R-0.64.1/bin/R.binary: error in loading shared librarie...
1999 May 17
1
minor installation problems
...ourier.o gram.o gram-ex.o graphics.o iosupport.o list.o logic.o main.o match.o memory.o model.o names.o objects.o optimize.o options.o par.o paste.o platform.o plot.o plot3d.o plotmath.o print.o printarray.o printvector.o printutils.o random.o relop.o saveload.o scan.o seq.o sort.o source.o split.o subassign.o subscript.o subset.o summary.o unique.o util.o version.o ../unix/libunix.a ../appl/libappl.a ../nmath/libmath.a -lSM -lICE -L/usr/X11R6/lib -lX11 -lreadline -lz -ldl -lncurses -lm the binary would exit with the error /usr/local/lib/R-0.64.1/bin/R.binary: error in loading shared librarie...
2020 Feb 19
2
dimnames incoherence?
...e IIRC} : ## MM: The problematic behavior (bug ?) is in `[[<-`, not in `dimnames<-` : `[[<-`(NULL, 1, "a" ) # gives "a" (*not* a list) `[[<-`(NULL, 1, c("a","b")) # gives list(c("a","b")) !! ##==> in C code: in subassign.c [ ~/R/D/r-devel/R/src/main/subassign.c ] ##==> function (~ 340 lines) ## do_subassign2_dflt(SEXP call, SEXP op, SEXP args, SEXP rho) ## has " line svn r. svn auth. c.o.d.e... ---- ------ --------- ---------------------------------------------- 1741 4166 ihaka if (...
2009 Aug 11
1
error in names
Hi, what is meaning this errors !!! Error in names(o.pr)[p.ok] <- names(qs) :   incompatible types (from NULL to character) in subassignment type fix In addition: Warning message: In Ops.factor(from, (0:(length.out - 1)) * by) :   + not meaningful for factors thank you very much [[alternative HTML version deleted]]
2009 Jan 08
1
NAs are not allowed in subscripted assignments
Browse[1]> j <- c(1,2,NA) Browse[1]> j[j==1][-1] [1] NA Browse[1]> j[j==1][-2] [1] 1 Browse[1]> j[j==1][-2] <- 2 Error during wrapup: NAs are not allowed in subscripted assignments As far as I can see, I have no NA in the lhs (not after the second subscript anyway). Besides, I have a single value on the rhs, so it should be allowed to have NAs in the lhs, according to
2010 Sep 08
0
Correction to vec-subset speed patch
...7 @@ void KillAllDevices(void); SEXP levelsgets(SEXP, SEXP); void mainloop(void); -SEXP makeSubscript(SEXP, SEXP, int *, SEXP); +SEXP makeSubscript(SEXP, SEXP, int *, SEXP, int); SEXP markKnown(const char *, SEXP); SEXP mat2indsub(SEXP, SEXP, SEXP); SEXP matchArg(SEXP, SEXP*); Index: src/main/subassign.c =================================================================== --- src/main/subassign.c (revision 52822) +++ src/main/subassign.c (working copy) @@ -448,7 +448,7 @@ } stretch = 1; - PROTECT(indx = makeSubscript(x, s, &stretch, R_NilValue)); + PROTECT(indx = makeSubscrip...
1998 Mar 27
1
R-beta: Problems during compilation of R for Solaris 2.6
...gram.o list.o logic.o main.o match.o memory.o >> model.o names.o objects.o optimize.o options.o par.o paste.o plot.o plot3d.o >> plotmath.o print.o printarray.o printvector.o printutils.o random.o relop.o >> saveload.o scan.o seq.o sort.o source.o split.o subassign.o subscript.o >> subset.o summary.o unique.o util.o version.o ../lib/libgraphics.a >> ../lib/libunix.a ../lib/libappl.a ../lib/libmath.a -lSM -lICE -L/usr/openwin/lib >> -R/usr/openwin/lib -lX11 -lsocket -lnsl -ldl -lreadline -ltermcap -lm >> >> Undefined...
2016 Oct 12
2
How to assign NULL value to pairlist element while keeping it a pairlist?
...pairlists. Thanks, Michael On Wed, Oct 12, 2016 at 9:40 AM, Michael Lawrence <michafla at gene.com> wrote: > The coercion is probably the most viable workaround for now, as it's > consistent with what happens internally for calls. All pairlists/calls > are converted to list for subassignment, but only calls are converted > back. My guess is that the intent was for users to move from using a > pairlist to the "new" (almost 20 years ago) list. In my opinion, > consistency trumps "convenience" in this case. If others agree, I'll > change it to also...