Am 25.10.18 um 16:13 schrieb peter dalgaard:
Yes: x[!(x$A %in% y$B),]
Ok thats in my opinion a little workaround
why?:
There is an
= and !=
< and >
means the opposite is available between terms.
why is there f.e no %!in%, %notin% or !%in%
This would be more intuitive.
Kind regards Knut
Thank you Bert and Peter. My apology for posting poor code. I cannot
create a reproducible example of my data, but i hope the list indices
as shown below helps you understand my question.. My regex pattern on
my previous post works correctly because i tested it on a few sublists
and it worked, but
If your matrices are at various depths in the list, try rapply(). E.g.,
> L <- list( A = list( a1 = matrix(c("AAA","AB", "AAB","AC"),2,2),
a2=c("AAx")), list(B = c("AAb1AAA","AAb2")))
> str(L)
List of 2
$ A:List of 2
..$ a1: chr [1:2, 1:2] "AAA" "AB" "AAB" "AC"
..$ a2: chr "AAx"
$ :List o
1. Please learn how to use dput() to provide examples to responders.
There's not much we can do with a text printout (at least without some work
that I don't care to do).
2. Do you know what mylist[[c(1,2,1)]] means? If not, read ?(Extract) and
note in particular:
"[[ can be applied recursively to
You should be more specific about what you want to replace and with
what. The pattern you use, namely "[0-9][0-9]/[0-9[0-9].*com", does
not (AFAICS) match any of the strings in your data, so don't be
surprised that your commands do not change anything.
If you have a correct pattern and replacement
Hi All—
I have a list that contains multiple sub-lists and each sub-list
contains multiple sub(sub-lists), each of the sub(sub-lists) is made
up of matrices of text. I want to replace some of the text in some
parts in the matrices on the list. I tried gsub and stringr,
str_remove, but nothing see
Hello,
2. x[!x$A %in% y$B, ]
1.
An Introduction to R, file R-into.pdf in your docs folder.
http://www.cookbook-r.com/Basics/Indexing_into_a_data_structure/
Hope this helps,
Rui Barradas
Às 15:06 de 25/10/2018, Knut Krueger escreveu:
Hi Bert,
another question for indexing
1. is there a good
> On 25 Oct 2018, at 16:06 , Knut Krueger wrote:
>
> Hi Bert,
> another question for indexing
> 1. is there a good manual for indexing
?Extract is at least authoritative
>
> 2. is it possible to get !%in%
> f.e
Yes: x[!(x$A %in% y$B),]
-pd
> x =data.frame("A"=c(1:5),"C"=c("A","B",
Hi Bert,
another question for indexing
1. is there a good manual for indexing
2. is it possible to get !%in%
f.e
x =data.frame("A"=c(1:5),"C"=c("A","B","C","D","E"))
y =data.frame("B"=c(1,3,5))
test = x[x$A %in% y$B,]
test = x[x$A %in% y$B,]
test
A C
1 1 A
3 3 C
5 5 E
means: the result where
Hi all,
I have a document term matrix and I would like to have a heatmap (geom_tile)
for 20 most associated words to a specific word in it. Here is my dtm:
corpus=Corpus(VectorSource(data$Message))
corpus=tm_map(corpus,tolower)
corpus=tm_map(corpus,removePunctuation)
corpus=tm_map(corpus,rem
Dear Hugh
1 - Your post is unreadable because you posted in HTML so it will be
very difficult for anyone to see your V
2 - there is a separate mailing list for meta-analysis in R where you
may get more helpful responses as it is monitored by authors of most of
the main packages. Please see
11 matches
Mail list logo