Displaying 20 results from an estimated 9000 matches similar to: "Re :reading large file"
2010 May 01
2
Re :
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 <- read.csv(file="simple.csv",head=TRUE,sep=",")
> bmtrend
will display something in the middle of display
[
2010 May 04
1
make a column from the row names
Dear All,
> avglog
01/11/09 02/11/09 03/11/09 04/11/09
9.750000 4.500000 4.500000 8.666667
> avglog1 <- data.frame(avglog)
> avglog1
avglog
01/11/09 9.750000
02/11/09 4.500000
03/11/09 4.500000
04/11/09 8.666667
The first column isnt a column, It's the row names. I makeing a column from
the row names by using the following
> value1$Day <- rownames(value1)
>
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 May 19
1
Re : Adding column sum to new row in data frame
Dear All,
I have data some thing like this:
State Jan Feb Mar Apr May Jun AAA 1 1 0 2 2 0 BBB 1298 1195 1212 1244
1158 845 CCC 0 0 0 1 2 1 DDD 5 11 17 15 10 9 EEE 18 28 27 23 23 16 FFF
68 152 184 135 111 86
I want to sum all the column(Jan, Feb, Mar ...) and have to merge the total
at last row. like this:
StateJanFebMarAprMayJunAAA110220BBB12981195121212441158845CCC 000121DDD51117
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 07
2
extract required data from already read data
Hi all,
I have data like this:
>sample <- read.csv(file="sample.csv",sep=",",header=TRUE)
> sample
stdate Domain sex age Login
1 01/11/09 xxx FeMale 25 2
2 01/11/09 xxx FeMale 35 4
3 01/11/09 xxx Male 18 30
4 01/11/09 xxx Male 31 3
5 02/11/09 xxx Male 32 11
6 02/11/09 xxx Male 31 1
7 02/11/09
2010 May 17
0
Re : append new line in existing graph
Dear All,
I am executing my R script from PHP using the shell_exec.
$return = shell_exec("/usr/bin/R --slave --args ".$Domain.",".$Gender." <
/var/www/html/trends/newTrend.R");
In newTrend.R, I am plotting graph and save in pdf file using the below
code. It will create a pdf file with two line.
pdf(file="/var/www/html/trends/bmtrend.pdf", height=7.5,
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
2010 May 01
2
Average Login based on date
Hi All,
I have the data like this :
>sample <- read.csv(file="sample.csv",sep=",",header=TRUE)
> sample
stdate Domain sex age Login
1 01/11/09 xxx FeMale 25 2
2 01/11/09 xxx FeMale 35 4
3 01/11/09 xxx Male 18 30
4 01/11/09 xxx Male 31 3
5 02/11/09 xxx Male 32 11
6 02/11/09 xxx Male 31 1
7 02/11/09
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
2010 Nov 06
1
Help required to remove \\N
Dear All,
I have .csv file it looks like this :
rawdata <- read.csv(file='/home/Mohan/Rworks/tmp/VMList_User.txt',sep='\t'
, header=FALSE)
> head(rawdata,n=5)
Tenant Domain Owner Current State
1 \\N ROOT admin Running
2 \\N ROOT admin Stopped
3 \\N ROOT admin Running
4 \\N
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
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 <-
2010 May 26
1
Factor to Numeric
Dear All,
I have a data frame with State and 12 Months as column. I want to convert
all the 12 month column from factor to numeric.
any help will be greatly appreciated.
> str(data)
'data.frame': 33 obs. of 9 variables:
$ State : Factor w/ 33 levels "Andaman and Nicobar Islands",..: 1 2 3 4
5 6 7 8 9 10 ...
$ April : Factor w/ 21 levels
2010 May 28
2
Re : help to replace variable value
Dear All,
I have a data frame "data" with Jan , Feb as column. I using like this
data$Jan to take Jan column. I have the Jan in another variable
var1 <- "Jan"
data$var1
I need to replace the variable value there . Any help will be greatly
appreciated.
Thanks & Rg
Mohan L
[[alternative HTML version deleted]]
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 23
1
Re : Indexing array to 1000
Dear All,
I have an array some thing like this:
> avglog
January February March April May June July
August September
60102 83397 56774 48785 49010 40572 38175
47037 51402
The class of "avglog" array.
> class(avglog)
[1] "array"
> str(avglog)
num [1:9(1d)] 60102 83397 56774 48785 49010 ...
- attr(*,
2010 May 02
1
Re :argument is not numeric or logical
Hi all,
I have data size of :
> dim(sample)
[1] 35943 17
The first column is "stdate" - is date ( 01/11/2009 00:00:00,02/11/2009
00:00:00,02/11/2009 00:00:00 etc... )
Login is 13th column - is numbers (12,0,1 erc...)
The below operation return the following error.
> sample1 <- read.csv(file="sample1.csv",sep=",",header=TRUE)
> avglog <-
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)
>
>