similar to: subsetting a dataframe

Displaying 20 results from an estimated 6000 matches similar to: "subsetting a dataframe"

2010 May 13
1
What's data() for?
Hi there, >library(faraway) >pima pregnant glucose diastolic triceps insulin bmi diabetes age test 1 6 148 72 35 0 33.6 0.627 50 1 2 1 85 66 29 0 26.6 0.351 31 0 >data(pima) >pima pregnant glucose diastolic triceps insulin bmi diabetes age test 1 6 148 72 35 0 33.6
2007 Dec 01
2
R function for percentrank
Hi, Does anyone know if R has a built-in function that is equvalent to Excel's percentrank, i.e., returns the rank of a value in a data set as a percentage of the data set? Thanks, -- Tom [[alternative HTML version deleted]]
2003 Apr 13
1
The priority in HTB
Hi, In the article Hierachical token bucket theory says that "Just look at the self feed list and select the nonempty slot (one with a line) with lowest level and highest prio." Then I wonder that if the highest priority class is always in the "CAN SENT" mode, the other classes will have less opportuinity to send packet? Becase they have to wait the hightest priority class
2010 Jun 04
1
Your message to R-help awaits moderator approval
What filter rule is violated? So frustrated, why can't I post question! ----- Original Message ---- From: "r-help-bounces at r-project.org" <r-help-bounces at r-project.org> To: yjmha69 at yahoo.com Sent: Fri, June 4, 2010 12:28:37 PM Subject: Your message to R-help awaits moderator approval Your mail to 'R-help' with the subject ? ? subsetting a dataframe Is
2009 Mar 30
1
what is R equivalent of Fortran DOUBLE PRECISION ?
I noticed taht R cannot understand certain Fortran real constant formats. For instance: c14 <- as.double( 7.785205408500864D-02) Error: unexpected symbol in " c14 <- as.double( 7.785205408500864D" The above "D" is used in Fortran language to indicate the memory starage mode. That is for instructing Fortran compiler to store such a REAL constant in DOUBLE
2019 Sep 19
1
Re: Thoughts on nbdkit automatic reconnection
I have an update on the networking issue: - After the deep dive into the logs of the firewall by customer's security team, it turns out that even though there were some disconnections, the time-stamps do not match. This means that we got the disconnected by something else (ESXi or conversion host perhaps) - As we mentioned in the chat briefly, there could be general keep-alive issues on both
2011 May 17
4
subsetting a list of dataframes
Hello All, I have a list of dataframes, and I need to subset it by keeping only those dataframes in the list that meet a certain criterion. Specifically, I need to generate a second list which only includes those dataframes whose number of rows is > 1. Could someone suggest how to do this? I have come close to what I need with loops and such, but there must be a less clumsy way... Many
2003 Aug 26
3
Subsetting a dataframe
Hi R-people I have a question concerning subsetting. I have a dataframe which contains among other variables the variable "subject". For each subject number there are several rows, e.g.: subject treatment concentration day 19 a 15,4 1 19 a 18,3 2 19 a 2,3 3 etc. Im trying to subset the dataframe to get for
2004 Jul 30
1
Subsetting dataframe
Dear R-help, I have a question on subsetting a dataframe and I searched all of R-help to no avail. Please view the following example dataframe: # Example > x <- factor(rep(c(1,2,3,4),2)) > y <- c(1,4,3,2,1,2,5,1,2) > z <- c(10,12,18,21,24,32,34,12,23) > test <- data.frame(x, y, z) > test x y z 1 1 1 10 2 2 4 12 3 3 3 18 4 4 2 21 5 1 1 24 6 2 2 32 7 3 5 34 8
2010 Mar 24
1
flexible alternative to subsetting dataframe inside nested loops
I have a dataFrame variable: L1 L2 L3 ... v1 v2 ... 1 2 3 4 ... I want to process subsets of it as defined by combinations of L1-L2-L3. I do it successfully using nested loops: for (i in valuesOfL1 { for (j in valuesOfL2) { for (k in valuesOfL3) { tempData <- subset(dataFrame, (L1 == i & L2 == j & L3 == k, select=c(v1,v2) )) if
2018 Mar 12
0
Dataframe Subsetting comparison
Hello All, I am facing a unique issue and am unable to find any help in R help pages or online. I will appreciate your help for the following problem: I have 2 data-frames, samples below and there is an expected output R Dataframe1: C1 C2 C3 C4...... CN R1 0 1 0 1 R2 1 0 1 1 R3
2009 Jul 08
1
subsetting a dataframe with a string logical expression
Hi, I am trying to subset a dataset based on a filter defined by a user... I prompt the user for input.. resulting in a string logical expression ("X1 < 3"). I have tried using subset, but it is looking for a logical expression, not a character string. I keep getting the error: 'subset' must evaluate to logical. Example: x <- data.frame(matrix(1:15, nrow=5, ncol=3))
2010 Oct 24
1
Subsetting a dataframe
Hi, I have a dataframe with 43 columns and a 1000 rows. Each entry in the dataframe can be either P or A. here is a small chunk: c1 c2 ... c43 r100 P A ... P r101 A A ... A r102 P P ... P How does one subset this data frame to select those rows that have only P's in them? Thanks in advance. Anjan -- ===================================
2003 Jan 22
1
dataframe subsetting behaviour
Hi, I'm trying to understand a behaviour that I have encountered and can't fathom. Here's some code I will use to illustrate the behaviour: # start with some data frame "a" having some named columns a <- data.frame(a=rep(1,3),c=rep(2,3),d=rep(3,3),e=rep(4,3)) # create a subset of the original data frame, but include a # name "b" that is not present in my
2013 Apr 06
1
Multiple subsetting of a dataframe based on many conditions
Hello Everybody, I'm working with a dataframe that has 18 columns. I would like to subset the data in one of these columns, "present", according to combinations of data in six of the other columns within the data frame and then save this into a text file. The columns I would like to use to subset "present" are: * answer (1:4) [answer takes the values 1 to 4] *p.num
2003 Sep 10
2
dataframe subsetting
I can create a small dataset, "x" below, and subset out rows based on values of a certain variable. However, on the dataset I'm working on now, "latdata" below, I get a subscript error. Any advice is appreciated! Ryan Successful: > is.data.frame(x) [1] TRUE > x X1 X2 X3 1 1 3 5 2 2 4 6 > x[x$X2 %in% c(3),] X1 X2 X3 1 1 3 5 Unsuccessful: >
2003 Apr 07
4
subsetting a dataframe
How does one remove a column from a data frame when the name of the column to remove is stored in a variable? For Example: colname <- "LOT" newdf <- subset(olddf,select = - colname) The above statement will give an error, but thats what I'm trying to accomplish. If I had used: newdf <- subset(olddf,select = - LOT) then it would have worked, but as I said the column
2007 Jul 18
2
Subsetting Enigma: More rows after dataframe[-list,]?
Hello again, I'm trying to purge the indexes in i.delete from frame and end up with more rows!? Please be so kind and let me know where I screw this up ... Joh > i.delete [1] 40 45 165 212 253 270 280 287 301 352 421 433 463 467 487 [16] 517 537 542 573 594 596 612 614 621 635 650 696 699 707 732 [31] 738 776 826 891 892 936 937 935 940 976
2004 Sep 16
1
cor() fails with big dataframe
Hello, I have a big dataframe with *NO* na's (9 columns, 293380 rows). # doing memory.limit(size = 1000000000) cor(x) #gives Error in cor(x) : missing observations in cov/cor In addition: Warning message: NAs introduced by coercion #I found the obvious workaround: COR <- matrix(rep(0, 81),9,9) for (i in 1:9) for (j in 1:9) {if (i>j) COR[i,j] <- cor (x[,i],x[,j])} #which works fine,
2012 Apr 26
2
Subsetting dataframe with missing values
Dear R-community, I am using R (V 2.14.1) on Windows 7. I have a dataset which consists of 19 variables for 91 individuals or rows. Two of my variables are Age (adult/chick, with no NA values) and Sex (0 for females/1 for females, with quite a few NA values). The sex of many adult birds is unknown (entered as NA in dataframe). At some point of my analyses, I happen to need to need to work with