Hi Laurent,
Seeking to give you an "R-only" solution, I thought the read.fwf()
function might be useful (to read-in your first column of data, only).
However Jeff is correct that this is a poor strategy, since read.fwf()
reads the entire file into R (documented in "Fixed-width-format
files",
Hi all,
I am trying to create word clouds using this script but I am getting warnings.
Script:
if (runtype=="native") {
words <- Corpus(VectorSource(test123b[,2]))
wordcloud(words, min.freq = minfreq, max.words=300, random.order =
FALSE ,colors=brewer.pal(9,"Reds")[0:-3])
Some of them are generally available. At least they look that way from here
E.g., (shameless plug...)
https://link.springer.com/book/10.1007/978-0-387-79054-1
-pd
> On 23 May 2020, at 06:15 , Christopher W. Ryan wrote:
>
> Am I interpreting this offer correctly, that it is for libraries
Hi Brian,
i think we may need a bit more information. It looks like you are doing
some text mining; can you tell us what libraries you have loaded and
perhaps provide us with some sample data?
And an example of what you are doing?
See the links below for some suggestions
Thanks, Rich! I found several books to peruse.
On Fri, May 22, 2020 at 12:29 PM Richard M. Heiberger
wrote:
> Springer has just made available free access to many books through July.
> This is part of their global program to support educators, students
> and academics
> affected by coronavirus
Please post using plain text format... otherwise what we see can be corrupted
as compared to what you saw.
The obvious solution is:
apply( M, 1, min ) * apply( N, 1, max )
but Google sez there is an optimized version useful with large matrices:
library( Rfast )
rowMins( M ) * rowMins( N )
Hello,
I have just found out that you are cross posting [1].
Please do not cross post, ask a question, wait for an answer and after
or 3 days, if you don't have a (satisfactory) answer, ask somewhere else.
[1]
Hello,
Use ?apply on each of the matrices.
min_max <- function(X, Y, na.rm = FALSE){
Min <- apply(X, 1, min, na.rm = na.rm)
Max <- apply(Y, 1, max, na.rm = na.rm)
Min*Max
}
min_max(M, N)
#[1] 4 3 4
Hope this helps,
Rui Barradas
Às 15:30 de 23/05/20, Vahid Borji escreveu:
Hi my R
Hi my R friends,
I have two matrices as follows:
M<-matrix(c(1,4,1,3,1,4,2,3,1,2,1,2),3)
1322
4131
1412
N<-matrix(c(1,1,2,2,3,4,-2,2,1,4,3,-1),3)
12 -24
1323
241 -1
I want to find a vector which is a matrix 1*3 and each of
The c() is unnecessary. paste() returns a vector.
Paste separates elements with " " by default. Set the separator to "" instead.
paste("c",1:10, sep = "")
... or use paste0(), which has "" as default separator.
paste0("c",1:10)
?paste is your friend.
B.
> On 2020-05-23, at 22:25, Vahid
Hello my r friends,
I want to make a vector with elements (c1,c2,...,c10).
I wrote the below code:
c(paste("c",1:10))
My code works but it gives me elements like "c 1", "c 2" to "c 10". I mean
there is a space between each c and its corresponding number. I want the
elements of the vector to be
On Sat, 23 May 2020 14:58:34 +0530
Christofer Bogaso wrote:
>Any pointer will be highly appreciated.
"Getting help with R" [1] describes several ways of looking for
R-related things. In particular, there is a Bayesian CRAN Task View
[2], which (as of now) has 52 occurrences of "MCMC".
--
Best
Hi Christofer,
Did you try web search? I entered 'R CRAN Bayesian parameter
estimation with MCMC'
and it came back with the following which seems relevant.
https://cran.r-project.org/web/packages/airGR/vignettes/V02.2_param_mcmc.html
There are other search results, such as:
Hello,
Please keep this on the list, R-help is threaded and it becomes part of
the archives, maybe it will be usefull to others.
You are now asking 2 other different questions.
Are you looking for something like this?
two_values_mat <- function(n, fill = 1, diagonal = 0){
m <-
This sounds like a homework question...
But... numerical linear algebra rocks...
cbind (diag (1:3), 4:6)
On Sat, May 23, 2020 at 9:46 PM Vahid Borji wrote:
>
> Hi my friends,
>
> I want to make the below matrix in r:
>
> 1 0 0 4
>
> 0 2 0 5
>
> 0 0 3 6
>
> I used the below code:
>
>
Hello,
Use diag() and cbind().
special_mat <- function(n){
if(n %% 2 != 0) {
msg <- paste(sQuote(n), 'is not a multiple of 2, will use')
n <- 2*(n%/% 2)
msg <- paste(msg, sQuote(n))
warning(msg)
}
x <- diag(n/2)
diag(x) <- seq.int(n/2)
cbind(x, (n/2 + 1):n)
}
Dear Vahid,
Would this help?
> row1<- c(1,0,0,4)
> row2<- c(0,2,0,5)
> row3<- c(0,0,3,6)
> mymatrix <- rbind(row1,row2,row3)
> mymatrix
[,1] [,2] [,3] [,4]
row11004
row20205
row30036
>
Best Regards,
Ashim
On Sat, May 23, 2020 at 3:16 PM
Hi my friends,
I want to make the below matrix in r:
1 0 0 4
0 2 0 5
0 0 3 6
I used the below code:
matrix(c(1,0,0,0,2,0,0,0,3,4,5,6),nrow=3)
My code works. But I do not like my solution way. I am thinking to find the
simplest way for making this matrix. Do you think my code is the simplest
Hi,
In python there is a package called pymc3 for Bayesian parameter
estimation with MCMC.
I am curious if there is any equivalent package available for R.
Any pointer will be highly appreciated.
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE
> My book is
> Statistical Analysis and Data Display, Richard M. Heiberger, Burt
> Holland, 2nd ed. 2015
In all fairness, I thought should look at your book.
I was quite impressed by the chapter on multiple comparisons.
And may look again, later.
In my personal opinion (diverging slightly),
Hi,
I am having trouble understanding why I am getting this warning and how to fix
it. I don’t have any of these functions in my script..
This is the warning:
warning messages:
1: in tm_map.simplecorpus(corpus, tm::removepunctuation) : transformation drops
documents
2: in
21 matches
Mail list logo