similar to: How to replace match words whith colum name of data frame?

Displaying 20 results from an estimated 100 matches similar to: "How to replace match words whith colum name of data frame?"

2017 Jul 01
0
How to replace match words whith colum name of data frame?
Dear ?, I'm sure that there are many ways to do what you want; here's one: > cbind(concept_df, category= + ifelse(apply( + sapply(chemical_df$chemical, + function(x) grepl(x, concept_df$concept)), + 1, any), + "chemical", "")) concept category 1 butan
2017 Jul 30
0
How to replace match words whith colum name of data frame?
Try the stringr package. This should work chemical=c("basic", "alkalin", "alkali", "acid", " ph ", "hss") chemical_match <- str_c(chemical, collapse = "|") chemical_match concept_df$match[str_detect(concept_df$concept, chemical_match)] <- "chemical" concept_df > concept_df concept match
2017 Aug 01
0
How to replace match words whith colum name of data frame?Hi--
Hi-- concept_df$NewCol <- ""; kw <- "acid|ph"; bb <- grepl(kw,concept_df$concept) concept_df[dd,2] <- "chemical" The is a bit late but it accomplish the same with base R. Good luck--EK PS.. my email doesn't accept reply [[alternative HTML version deleted]]
2013 Jan 24
2
Question on matrix calculation
Hello again, Ley say I have 1 matrix and 1 data frame: > mat <- matrix(1:15, 5) > match_df <- data.frame(Seq = 1:5, criteria = sample(letters[1:5], 5, replace = T)) > mat [,1] [,2] [,3] [1,] 1 6 11 [2,] 2 7 12 [3,] 3 8 13 [4,] 4 9 14 [5,] 5 10 15 > match_df Seq criteria 1 1 c 2 2 e 3 3 c 4 4 c 5
2011 Apr 11
0
plyr: version 1.5
# plyr plyr is a set of tools for a common set of problems: you need to __split__ up a big data structure into homogeneous pieces, __apply__ a function to each piece and then __combine__ all the results back together. For example, you might want to: * fit the same model each patient subsets of a data frame * quickly calculate summary statistics for each group * perform group-wise
2011 Apr 11
0
plyr: version 1.5
# plyr plyr is a set of tools for a common set of problems: you need to __split__ up a big data structure into homogeneous pieces, __apply__ a function to each piece and then __combine__ all the results back together. For example, you might want to: * fit the same model each patient subsets of a data frame * quickly calculate summary statistics for each group * perform group-wise
2008 Oct 18
3
Cucumber "standard base" setup?
I''m trying to set up cucumber so we can try it in some Ruby automation scripts I''m working on. These will be straight Ruby, for use in BBEdit and TextMate (on the Mac). NOT Rails. The big early-stage stumbling block I''m having is setting up the initial Rakefile and directory structure. I think I''m rtfm''ing, but clearly I''m missing
2005 Nov 29
1
help combining mtext and strwrap?
Hi all, I've got some image plots on which I'd like to include some gene information (in the margins using mtext). Unfortunately, the description is rather long and will need to be wrapped to fit on several lines. From what I know about mtext, it's really only meant for single-line labels, not paragraphs. Here's some sample code of the idea I'm trying to accomplish:
2004 Mar 08
5
Getting ACLs to work with Samba 3.0.2a
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello! I'm currently trying to get ACLs to work with my Samba-PDC. I compiled Samba with the "--with-acl-support"-option and the configure-script says: checking sys/acl.h usability... yes checking sys/acl.h presence... yes checking for sys/acl.h... yes After install, a "ldd smbd" gives libacl.so.1 => /lib/libacl.so.1
2005 Mar 21
3
IPSec gateway configuration
Hi, I''m trying to build an ipsec gateway and somewhere I''m doing something wrong. I have a couple of routers that have clients in their back. All the routers are connected into a switch. In that switch I also have a computer that provides internet access to the clients. I would like to setup some sort of autentification (don''t need encryption), to allow me
2008 Oct 17
1
ggplot2 scale relation free
I don't know if there is a way to use the scale relation free argument in ggplot2 like in lattice. I have a feeling that there is not, but I would like to make a plea for this feature. It would be nice to be able to plot Total Inorganic Nitrogen Total Phosphorus and the ratio of the two- the numbers on the axis are not related, but the previous two are surely related to the last (this ratio
2002 Sep 16
0
error in htb or I don''t understand something
Hi I''m use htb and as I think if I don''t setup default class, all other (not classified) traffic must going throw 0 class without any shaping But when I try to make such config all other traffic doesn''t transmiting. I have some clients on vlan connected with modem (routing, not bridging) So modem has own addresses I try shape clients not modems If no default - no ping
2005 Feb 07
1
Streaming MP3 issues with Windows Media Player
Hello all, I've set up a live mp3 stream for our non-commercial radio station, and just recently I've received a slurry of complaints from folks using Windows Media Player. Most of the complaints vary, but seem to be consistent regarding long buffer time, odd drop outs, long reconnect times, etc. Normally, I refer folks to one of the infinitely better players out there, but now the
2004 Oct 20
1
Drawing multiple line plots
Hi All: Greetings, and best wishes from the festive times here at Kolkata, India -- the time of Durga Puja celebrations. I seek your advice as I try plotting lines for my data. The problem: I have created a dataframe that looks like this (name: myFrame): lowest second third fourth highest significance INAS 0.107 0.115 0.123 0.115 0.166 0.000 MMA 0.091 0.107 0.115
2009 Apr 24
0
New package: CHNOSZ
Dear R users, A new package, CHNOSZ (version 0.8), is available on CRAN. CHNOSZ is a package for thermodynamic calculations and analysis. Functions are available for calculating the standard Gibbs energies and other thermodynamic properties, and chemical affinities, of reactions between species contained in the thermodynamic database. The database includes standard thermodynamic properties
2009 Apr 24
0
New package: CHNOSZ
Dear R users, A new package, CHNOSZ (version 0.8), is available on CRAN. CHNOSZ is a package for thermodynamic calculations and analysis. Functions are available for calculating the standard Gibbs energies and other thermodynamic properties, and chemical affinities, of reactions between species contained in the thermodynamic database. The database includes standard thermodynamic properties
2006 Jan 22
0
Get colum types in auto form
Hi all, I''m trying to build a routine that generates table rows with the appropriate field types (text_area and text_field for now), and filters out the ''created_at'' and ''deleted_at''. <% for column in Project.content_columns %> <tr class="ListLine<%= cycle("0","1") %>"> <td><%=
2011 Mar 30
1
CDR Mysql adaptive Colum
Hello folks, i installed asterisk 1.8 from repo: https://wiki.asterisk.org/wiki/display/AST/Asterisk+Packages And Looked at this article about CDR in mysl. http://www.voip-info.org/wiki/view/Asterisk+cdr+mysql I installed asterisk-mysql pacakge from debian repo. The cdr in mysql is working, but i can not get cdr adaptive colums are not, i use this in my extension.conf exten =>
2009 Dec 04
1
Converting a Matrix in a colum vector
Hi all, Imagine I have a matrix G with N rows and M columns So L=NxM is the number of different cells in my matrix. I want to create a column vector F whose size will be F(L,1) So the fisrt row in F is G(1,1) Second row in F is G(1,2) When we arrive to a point M the element M+1 will be G(2, 1) Element M+2 will be G(2,2) and so on. I´m trying but allways error.... Easy Example: G= 2 3 4
2011 Apr 23
1
How to delete an entire row, if a specific colum has the value of "#VALUE!"
I am importing CSV data with thousands of rows, if any row contains an error from excel, the whole program crashes, so i need to delete all rows with the value of #VALUE!, all other values are non-numeric... I've tried a bunch of strategies, but nothing seems to work. Thanks ahead of time guys, Best, Cody -- View this message in context: