Displaying 20 results from an estimated 300 matches similar to: "comparing two strings from data"
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
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
2009 Dec 03
2
Dataframe help
Hi there
I have two dataframes
Dataframe_1
column_1 colum_2
121 12345
145 1675
167 2765
Dataframe_2
column_1 column2
121 abc
345 lmn
167 efg
I want a resulting dataframe
121 12345 abc
167 2765 efg
how do i go abt it
Ramya
--
View this message in context: http://n4.nabble.com/Dataframe-help-tp947934p947934.html
Sent from the R
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/.
2012 Apr 18
1
Help with creating conditional categorical variables in R
Hi,
I am stuck with creating a conditional categorical variable in R
If my dataframe data_2 has 3 variables A,B,C I want to create variable D which would be something like :
data_2$D <- ifelse(data_2$A < data_2$B & promotion_ind =="N",1,0),
this throws up an error "In Ops.factor(data_2$A,data_2$B) :
< not meaningful for factors
I have tried converting the
2016 Jan 11
2
tftp-hpa features?
On Fri, Jan 8, 2016 at 5:46 PM, Geert Stappers via Syslinux
<syslinux at zytor.com> wrote:
> On Fri, Jan 08, 2016 at 03:40:37PM -0600, Matt Zagrabelny via Syslinux wrote:
>> Greetings,
>>
>> Is this list (a|the best) place to make feature requests for tftp-hpa?
>
> Yes, it is.
> from email header List-Id: For discussion of Syslinux and tftp-hpa
2015 Jun 08
2
help awk y shells en R
Hola buenas,
a veces empleo desde R shells de unix, Existe alguna manera de utilizar
estos shelss desde windows o el lenguaje awk.
La idea es hacerlo siempre desde R, igual invoncando cygwin desde windows
es posible. Pero no me queda claro
Un abrazo y gracias por adelntado
Javier
#_____________________________________________________________________
# EJEMPLO, ¿Que habría que poner en
#
2017 Sep 04
1
Merge by Range in R
Hi,?
I have two big data set.?
data _1 :?
> dim(data_1)
[1] 15820 5
> head(data_1)
? ?Chromosome ?????Start????????End????????Feature GroupA_3
1: ? ? ? ????????chr1 521369 ?750000 ????chr1-0001 ? ?????0.170
2: ? ? ? ????????chr1 750001 ?800000 ????chr1-0002 ? ????-0.086
3: ? ? ? ????????chr1 800001 ?850000 ????chr1-0003 ? ?????0.006
4: ? ? ? ????????chr1 850001 ?900000 ????chr1-0004 ?
2002 Dec 16
1
help
Hi
I download the R, but I dont know how to get the script (syntax) file
and run it.
I would be very pleased for any help.
Regards.
Yasin
--
Yasin Al-tawarah
Tel: (01782) 583652
E-mail: mad26 at keele.ac.uk
2013 Jun 21
2
an issue about removing "NA"s from an array
Hi,*
*I would like to set the entries of an array that appear as "NA" to a
certain integer, but did not find a way to do so. The related code is given
below:
A <- array(-1000 , dim=c(100) );
for(i in 1: 100 ){
A[i] =B[i,57] - B[i,5];
}
A [ which( A == "NA") ] <- 900;
The "NA"s still appear as the entries of the array A.
Can you tell me what is
2011 Nov 30
1
s/n ratio detection etc...
Hi everybody,
I' ve been following this list for a while now.
Is there a way to detect the individual and cumulative s/n ratio values for
the incoming calls in Asterisk or any other Call Center solution?...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20111130/d0d53c1f/attachment.htm>
2018 Oct 11
3
no mutual signature algorithm with RSA user certs client 7.8, server 7.4
On Thu, 11 Oct 2018, Damien Miller wrote:
> On Thu, 11 Oct 2018, Adam Eijdenberg wrote:
>
> > Thanks for looking into. I wasn't able to get the patch to apply
> > cleanly to the portable source for whatever reason, so I manually made
> > the changes and got a little further. I now get past the "no mutual
> > signature algorithm" client message, and get
2012 Apr 04
2
extract data
HI,
I would like to extract data in a specific way. For example, the rainfall data
0,0,1.5,0,0, 3,1,2.5,0,0,0,0, 2.3,0,0,0, 2.1,1.4,0,0,0, 3,2,1,0,0,0...
data_1: 1.5, 2.3 ( a single nonzero data between zeros data)
data_2: 3.1, 2.5, 2.1,1.4 ( two nonzero data between zeros data)
data_3: 3,1,2.5, 3,2,1 ( three nonzero data between zeros data)
Thank you so much for any
2015 Jun 08
2
help awk y shells en R
Al final resulto más fácil de lo esperado. Hay que instalar cywin y
utilizar los comandos de la siguiente manera
system('C:/cygwin/bin/wc -l var_risco_2012.csv')
Esto en principio funciona
El 8 de junio de 2015, 17:41, Carlos Ortega <cof en qualityexcellence.es>
escribió:
> Hola,
>
> Mira esto:
>
>
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)
2016 Jan 08
2
tftp-hpa features?
Greetings,
Is this list (a|the best) place to make feature requests for tftp-hpa?
If not, would you point me in the right direction, please?
Thanks much!
-m
2010 Dec 29
5
linear regression for grouped data
Hi,
I have been examining large data and need to do simple linear regression
with the data which is grouped based on the values of a particular
attribute. For instance, consider three columns : ID, x, y, and I need to
regress x on y for each distinct value of ID. Specifically, for the set of
data corresponding to each of the 4 values of ID (76,111,121,168) in the
below data, I should invoke
2007 Nov 25
2
rowMean, specify subset of columns within Dataframe?
I would like to calculate the mean of tree leader increment growth over 5
years (I1 through I5) where each tree is a row and each row has 5 columns.
So far I have achieved this using rowMeans when all columns are numeric type
and used in the calculation:
Data1 <- data.frame(cbind(I1 = 3, I2 = c(0,3:1, 2:5,NA), I3
=c(1:4,NA,5:2),I4=2,I5=3))
Data1
Data1$mean_5 <- rowMeans(Data1, na.rm =T)
2010 Nov 06
4
Using changing names in loop in R
Hello everybody,
I have usually solved this problem by repeating lines of codes instead of a
loop, but it's such a waste of time, I thought I should really learn how to
do it with loops:
What I want to do:
Say, I have several data files that differ only in a number, e.g. data
points (or vector, or matrix...) Data_1, Data_2, Data_3,... and I want to
manipulate them
e.g. a simple sum of
2008 May 18
2
Rendering data in tables
Hello all,
I am new to Rails.
I don''t know whether it is possible are not.
In my application, I need get data from one table , then arrange these
data in table in textfield, then I need to edit data in all rows in
single form.
At the end I need to save these data back to databse.
How can I do this
Is this possible
<%= tag("input" , {:type => '''',