similar to: is.na(v)<-b (was: Re: Beginner's query - segmentation fault)

Displaying 20 results from an estimated 2000 matches similar to: "is.na(v)<-b (was: Re: Beginner's query - segmentation fault)"

2003 Oct 15
1
is.na(v)<-b (was: Re: Beginner's query - segmentation fault)
I think the thread ended up with several people (not only me) feeling certain they didn't like `is.na<-` but with the developers defending it and me not really understanding why. Uwe Ligges was going to come up with an example of `<- NA` going wrong (sorry Brian R, I mean behaving unexpectedly), but never did, and I think the problem has been fixed. It was apparently a problem with
2003 Oct 08
1
is.na(v)<-b (was: Re: Beginner's query - segmentation fault)
Note this behaviour: > a<-"a" > a<-NA > mode(a) [1] "logical" > a<-"a" > is.na(a) <- T > mode(a) [1] "character" However after either way of assigning NA to a, is.na(a) is true, and it prints as NA, so I can't see it's ever likely to matter. [Why do I say these things? Expect usual flood of examples where it does
2003 Oct 08
0
is.na(v)<-b (was: Re: Beginner's query - segmentation fault)
Well, that's a convincing argument, but maybe it's the name that's worrying some of us. Maybe it would be more intuitive if called set.na (sorry, I mean setNA). Also "is.na<-" cannot be used to create a new variable of NAs, so is not a universal method, which is a shame for its advocates. I note also that for a vector you can assign a new NA using either TRUE or
2003 May 28
1
Numbers that look equal, should be equal, but if() doesn't see as equal (repost with code included)
Hi! Apologies for sending the mail without any code. Apparently somewhere along the way the .R attachments got filtered out. I have included the code below as clean as possible. My original mail is below the code. Thank you again for your time. regards, Paul vincentize <- function(data, bins) { if ( length(data) < 2 ) { stop("The data is really short. Is that ok?"); }
2003 May 19
4
modulus operator?
Is there a modulus operator in R? Anna
2003 Oct 15
2
Subseting in a 3D array
Hi! I have a 3d array: > dim(ib5km15.dbc) [1] 190 241 19 and a set of positions to extract: > ib5km.lincol.random[1:3,] [,1] [,2] [1,] 78 70 [2,] 29 213 [3,] 180 22 Geting the values of a 2D array for that set of positions would be: > ima <- ib5km15.dbc[,,1] > ima[ib5km.lincol.random[1:10,]] but don't find the way for the case of the 3D array: >
2004 Feb 24
1
Accessing columns in data.frame using formula
Hello! I'm trying the hard way to use a formula, in a function, to specify the names of several important columns in a data.frame. Maybe I'm just battling to figure out the right search terms :-( This is on XP, R 1.8.1. So, for instance, wery[1:5,] V1 V2 V3 V4 V5 congr V7 V8 V9 ok RT 1 1 1 960 520 1483 c 1 r r 1 760 2 1 2 1060 450 3753 c 1 r r 1 555
2003 Jun 03
3
(no subject)
Hi, I would like to know if it is possible to get printed output while a loop is taking place. Example: for(i in 1:10){ print(i) some long process } This will print the values of i only after the loop is finished, what I would like is to see them when the process enters the i-th iteration to keep track of how the program is running. Thank you, Gilda
2004 Jun 10
1
Informal discussion group about R
I've started a "tribe" for discussing R and sharing scripts. Tribe.net is one of the popular on-line social communities, like "Friendster". Visit and see if it is a forum that you find useful. To join the "tribe" you will need to register with Tribe.net. I hope it will be of help to newbies, although I'm new to R myself. Here is the url:
2004 Jun 16
2
subset and lme
I'm puzzled by the following problem, which appears when attempting to run an analysis on part of a dataset: If I try: csubset <- dat$Diagnosis==0 cont <- lme(fixed=cform, random = ~1|StudyName, data=dat,subset=csubset,na.action=na.omit) Then I get: Error in eval(expr, envir, enclos) : Object "csubset" not found But if I do
2003 Oct 17
4
sub data frame by expression
Hi All, I've the following data frame with 54 rows and 4 colums: > x Ratio Dose Time Batch R.010mM.04h.NEW 0.02 010mM 04h NEW R.010mM.04h.NEW.1 0.07 010mM 04h NEW ... R.010mM.24h.NEW.2 0.06 010mM 24h NEW R.010mM.04h.OLD 0.19 010mM 04h OLD ... R.010mM.04h.OLD.1 0.49 010mM 04h OLD R.100mM.24h.OLD 0.40 100mM 24h OLD I'd
2004 Aug 03
3
basic questions: any place for them
Hi I have two basic questions, and here they go, but I was wondering as well where can I ask these basic questions without bothering you people I've used Splus and now I'm using R and there's some functions that I can't simply find one: sort.col that allows data.frames to be sort by a given col (I saw the funtion sort but that's for vectors. and I can't believe I
2004 May 17
3
Accessing data
Hello, I would like to access my data frame without one variable. E.g.: > colnames(x) [1] "Besch" "Ang.m" "Arb.m" "i10" "Umsatz" "arbstd" I can try x[,-1], but this variable must be called by it??s name. x[,-"Besch"] x[,!"Besch"] attach(x) x[-Besch] ... ... does not work. I could not found a solution of
2004 Oct 01
3
Reading multiple files into R
I want to read data from a number of files into R. Reading individual files one by one requires writing enormous amount of code that will look something like the following. **************** maptools:::dbf.read("wb-01vc.dbf")->dist1 maptools:::dbf.read("wb-02vc.dbf")->dist2 maptools:::dbf.read("wb-03vc.dbf")->dist3
2004 Jul 21
3
How to sort TWO columns ?
Dear ALL, I fear my question has already been answered many times before, but I haven't fund that in archives... I am working on spatial datasets and, in most arrays I'm handling, there are two columns dedicated to (x,y)-coords. For different reasons - notably to draw image() plots, I need to have these two columns sorted in increasing order. But sort() and order() seem to apply to
2004 Aug 03
4
How to select a whole column? Thanks!
Dear all, I hope to remove a whole column from a data frame or matrix (> 2000 columns). All value in the column are same. The first thing is to select those columns. For instance, I hope to remove the V3~6 column, for all the value in those colume is zero. V3 V4 V5 V6 V7 V8 V9 V10 1 0 0 0 0 0.000 0.000 0.000 0.000 2 0 0 0 0 0.000 0.000 0.000 0.000 3 0 0 0
2004 Sep 16
4
FW: How do I insert a newline in my title in a plot?
yes I have tries, and nothing. It just shows the strings with the slashn, just like i typed it. -----Original Message----- From: Rashid Nassar [mailto:rnassar at duke.edu] Sent: ÐÝì?ôç, 16 Óå?ôåìâñßïõ 2004 15:44 To: Christos Rodopoulos Subject: Re: [R] How do I insert a newline in my title in a plot? Have you not tried what you have already suggested: title("this is a title\nIn 2
2004 Feb 06
1
0.1 + 0.2 != 0.3 revisited
Prompted by Peter Dalgard's recent elegant "intbin" function, I have been playing with the extension to converting reals to binary representation. The decimal part can be done like this: decbase <- function(x, n=52, base=2) { if(n) { x <- x*base paste(trunc(x), decbase(x%%1, n-1, base), sep="") } } n=52 default because that's the number of bits in
2003 Nov 24
0
apologies (was RE: [R] ISOdate() and strptime())
Dear Brian and other R-developers, I have to say that I don't understand why what I wrote should have caused any offence. A smile was what I was hoping for. You know I devote more time than I am supposed to, to support R and its users, in partial repayment of my immeasurable debt to all the Developers. It's not much, it's sometimes misguided (I later discover), and my resources
2003 Sep 17
0
Just don't do it, surely? (was RE: Retrieve ... argument values)
Thanks for the insight. > -----Original Message----- > From: Prof Brian Ripley [mailto:ripley at stats.ox.ac.uk] <snip> > dots <- list(...) > haveYlim <- "ylim" %in% names(dots) > > is the sort of thing we still understand 5 years later. > I didn't say "understand", I said "easily follow". Obviously how "easily" is