search for: excel_data

Displaying 5 results from an estimated 5 matches for "excel_data".

2017 Oct 12
4
comparing two strings from data
...t entry of the first column is 5th entry in the second column, I would like to keep this index 5. AST2017000005534 TUR2017000001428 CTS2017000079930 CTS2017000071989 CTS2017000079931 CTS2017000072015 In a loop, when I use the following code to get those indices, data_2 = read.csv("excel_data.csv") column_1 = data_2$data1 column_2 = data_2$data2 match_list <- array(0,dim=c(310,1)); # 310 is the length of the first column for (indx in 1: 310){ for(indx2 in 1:713){ # 713 is the length of the second column if(column_1[indx] == column_2[indx2] ){ match_lis...
2017 Oct 13
1
comparing two strings from data
Combining and completing the advice from Greg and Boris the complete solution is two lines: data_2 <- read.csv("excel_data.csv", stringsAsFactors = FALSE) match_list <- match( data_2$data1, data_2$data2 ) The vector match_list will have the matching position when it exists and NA's otherwise. Its length will be the same as the length of data_2$data1. You should get experience in reading the help informati...
2017 Oct 12
0
comparing two strings from data
It's generally a very good idea to examine the structure of data after you have read it in. str(data2) would have shown you that read.csv() turned your strings into factors, and that's why the == operator no longer does what you think it does. use ... data_2 <- read.csv("excel_data.csv", stringsAsFactors = FALSE) ... to turn this off. Also, the %in% operator will achieve more directly what you are trying to do. No need for loops. B. > On Oct 12, 2017, at 4:25 PM, Yasin Gocgun <yasing053 at gmail.com> wrote: > > Hi, > > I have two columns that...
2006 May 18
7
Server out to excel
How would one server out to excel a html table with the mime/content type application/vnd.ms-excel ? In PHP it would be something like ?php header("Content-Type: application/vnd.ms-excel"); ------ But how do I do this in rails? Cheers Glenn -- Posted via http://www.ruby-forum.com/.
2010 Sep 21
3
Error in eval(expr, envir, enclos)
I am absolutely new to R and I am aware of only a few basic command lines. I was running a robust regression in R, using the following command line library (MASS) rfdmodel1 <- rlm (TotalEmployment_2004 ~ MISSISSIPPI + LOUISIANA + TotalEmployment_2000 + PCWhitePop_2004 + UnemploymentRate_2004 + PCUrbanPop2000 + PCPeopleWithACollegeDegree_2000 + PCPopulation.of.or.over.65.years.of.age_2004)