similar to: Deleting rows satisfying a certain condition (sum of some colums>2)

Displaying 20 results from an estimated 4000 matches similar to: "Deleting rows satisfying a certain condition (sum of some colums>2)"

2009 Mar 19
1
object size of a matrix and a list
Hello, My program calculates several variables at each iteration and some of them are integers and the rest are numeric. When I save them into a matrix, all of them are of numeric type, of course. I'm trying to find a way to save time/memory of my program and I was thinking that it might help to force some variables to be of integer type and the other columns numeric type. But when I
2008 May 04
1
help with segmentation fault
Hello all, I'm trying to have C called by R. I wrote C codes that worked perfectly fine with R-2.6.0 in windows system ( using R tools). I had to change to SuSE Linux (this system has 3.2 GHz Intel Xeon processors and 4 GB of RAM), the C codes were compiled okay but when it was called to R-2.6.2, I got error mesage : ***caught segfault*** address 0x1df5000, cause 'memory not
2018 Jan 15
0
barplot that displays sums of values of 2 y colums grouped by different variables
https://stackoverflow.com/questions/25070547/ggplot-side-by-side-geom-bar On Mon, Jan 15, 2018 at 9:39 PM, Kenneth Dyson <kenneth at kidscodejeunesse.org > wrote: > Hi Eric, > > Thanks for the detailed response. > This is not exactly what I want to do but is close. > I want 2 bars for each city, 1 with the sum for "yes" , the other, beside > it, with the sum for
2011 Jun 01
4
subsetting with condition
Dear R Team, I am a new R user and I am currently trying to subset my data under a special condition. I have went through several pages of the subsetting section here on the forum, but I was not able to find an answer. My data is as follows: ID NAME MS Pol. Party 1 John x F 2 Mary s S
2018 Jan 15
0
barplot that displays sums of values of 2 y colums grouped by different variables
It is not generally advisable to get too fancy with stat functions in ggplot... things can easily get more complicated than ggplot is ready to handle when it comes to calculations. It is better to create data that corresponds directly to the graphical representations you are mapping them to. Read [1] for more on this philosophy. [1] H. Wickham, Tidy Data, Journal of Statistical Software,
2009 Jun 17
2
cumulative sum in data frame
Dear R-Help List, I have a question about data manipulation. I tried to make code myself but too much for me. I would greatly appreciate your help. I have data set consisting of site (from 1 to N1) and distance and there are several variables (1 to N2) collected from each sampling site. I am interested in looking at cumulative sums of each variable based on site and distance like below. Can
2006 Apr 11
5
[OT] RailsConf Tickets ?
Just in case -- if anybody has got a spare ticket for RailsConf, i''d be very happy to buy it... I live in Chicago, so i can do this on very short notice as well, should anybody not be able to attend... :) Otherwise - this being Chicago - no question there''ll be scalpers... :) Thanks, Sebastian
2018 Jan 15
5
barplot that displays sums of values of 2 y colums grouped by different variables
I am trying to create a barplot displaying the sums of 2 columns of data grouped by a variable. the data is set up like this: "city" "n" "y" <br> mon 100 200 <br> tor 209 300 <br> edm 98 87 <br> mon 20 76 <br> tor 50 96 <br> edm 62 27 <br> the resulting plot should have city as the x-axis, 2 bars per city, 1 representing
2007 Mar 18
2
subset by multiple columns satisfying the same condition
Hi All, I have a very simple question. Suppose I had a data frame with 100 columns, now I wanted to select rows with the values of some columns satisfying the same condition, like all equal to "Tom". I know I can use the 'and' operator "&", but it's painful if there were many columns. Can anyone give me some advice? Thanks in advance, FD [[alternative HTML
2005 Jan 03
3
colums in ''shorewall show connections'' command
I do not understand some colums in the output to ''shorewall show connections'' /root> shorewall show connections Shorewall-2.0.2f Connections at firewall - Mon Jan 3 13:12:52 PST 2005 .. tcp 6 353296 ESTABLISHED src=112.129.244.121 dst=224.81.133.205 sport=3647 dport=443 src=224.81.133.205 dst=112.129.244.121 sport=443 dport=3647 [ASSURED] use=1 I would like to know
2011 Jun 27
1
show colums x till end
Hey again, I didn't wat questions to get mangled up, so here's my second email. In matlab, there is the simple possibility to access colums x till last of a matrix using mydata(1:3, 5:end). In R, I so far use mydata[1:3, 5:ncol(mydata)] Is there a faster way? (in terms of typing) Thanks ahead, Berry ------------------------------------- Berry Boessenkool University of Potsdam,
2012 Jun 27
1
how to convert list of matrix (raster:extract o/p) to data table with additional colums (polygon Id, class)
Hi List, I have a raster and a polygon with attribute ID and Class. I want to have the fraction of each class present in each pixel of raster. I have use the raster::extract to get the value and weights as below. ex<-extract(raster,polygon,weighted=TRUE) this gives me [[1]] value weight 13943 0.24 13958 0.02 13959 0.84 13960 0.19 13987 0.03 13988 0.31 13990 0.30 [[2]]
2008 Apr 02
1
How to best read in this data / Switching rows and colums
Hi, I have to read in data which looks like this: SeriesA, 5, 5, 5, 5 SeriesB, 8, 5, 8, 8, 7, 10, 2, 7, 3 SeriesC, 5, 5, 8, 4, 7, 7, 4, 5 SeriesD, 5, 9, 5, 4, 2, 3, 10, 1 SeriesE, 7, 10, 9, 5, 8, 6, 10, 9, 5, 10, 4, 3, 2, 10, 8, 8, 10, 10, 10 SeriesF, 1, 2, 1, 5, 1, 7, 5, 7, 7, 3 There are actually much more data points in the data, each line contains between 300 and 500 values. If I use
2011 Feb 24
1
Removing -Inf values from all the colums in a dataframe
Hi there, b is my dataframe. I have a dataframe. I am trying to get rid of the -INF values but didnt have much luck b[which(is.finite(b))] I can get rid of it for a single column b[,1][which(is.finite(b[,2]))] but not for all dataframe I used it inside of a sapply but still no dice my guess is it might have some differing row numbers and just ignoring the columns itself. Thanks Ramya
2007 Oct 23
3
sum variable as long condition is true
Hello R For expierienced user, the following problem will be easy to solve: a<-c(0,1,0,1,0,2,3,4,3,2) b<-c(3,3,3,4,4,4,7,7,7,10) c<-data.frame(a,b) Data Frame c contains tow colums. I would like to sum up all values in a as long as b stays the same: sum(a[which(b==1)]) does this, but i have to manually put in b then i tryied st like this, but i canno't save it properly for (i
2009 Dec 18
1
The RSQLite version of dbGetQuery drops colums
Hi all, I just noticed (the hard way of course) that when a query returns 0 rows, the columns in the resulting data.frame get dropped as well. See the following example code (where conn is an active connection to an SQLite db): > dbGetQuery(conn, "select 1 as hey, 2 as ho where 1") hey ho 1 1 2 > dbGetQuery(conn, "select 1 as hey, 2 as ho where 0") data frame
2009 Jan 05
1
How to extract range of colums in a data frame
Dear all, I have the following data frame: > dat V1 V2 V3 V4 V5 V6 V7 V8 V9 1 1 AAAACACCCACCCCCCCCCCCCCCCCCCCCCCCC 9.0 18 12.00 18.0 15.0 12.0 6.0 2 1 ACGATACGGCGACCACCGAGATCTACACTCTTCC 18.0 8 12.00 18.0 15.0 12.0 18.0 3 1 ACTACTGCTCCCCCCCCACTCCCCCCCCCCCCCC 15.0 8 12.00 12.0 18.0 12.0 12.0 4 1 ACTTATACGGCGACCACCGAGATCTACACTCTTT 15.0
2012 Apr 25
1
Create new Vector based on two colums
Hello, I am trying to get a new vector 'x1' based on the not NA-values in column 'a' and 'b'. I found a way but I am sure this is not the best solution. So any ideas on how to "optimize" this would be great! m <- factor(c("a1", "a1", "a2", "b1", "b2", "b3", "d1", "d1"), ordered
2010 Jul 07
1
SAM program and R mirror - which port to open?
To whom this may concern, I am having issues installing a program called "SAM" (Statistical Analysis of Microarrays) which is an excel add in and requires the use of R. Due to the firewall at my hospital, R cannot connect to a mirror and therefore cannot install necessary files for the complete installation of SAM. The IT department has asked me which "port" needs to be opened
2008 May 05
1
Is there any way to find out how a certain functions are implemented in R?
Hello I wrote a bootstrap program in C language that is called and run by R. When I tried it, it is slow and I'm trying to write and run the whole thing in C. But I cannot use handy functions in R and need to figure out how to write those functions by myself. Is there any way that I can get the actual codes that implement functions in R so that I can translate them into other languages? For