similar to: Any simple way to subset a vector of strings that do contain a particular substring ?

Displaying 20 results from an estimated 6000 matches similar to: "Any simple way to subset a vector of strings that do contain a particular substring ?"

2011 May 07
3
how to not match partial names
Dear friends, How do I stop partial matching of list names? e.g., x <- list(AAAA="aaaaa", BBBBB="bbbbb") is.null(x$A) #returns FALSE even though there is no element A. if(is.null(x$A)) {result <- x$BBBB} else {result <- x$A} result #is aaaa even though there is no x$A element x <- list(CCCC="aaaaa", BBBBB="bbbbb") if(is.null(x$A))
2011 Mar 08
1
How to sort using a predefined criterion
Dear R helpers, Suppose I have following data.frame. df <- data.frame(category = c("treat_A", "treat_A", "treat_A", "treat_A", "treat_A", "treat_A", "treat_A", "treat_A", "treat_B", "treat_B", "treat_B", "treat_B", "treat_B", "treat_B",
2004 Feb 05
2
correction to the previously asked question (about merging factors)
I have two factors l1, l2, and I'd like to merge them. (Remark: The factors can not be converted to charaters) Function c() does not give me the result I want: > l1 = factor(c('aaaa', 'bbbb')) > l2 = factor(c('ccc', 'dd')) > lMerge = factor(c(l1, l2)) > lMerge [1] 1 2 1 2 Levels: 1 2 > I'd like to merge l1 and l2 and to get lMerge
2020 Oct 29
2
dovecot quota-warning detection mail
OK. "passdb/userdb" Setting part $ dovecot -n (Excerpt from change) ---------------------------------------------------------------------------- --------------------- passdb { args = scheme=CRYPT username_format=%u /etc/dovecot/users.auth driver = passwd-file } userdb { args = username_format=%u /etc/dovecot/users.auth driver = passwd-file } protocol lmtp { info_log_path =
2012 Mar 30
1
IPv6 routing failure on CentOS5
I can't get IPv6 routing to configure correctly despite everything I've read saying it should This is my network config on a fully-updated CentOS 5.8 system: # cat /etc/sysconfig/network NETWORKING=yes NETWORKING_IPV6=yes HOSTNAME=my.hostname.com GATEWAY=aaa.bbb.ccc.ddd IPV6_DEFAULTGW=2a02:aaaa.bbbb::1 IPV6_DEFAULTDEV=eth0 # cat /etc/sysconfig/network-scripts/ifcfg-eth0
2010 Nov 24
2
Create new string of same length as entry in dataframe
I suspect that this is simple, but thanks in advance for any advice... I have a dataframe, t2: V1 V2 aaa 3 aaaa 4 aaaaaa 6 a 1 aa 2 V2 is the length of the string in V1 using nchar(as.character(t1$V1)) I'd like to create a third column, that contains a string of the length of V2, but containing an alternate text, e.g. V1 V2 V3
2011 Jun 13
3
combine the data frames into comma separated list.
Hi R users, I am new to R and am trying to merge data frames in the following way. Suppose I have n data frames each with two fields. Field 1 is common among data frames but may have different entries. Field 2 is different. Data frame 1: Src Target1 1 aaa 1 bbb 1 ccc 2 aaa 3 ddd Data frame 2: Src Target2 2 aaaa 3 dddd 4 bbbb 4
2015 May 21
2
IPv6 subnet routing
I've been trying out IPv6 networking with tinc and noticed that it will not route smaller segments than /48 If I try to run ip -6 route add aaaa:bbbb:cccc:dddd::/64 dev tun0 I get network unreachable However if I run ip -6 route add aaaa:bbbb:cccc::/48 dev tun0 it works fine Is this is a limitation in tinc or the kernel network stack itself? -------------- next part -------------- An HTML
2007 Feb 04
1
Error : Doing a node status request to the domain master browser at IP aaaa.bbbb.cccc.dddd failed
I've the following error : Doing a node status request to the domain master browser at IP aaaa.bbbb.cccc.dddd failed First time I configure my smb.conf file on a server with the adress aaaa.bbbb.cccc.dddd For some raison I have to change this address for another. When I restart samba I the message : nmbd/nmbd_browsesync.c:get_domain_master_name_node_status_fail(486)
2010 Dec 30
2
remove newlines / perl /concise example
Thanks for the previous tips and suggestions. Here's a more concise example: Input file: <aaaa> <bbbb> <cccc> <dddd> I want everything on one line, i.e., remove all newlines. Like so: <aaaa><bbbb><cccc><dddd> Simple perl code: #!/usr/bin/env perl # Remove newlines from a file in two ways: # (1) Just "chomp" them; # (2) Replace
2010 Jan 13
1
Full_Audit preventing file writing
When VFS full_audit is activated the server doesn't allow users to write changes in any file. The log vfs:10 shows: Jan 12 22:22:00 loginserver smbd_audit: aaaa.bbbb|192.168.23.10|get_real_filename|fail (Operation not supported)|/Novo Documento de Texto.txt->(null) Jan 12 22:22:00 loginserver smbd_audit: aaaa.bbbb|192.168.23.10|fchmod_acl|fail (No data available)|Novo Documento de
2010 Sep 15
2
Digest Username/auth name mismatch‏
Hi I'm sorry. I mailed the same question again. because, it cannot be yet solved. any ideas with asterisk? [Aug 20 14:40:12] WARNING[29315]: chan_sip.c:11806 check_auth: username mismatch, have <aaaa>, digest has aaaa at 192.168.0.1[Aug 20 14:40:12] NOTICE[29315]: chan_sip.c:20479 handle_request_register: Registration from 'aaaa <sip:aaaa at 192.168.0.1>' failed for
2008 Jul 31
4
Identifying common prefixes from a vector of words, and delete those prefixes
For example, c("dog.is.an.animal", "cat.is.an.animal", "rat.is.an.animal"). How can I identify the common prefix is ".is.an.animal" and delete it to give c("dog", "cat", "rat") ? Thanks _________________________________________________________________ [[alternative HTML version deleted]]
2015 May 21
2
IPv6 subnet routing
I have 2 nodes nodeA and nodeB I'm using tinc 1.1pre11 -- nodeA(fd80:2015:2105:abcd::1) : $ ip -6 route fd80:2015:2105:abcd::1 dev tun0 proto kernel metric 256 fd80:2015:2105:adcd::/64 dev tun0 metric 1024 fe80::/64 dev eth0 proto kernel metric 256 $ ping6 fd80:2015:2105:abcd::1 PING fd80:2015:2105:abcd::1(fd80:2015:2105:abcd::1) 56 data bytes 64 bytes from fd80:2015:2105:abcd::1:
2008 Jul 15
5
counting number of "G" in "TCGGGGGACAATCGGTAACCCGTCT"
Any better solution than this ? sum(strsplit("TCGGGGGACAATCGGTAACCCGTCT", "")[[1]] == "G") _________________________________________________________________ [[alternative HTML version deleted]]
2008 Sep 13
3
Beautify R scripts in microsoft word
I am generating a report containing several R scripts in the appendix. Is there any way to "beautify" the R source codes in microsoft word, similar to what we see in tinn-R ? Thanks _________________________________________________________________ [[alternative HTML version deleted]]
2011 Jun 14
1
[Resolved] combine the data frames into comma separated list.
Hi Thanks Gabor for your suggestion. I am posting the code that worked for me. dataframe1 = data.frame(cbind(Src = c(1,1,1,2,3), Target1 = c('aaa','bbb','ccc','aaa','ddd'))); #must be data frame dataframe2 = data.frame(cbind(Src = c(2,3,4,4,4), Target2 = c('aaaa','dddd','bbbb','eeee','ffff'))); dataframe3 =
2008 Jul 08
4
Can R do this ?
I have a folder full of pngs and jpgs, and would like to consolidate them into a pdf with appropriate title and labels. Can this be done via R ? _________________________________________________________________ Easily publish your photos to your Spaces with Photo Gallery. [[alternative HTML version deleted]]
2009 Jan 06
2
Generating GUI for r-scripts
Hi, I have developed some scripts that basically ask for input tab-limited format files, do some processing, and output several pictures or csv. Now I need to have some gui to wrap on top of the scripts, so that end-users can select their input files, adjust some parameters for processing, and select output folder or filenames. Please advice me if there is any tools or project suitable for
2012 Jun 01
4
Adding a column into the file
Dear all, I have a lot of problems on R-programming. for example my csv. file is .. Date wrfRH wrfsolar wrfwindspeed wrfrain wrftd wrfta 21/10/2010 92.97 22.11 53.27 0 1546.337861 61.00852664 22/10/2010 87.35 21.99 40.89 0 1300.408288 62.85352227 23/10/2010 88.38 21.71 28.04 0.01 1381.768284 54.80594493 24/10/2010 92.32 15.45 22.38 0.51 1113.90981 39.46573663 25/10/2010 93.42