similar to: Re : Adding column sum to new row in data frame

Displaying 20 results from an estimated 2000 matches similar to: "Re : Adding column sum to new row in data frame"

2010 May 20
2
Re : Manipulating Data Frames
Dear All, I have data some thisng like this : > data <- read.csv(file='ipsample.csv',sep=',' , header=TRUE) > data State Jan Feb Mar Apr May Jun 1 AAA 1 1 0 2 2 0 2 BBB 1298 1195 1212 1244 1158 845 3 CCC 0 0 0 1 2 1 4 DDD 5 11 17 15 10 9 5 EEE 18 28 27 23 23 16 6 FFF 68 152 184 135 111
2010 May 25
2
rounding up to nearest integer
Dear All, I have a data frame "data" and the below is the str of "data" : $ Feb : int 1 1195 0 11 28 152 24 2 1 1470 ... $ Mar : int 0 1212 0 17 27 184 15 1 1 1311 ... $ Apr : int 2 1244 1 15 23 135 11 0 1 991 ... $ May : int 2 1158 2 10 23 111 16 1 1 1237 ... $ Jun : int 0 845 1 9 16 86 16 2 1 1129 ... $ Jul : int 0 832 0 7 16 68 9 1 0 994 ... $ Aug
2010 May 21
1
help to indexing data frame
Dear All, I have data some thing like this: > sample State Jan Feb Mar A 1 1 1 B 1298 1293 1294 C 0 0 0 D 5 5 5 E 18 18 18 I need to multiply "Jan" column *1000 and divided by the same number, like this : > data[,-(1:2)] * ((data[,2] *1000)/data[ ,2]) I doing some thing
2010 Nov 09
2
help to merge two data frame if name matches
Dear All, I have two data like this : $cat main.csv name,id,memory,storage mohan,1,100.20,1.10 ram,1,200,100 kumar,1,400,50 xxx,1,100,40 aaa,1,800,45 mount,1,200,80 > main <- read.csv(file='main.csv',sep=',' , header=TRUE) > main name id memory storage 1 mohan 1 100.2 10 2 ram 1 200.0 100 3 kumar 1 400.0 50 4 xxx 1
2013 Aug 27
6
Scale of axis for two data sets
Hi, Kbytes RSS rNo 2689632 1450876 1433788 2689632 1450876 1433788 2689632 1450876 1433788 2689632 1450876 1433788 2689632 1450876 1433788 2689632 1450876 1433788 2689632 1450876 1433788 2689632 1460168 1443084 plot(data$rNo,data$RSS,pch=0,type="b",col=36,axes=FALSE, ylab="", xlab="",las=2,lwd=2.5) title(" PID -
2013 Nov 01
2
Replace element with pattern
Hi, I have a data frame with one column and several rows of the form. "Peak Usage : init:2359296, used:15859328, committed:15892480, max:50331648Current Usage : init:2359296, used:15857920, committed:15892480, max:50331648|-------------------|" I tested the regex Current.*?[\|] in an online tester which greedily matches upto the first 'pipe' character Current
2010 Nov 09
4
help to add a new column filled with value 1
Dear All, I have a data frame with 5 column and 201 row data. I want to add one more column between column 1 and 2 with value of 1. So the new column has to be the second column filled with 1. Any help will be appreciated. Thanks for your time. Thanks & Rg Mohan L
2009 Mar 11
4
R-help: grep in for loop using index - doesn't work
Hi everyone I am trying to use grep in a for loop to compare a string value. It works if I use the actual index value but when I use the for loop index, it doesn't work. Any suggestions plz. Here is the code: data <- read.table(file="Sigmoid.csv", head=FALSE, sep=","); c1 <- data$V1 c2 <- data$V2 c3 <- data$V3 c1data <- data.frame(c1); c2data <-
2005 May 17
4
HOW TO Enable IPSec for FreeBSD.......???
Hi, I have tried to enable IPSec support for my FreeBSD( 4.11-RELEASE) system. First, I copied the generic kernel configuration file to a file I called MYKERNEL: #cp /usr/src/sys/i386/conf/GENERIC /usr/src/sys/i386/conf/MYKERNEL Then, I added the following three lines to the options section of /usr/src/sys/i386/conf/MYKERNEL: options IPSEC options IPSEC_ESP options
2010 Nov 07
3
help to sum up data frame
Dear All, I have a data frame like this: name ip Bsent Breceived a 1 0.00 0.00 a 2 1.43 19.83 a 1 0.00 0.00 a 2 1.00 1.00 b 1 0.00 2.00 b 3 0.00 2.00 b 2 2.00 0.00 b 2 2.00 0.00 b 1 24.40 22.72 c
2009 Mar 16
2
plot lines at 0,0 axis
Hii I am trying to plot lines at (0,0) axis where my scatterplot goes between positive n negative values for x and y axis i can plot point using points(0,0) but if i want to draw lines along it, can't seem to get it right Mohan
2007 Jul 26
5
ROC curve in R
Hi, I need to build ROC curve in R, can you please provide data steps / code or guide me through it. Thanks and Regards Rithesh M Mohan [[alternative HTML version deleted]]
2013 Sep 20
1
Averate memory usage trend
Hi, I would like to understand how to draw a graph to find out the average memory used by a single httpd process given these details collected over a period of several days. I code R but this is about a method to find an average memory utilization. I believe I have enough data. How should I statistically calculate this ? The figures inside braces are the total httpd processes at
2017 Aug 10
2
EOF within quoted string
Hi, Reading http://ssc.wisc.edu/~ahanna/20_newsgroups.csv after downloading it using data <- read.csv("20_newsgroups.csv",header=TRUE) throws this. Warning message: In scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, : EOF within quoted string So, for example, the first line in the file is this. This column contains only such text. Is there a way read it ?
2010 May 01
1
Re :reading large file
On Sat, May 1, 2010 at 11:02 AM, Mohan L <l.mohanphy@gmail.com> wrote: > Hi All, > > I am new to R and the mailing list. > > I have a data file (.xls) format with little bit large (16 column,35000 > rows ) data file. I am trying to read this file for calculation. I have > converted the file into .csv format and read like that : > > > bmtrend <-
2007 Oct 18
4
exporting service on multiple wan
Hi all, I''ve a routing problem. I''m setting up a router based on debian (kernel 2.4). I need to setup routing to export an ftp service (ftp server is in dmz) to 2 wan (both). I setup prerouting ad forward rule with no problem. The problem is that reply packet use default gateway (default wan) even though they are enter using the other wan. I solved it marking packets in input
2017 Aug 11
1
EOF within quoted string
Yes. I tried that already. Not straightforward. data <- read.csv("20_newsgroups.csv",fill=TRUE,as.is=T,header=F, quote="", sep=",", encoding="UTF-8") This line does read it haphazardly. The emails in the column are split into multiple columns and there are several columns with just ?NA?. Totally 202 columns. And then I removed columns with NA?s and
2017 Aug 10
0
EOF within quoted string
You might want to try some of the suggestions mentioned in this post: https://stackoverflow.com/q/17414776/2140956 Jean On Thu, Aug 10, 2017 at 7:59 AM, <Mohan.Radhakrishnan at cognizant.com> wrote: > Hi, > > Reading http://ssc.wisc.edu/~ahanna/20_newsgroups.csv after downloading > it using > > data <- read.csv("20_newsgroups.csv",header=TRUE) > >
2011 Sep 08
2
pie chart
Hi All, I have txt file like : $ cat data.txt US 10 UK 12 Ind 4 Germany 14 France 8 > rawdata <- read.table(file='data.txt',sep='\t' , header=FALSE) > rawdata V1 V2 1 US 10 2 UK 12 3 Ind 4 4 Germany 14 5 France 8 I want to draw pie chart for the above data. How to split rawdata into : con <-
2007 Oct 11
3
Problem with multiple ADSL lines
Hi all, I have managed to setup a Fedora 7 box with 3 ethernet cards and two ADSL modem/routers from different suppliers as LARTC recommends. I am able to direct traffic for specific internal IPs either to one or the other ADSL line. However, I am faced with two problems I am struggling for the solution: 1. I have opened a few ports on the ADSL router/firewalls to talk to internal hosts; say when