similar to: correction to the previously asked question (about merging factors)

Displaying 20 results from an estimated 1000 matches similar to: "correction to the previously asked question (about merging factors)"

2004 Feb 05
0
correction to the previously asked question (about mergin g factors)
First of all, I do not understand why conversion to characters are not allowed. That's what Sundar's solution is doing implicitly (but more elegantly). Here's a test of all three. See the function definitions below. > f1 <- factor(sample(letters[1:3], 1e4, replace=TRUE)) > f2 <- factor(sample(letters[3:5], 1e4, replace=TRUE)) > f3 <- factor(sample(letters[5:7],
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",
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))
2004 Feb 27
4
question
Hi everybody. The question: I get two vectors 'iFalseFalse' and 'i2'. I think they should be the same but they are not. Is it because R does not handle complicated logical expressions in such cases or I do something wrong? > z1 = c(NA, "", 3, NA, "", 3) > z2 = c("", "", 3, NA, 3, NA) > cV = (as.character(z1)==as.character(z2))
2008 Jun 19
4
Any simple way to subset a vector of strings that do contain a particular substring ?
For example, strings <- c("aaaa", "bbbb","ccba"). How to get "aaaa", "bbbb" that do not contain "ba" ? _________________________________________________________________ [[alternative HTML version deleted]]
2004 Feb 27
2
question about if else
Today is a good day for asking question, I guess. > c() NULL > > length(c())==0 [1] TRUE > > r = ifelse(length(c())!=0, c(), c(1,2)) ### OK > r = c() ### OK > r = ifelse(length(c())==0, c(), c(1,2)) ### why this is not OK (given > the previous two)? Error in "[<-"(`*tmp*`, test, value = rep(yes, length =
2017 Nov 09
1
formatting raw vectors with names
I think there?s a bug concerning the formatting of raw vectors with names: > structure(as.raw(1:3), .Names = c("a", "bbbb", "c")) a bbbb c 01 02 03 > structure(1:3, .Names = c("a", "bbbb", "c")) a bbbb c 1 2 3 The problem is that EncodeRaw does not honor the requested width, in fact it doesn?t even get the
2004 Feb 18
6
interesting feature
Hi, everybody. This was an interesting discussion last time and it helped me a lot. Could you please have a look at some feature and tell me why it was designed this way (my questions are under #########) > x = c(1, 10) > y = c(99, 55) > d <- data.frame(x = x, y = y) > d x y 1 1 99 2 10 55 > add <- data.frame(x = 14, y = 99) > add x y 1 14 99 > d <-
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
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 =
2004 Feb 05
1
What is the correct way of using function C() for factors:
The funciton c() works differently for strings and for factors: For strings: > l = c('a', 'b') > l [1] "a" "b" For factors: > l = c(factor('a'), factor('b')) > l [1] 1 1 What should be the right technique for merging factors? -- Svetlana Eden Biostatistician II School of Medicine
2004 Feb 27
1
question about setdiff()
Thank you for your answers, I have another question: the behaviour of setdiff(indicesFalse, indicesNA) does not seem predictable to me. > indices [1] 1 2 3 4 5 6 > compareVector [1] NA TRUE TRUE TRUE FALSE NA > indicesNA = indices[is.na(compareVector)] > indicesNA [1] 1 6 > indicesFalse = indices[compareVector == FALSE] > indicesFalse [1] NA 5 NA >
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
2004 Mar 26
1
lookup.xport in foreign ignoring some datasets (PR#6701)
The Details. In the following version. > version _ platform i386-pc-linux-gnu arch i386 os linux-gnu system i386, linux-gnu status major 1 minor 8.1 year 2003 month 11 day 21 language R > lookup.xport ignores some datasets in sas export file. File "emptySasData3.xpt" (available at http://biostat.mc.vanderbilt.edu/tmp/emptySasData3.xpt) is a
2017 Jun 01
2
Possible RENAME bug
Hello, I'm having some trouble working on a webapp managing the imap tree on Dovecot. The same doesn't happen on other imap servers (e.g. Cyrus). Looks like if I receive shared folders from another user, and try to rename a folder in it, the rename command returns "ok", then if you list the new folder name, it isn't there. Looks like you've lost all the original folder
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
2007 Jul 22
11
Many same managed domain
Hi, When I tested xm new command without uuid parameter repeatedly, I saw many same managed domain as follows. # xm list Name ID Mem VCPUs State Time(s) Domain-0 0 941 2 r----- 51.9 # xm new /xen/vm1.conf Using config file "/xen/vm1.conf". # xm new /xen/vm1.conf Using config file