similar to: index range

Displaying 20 results from an estimated 30000 matches similar to: "index range"

2012 Apr 02
2
Reading first line before using read.table()
So far I have figured out that the following line reads our time series files into R OK. dtLs$dta <- read.table("C:/TryRRead/datFiles/JFeqfi4h.rta", header = TRUE, sep = ",", colClasses = "character") But I have to remove a main-title line so that the first line is the column titles line. This leads to having two sets of data files around when we would rather
2009 May 30
3
setdiff bizarre (was: odd behavior out of setdiff)
Dear R-devel, Please see the recent thread on R-help, "Odd Behavior Out of setdiff(...) - addition of duplicate entries is not identified" posted by Jason Rupert. I gave an answer, then read David Winsemius' answer, and then did some follow-up investigation. I would like to change my answer. My current version of setdiff() is acting in a way that I do not understand, and a way
2009 May 30
3
setdiff bizarre (was: odd behavior out of setdiff)
Dear R-devel, Please see the recent thread on R-help, "Odd Behavior Out of setdiff(...) - addition of duplicate entries is not identified" posted by Jason Rupert. I gave an answer, then read David Winsemius' answer, and then did some follow-up investigation. I would like to change my answer. My current version of setdiff() is acting in a way that I do not understand, and a way
2011 Feb 02
1
Flexibly Retrieving Objects with an Index
Greetings, I would like to flexibly combine several data frames objects without specifying the exact names of the objects in memory. Should I use indexing to call those objects out of memory? I regularly use indexes to flexibly extract parts of data frames and lists and to read files from my hard drive, but I can't figure out how to do so with stored objects. In my case, all of the data
2007 Dec 11
2
range( <dates>, na.rm = TRUE ) (PR#10508)
(Drats! Jitterbug is playing tricks with the PR# again. Attempting to refile so that we can kill PR#10509) Peter Dalgaard wrote: > Kurt.Hornik at wu-wien.ac.at wrote: > =20 >> ------- Start of forwarded message ------- >> Date: Tue, 13 Nov 2007 21:44:57 +0100 >> To: Steve Mongin <sjm at ccbr.umn.edu> >> Cc: cran at r-project.org >> Subject: Re: range(
2007 Dec 11
1
[Kurt.Hornik@wu-wien.ac.at: Re: range( <dates>, na.rm = TRUE )] (PR#10508)
------- Start of forwarded message ------- Date: Tue, 13 Nov 2007 21:44:57 +0100 To: Steve Mongin <sjm at ccbr.umn.edu> Cc: cran at r-project.org Subject: Re: range( <dates>, na.rm = TRUE ) In-Reply-To: <200711062044.OAA14064 at minnow.ccbr.umn.edu> Reply-To: Kurt.Hornik at wu-wien.ac.at From: Kurt Hornik <Kurt.Hornik at wu-wien.ac.at> X-AntiVirus: checked by AntiVir
2008 Aug 28
2
sample consecutive integers efficiently
Hi all, I have some rough code to sample consecutive integers with length according to a vector of lengths #sample space (representing positions) pos<-c(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20) #sample lengths lengths<-c(2,3,2) From these two vectors I need a vector of sampled positions. the sampling is without replacement, making things tough as the sampled integers need
2009 May 29
2
Odd Behavior Out of setdiff(...) - addition of duplicate entries is not identified
I think I am using the improved version of setdiff(...) that handles data.frames, so I think some odd behavior was expected but this one is escaping me. It appears that the the addition of duplicate entries is not caught by the setdiff(...). Is this expected behavior? If so, is there another method or approach that should be used to identify duplicate row entries between two different data
2001 Feb 03
1
callback environment for Tk buttons
Hi. I'm running into problems with using R functions as callback commands for buttons in Tk. The following Tcl/Tk script creates three buttons. If you press hello it prints hello world. If you press HALLO it prints HALLO WORLD. Not exciting, but I need an example... set tt [toplevel .tt] foreach i {"hello" "HALLO"} { pack [button $tt.b$i -text $i
2004 Nov 11
11
Logical "and"
Hello, I have the following very simple problem: Say I have two vectors, a<-c(1,7,4,5,9,11) b<-c(7,4,9) I would like to create a vector containing the elements in a which are not in b. Obviously, this is possible by writing a[a!=b[1] & a!=b[2] & a!=b[3]] But I would like a solution which is applicable to the situation where the number of elements in b is unknown. I have
2011 Nov 08
3
Reading a specific column of a csv file in a loop
Dear all: I have two larges files with 2000 columns. For each file I am performing a loop to extract the "i"th element of each file and create a data frame with both "i"th elements in order to perform further analysis. I am not extracting all the "i"th elements but only certain which I am indicating on a vector called "d". See an example of my code below
2010 Jul 29
4
looking for setdiff equivalent on dataset
Un texte encapsul? et encod? dans un jeu de caract?res inconnu a ?t? nettoy?... Nom : non disponible URL : <https://stat.ethz.ch/pipermail/r-help/attachments/20100729/2fc86d3d/attachment.pl>
2013 Oct 21
1
Set operation generics
Hi all, Would anyone be interested in reviewing a patch to make the set operations (union, intersect, setdiff, setequal, is.element) generic? Thanks, Hadley -- Chief Scientist, RStudio http://had.co.nz/
2008 Jun 05
1
negative indexing with null index sets
Negative indexing is often handy, but I'm in need of an appropriate idiom for handling cases in which the index set can be null: x <- rnorm(5) a <- 1:5 s <- rep(FALSE,5) y <- x[-a[s]] # I'd like y == x but instead one has x[-a[s]] == x[a[s]] == numeric(0), which is rather # unfortunate -- so far the best I have come up with is: as <- ifelse(length(a[s]),-a[s],TRUE)
2004 Feb 27
1
question about setdiff()
Thank you for your answers, I have another question: the behaviour of setdiff(indicesFalse, indicesNA) does not seem predictable to me. > indices [1] 1 2 3 4 5 6 > compareVector [1] NA TRUE TRUE TRUE FALSE NA > indicesNA = indices[is.na(compareVector)] > indicesNA [1] 1 6 > indicesFalse = indices[compareVector == FALSE] > indicesFalse [1] NA 5 NA >
2007 Jan 18
1
Problems replicating rows and associated increasing index
? stato filtrato un testo allegato il cui set di caratteri non era indicato... Nome: non disponibile Url: https://stat.ethz.ch/pipermail/r-help/attachments/20070118/911a5d2a/attachment.pl
2007 Mar 19
2
Index files in .imap directory
A few RC releases ago we had a problem where a user's restored home directory contained a .imap folder either from a previous RC release or perhaps it was a different server. In any event, restoration of the user caused problems since Dovecot choked on the restored .imap index files. Removing those index files cleared the problem. I'm wondering if this is still an issue, and therefore
2007 Dec 10
1
setdiff for data frames
Hello, I have been interested in setdiff() for data frames that operates row-wise. I looked in the documentation, mailing lists, etc., and didn't find exactly the right thing. Given data frames A, B with the same columns, the goal is to extract the rows that are in A, but not in B. Of course, one can usually do setdiff(rownames(A), rownames(B)) but that is cheating. :-) I played around a
2005 Apr 18
2
Very Slow Gower Similarity Function
Hello, I am a relatively new user of R. I have written a basic function to calculate the Gower similarity function. I was motivated to do so partly as an excercise in learning R, and partly because the existing option (vegdist in the vegan package) does not accept missing values. I think I have succeeded - my function gives me the correct values. However, now that I'm starting to use it with
2009 Apr 04
1
comparing columns in a dataframe
hello, I am hoping for some advice regarding comparing variables from 3 versions of a spreadsheet which have been combined into a single dataframe. The aim is to identify which rows have been changed. The dataframe contains 177 rows of data (each cell contains text). 'intersect' produced a file with 35 rows, 'union' a file with 303 rows and 'setdiff' a file with 130