search for: iseq

Displaying 20 results from an estimated 30 matches for "iseq".

Did you mean: isel
2020 Aug 11
2
clarifying the handling of responses for virtio-rpmb
...uint16_t req, const void *frames_in, unsigned int cnt_in, void *frames_out, unsigned int cnt_out) { int ret; struct __packed { struct rpmb_ioc_seq_cmd h; struct rpmb_ioc_cmd cmd[3]; } iseq = {}; void *frame_res = NULL; int i; uint32_t flags; rpmb_dbg("RPMB OP: %s\n", rpmb_op_str(req)); dbg_dump_frame(frame_type, "In Frame: ", frames_in, cnt_in); i = 0; flags = RPMB_F_WRITE; if (req...
2012 Aug 27
3
Changing entries of column of type "factor"/Adding a new level to a factor
...2 1 4 1 2 2 3 2 $ M3 : Factor w/ 4 levels "0/0","300/300",..: 1 4 1 3 3 3 4 4 2 4 > > #replace 0/0 by 999/999: > for (r in 1:10) + for (c in 2:4) + if (input[r,c]=="0/0") input[r,c]<-"999/999" Warnmeldungen: 1: In `[<-.factor`(`*tmp*`, iseq, value = "999/999") : invalid factor level, NAs generated 2: In `[<-.factor`(`*tmp*`, iseq, value = "999/999") : invalid factor level, NAs generated 3: In `[<-.factor`(`*tmp*`, iseq, value = "999/999") : invalid factor level, NAs generated > input Ind...
2000 Nov 25
2
assigning to data frames with whole columns of NAs
...1865 278612 United Kingdom Email david.firth at nuffield.oxford.ac.uk > emptyframe<-data.frame(a=c(NA,NA),b=c(NA,NA)) > emptyframe a b 1 NA NA 2 NA NA > emptyframe[1,]<-c(1,2) Warning messages: 1: invalid factor level, NAs generated in: [<-.factor(*tmp*, iseq, value = vjj) 2: invalid factor level, NAs generated in: [<-.factor(*tmp*, iseq, value = vjj) > emptyframe a b 1 NA NA 2 NA NA > anotherframe<-data.frame(a=c(8,9),b=c(NA,NA)) > anotherframe a b 1 8 NA 2 9 NA > anotherframe[1,]<-c(1,2) Warning message: invalid factor l...
2004 Nov 28
0
Re: [R-sig-finance] syntax for a loop
...so you don't run off the end. You basically just write the code as you've stated it except that "and" is && for single values and & for vectors You don't say what should happen if the test is not true. You can probably use "ifelse" instead of a loop. iseq <- 2:(length(x.dif) - 2) test <- x.dif[iseq-1] <= 0 & x.dif[iseq] > 0 & x.dif[iseq + 2] > 0 ifelse(test, iseq + 2, NA) I suspect that the last term in test should be i+1 and not i+2 ? You can see S Poetry for details. Patrick Burns Burns Statistics patrick@burns-stat.com...
2020 Sep 11
0
[virtio-dev] Re: clarifying the handling of responses for virtio-rpmb
...void *frames_out, unsigned int cnt_out) >>> { >>> int ret; >>> struct __packed { >>> struct rpmb_ioc_seq_cmd h; >>> struct rpmb_ioc_cmd cmd[3]; >>> } iseq = {}; >>> >>> void *frame_res = NULL; >>> int i; >>> uint32_t flags; >>> >>> rpmb_dbg("RPMB OP: %s\n", rpmb_op_str(req)); >>> dbg_dump_frame(frame_type, "In Frame: &q...
2009 Mar 22
0
all.equal is hard to use
...called by attr.all.equal(), target and current # are lists returned from attributes(original target | current). # So attributes of target and current are the attributes of attributes, # which contains only "names". attr.all.equal(target, current, ...) iseq <- if (length(target) == length(current)) { # if the length is equal, iseq will be a (1, 2, ... length) seq_along(target) } else { if (!is.null(msg)) # remove old msg about "Lengths" msg <- msg[-grep("\\bLengths\\b",...
2009 Aug 12
1
inserting into data frame gives "invalid factor level, NAs generated"
...ng is the following: # create data frame goframe = data.frame(goA = character(10), goB = character(10), value = numeric(10)) goframe[1,] = c("AA", "BB", 0.4) Result is: > goframe[1,] = c("AA", "BB", 0.4) Warning messages: 1: In `[<-.factor`(`*tmp*`, iseq, value = "AA") : invalid factor level, NAs generated 2: In `[<-.factor`(`*tmp*`, iseq, value = "BB") : invalid factor level, NAs generated > Is there another/better/more recomended way of doing this? If not, how do I do this without getting all the warnings? Thanks!...
2005 Oct 26
1
unexpected '[<-.data.frame' result
Is this a bug? If not, I am curious to know why '[<-.data.frame' was designed to yield a.frame$y != a.frame$z rather than refusing to carry out the operation at all. > a.frame <- data.frame( x=letters[1:5] ) > a.frame[ 2:5, "y" ] <- letters[2:5] > a.frame[[ "z" ]][ 2:5 ] <- letters[2:5] > a.frame x y z 1 a b <NA> 2 b c
2011 Apr 12
2
Assign Character Value to Data Frame
...For example, the following works just fine: > test<-data.frame(number=numeric(1)) > test[1,]<-.5 > test number 1 0.5 But the following bombs out: > hold<-data.frame(symbol=character(1)) > hold[1,]<-"NYSE:MMM" Warning message: In `[<-.factor`(`*tmp*`, iseq, value = "NYSE:MMM") : invalid factor level, NAs generated Could someone please guide me as to what adjustment I need to make to assign this character value to this row of the data frame? Your help would be very much appreciated. --John Sparks
2018 Apr 18
3
How to replace numeric value in the column contains Text (Factor)?
...uot;, "high", "low", "medium"), class = "factor")), .Names = c("Sites", "temp", "precip"), class = "data.frame", row.names = c(NA, -5L )) > dat[4:5, 3] <-"20" Warning message: In `[<-.factor`(`*tmp*`, iseq, value = c("20", "20")) : invalid factor level, NA generated Thanks, [[alternative HTML version deleted]]
2009 Jul 14
4
[ActiveRecord::Base].collect {|a,b| ...} weirdness
Hey everyone. My mind has been boggled by an issue I ran into a few hours ago. I am completely lost as to why the following code behaves the way it does and would appreciate any hints from you guys. It would already be super-helpful if others could post their output for the following so that I can figure out whether this is weirdness specific to my setup or a global phenomenon. So far,
2005 Jul 07
1
manupulating a data frame column
...lass "factor". Thanks! > x1<-LETTERS[1:8]; x2<-letters[1:8]; x1[2]<-NA; x1[4]<-NA; > df<-data.frame(x1=x1, x2=x2) > idx<-which(is.na(df$x1)) > df[idx,1]<-df[idx,2] Warning message: invalid factor level, NAs generated in: "[<-.factor"(`*tmp*`, iseq, value = c(2, 4)) >
2006 Mar 12
1
finding warning point in function
Hi everyone, I would like to find out when and where exactly I get the following warning in a piece of code I've written: Error in "[<-"(`*tmp*`, iseq, value = numeric(0)) : nothing to replace with The code is a for () loop performing a somewhat trivial calculation, modulated by a number of logical if(){} else(){} conditions, involving the creation of a number of vectors that contain the elements that will be manipulated. The warning it...
2013 Feb 20
0
Simultaneously adding rows and columns by '[<-.data.frame' may fail
...<= nvars) { ... } else { x[[jj]] <- vjj[FALSE] if (length(dim(vjj)) == 2L) { length(x[[j]]) <- nrows * ncol(vjj) # dim(x[[j]]) <- c(nrows, ncol(vjj)) # x[[jj]][iseq, ] <- vjj } else { length(x[[j]]) <- nrows # x[[jj]][iseq] <- vjj } } } else ... After doing fix("[<-.data.frame") by replacing appropriate 'j' with 'jj&...
2012 Aug 01
3
Can any one help me on this Issue
...8.5 10.6 0 19.1 Using this logic: Z16[5,2:5]<-paste("$",Z16[5,2:5],sep="") Z16[3,2:5]<-paste(Z16[3,2:5],"%",sep="") Z16[4,2:5]<-paste(Z16[4,2:5],"%",sep="") Getting this Warning: In `[<-.factor`(`*tmp*`, iseq, value = c(3L, 1L, 2L, 4L, NA)) invalid factor level, NAs generate Final result: Summary G Y R T Accts 582 644 0 1226 AcctCov 230 165...
2012 Jul 26
5
Getting warning message
...0 74 0 68 EqVol11$MM8.5 10.6 0 19.1 Using this logic: Z16[5,2:5]<-paste("$",Z16[5,2:5],sep="") Z16[3,2:5]<-paste(Z16[3,2:5],"%",sep="") Z16[4,2:5]<-paste(Z16[4,2:5],"%",sep="") Getting this Warning: In `[<-.factor`(`*tmp*`, iseq, value = c(3L, 1L, 2L, 4L, NA)) invalid factor level, NAs generate Final result: Summary G Y R T Accts 582 644 0 1226 AcctCov 230 165 0 395 Cov% 40% 26% 0% 32% UnCov% 60% 74% 0% 68% EqVol11$MM$8.50 $10.60 $0 $19.10 Thanks in Advance. Thanks, N...
2005 Oct 09
0
all.equal() improvements (PR#8191)
...f(any(ne)) c(msg, paste(sum(ne), "string mismatches")) @@ -141,76 +229,205 @@ if(is.null(msg)) TRUE else msg } -all.equal.list <- function(target, current, ...) -{ - msg <- attr.all.equal(target, current, ...) -# nt <- names(target) - nc <- names(current) - iseq <- - ## <FIXME> - ## Commenting this eliminates PR#674, and assumes that lists are - ## regarded as generic vectors, so that they are equal iff they - ## have identical names attributes and all components are equal. - ## if(length(nt) && length(nc...
2006 May 11
1
factors
...= rep(1:5,2), Marks = marks) > ind <- dat$Marks < 50 > dat[ ind, "pass"] <- "Fail" > > fix(dat) > dat[!ind, "pass"] <- "Pass" Warning message: invalid factor level, NAs generated in: "[<-.factor"(`*tmp*`, iseq, value = c("Pass", "Pass", "Pass", >dat Student.id Grade Marks pass 1 a 1 72.14612 <NA> 2 b 2 64.34044 <NA> 3 c 3 20.27918 Fail 4 d 4 39.01875 Fail 5 e 5 92.19682 <NA> 6...
2018 Apr 18
0
How to replace numeric value in the column contains Text (Factor)?
...uot;, "high", "low", "medium"), class = "factor")), .Names = c("Sites", "temp", "precip"), class = "data.frame", row.names = c(NA, -5L )) > dat[4:5, 3] <-"20" Warning message: In `[<-.factor`(`*tmp*`, iseq, value = c("20", "20")) : invalid factor level, NA generated Thanks, [[alternative HTML version deleted]] ______________________________________________ R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE...
2005 Jun 23
1
Stop Warnings for Invalid Factor Level, NAs generated?
How can I stop the following warning from occuring? invalid factor level, NAs generated in: "[<-.factor"(`*tmp*`, iseq, value = structure(1, .Label = "12", class = "factor")) The Label messages are for "5", "8", "12" and "46". I want the NAs to be generated as needed. Is this causing R to slow down by generating the warning messages? There are over 50....