Hi John,
Try paste0(x,collapse = ", ")
Best,
Jiefei
On Thu, Nov 5, 2020 at 1:16 PM John wrote:
> Hi,
>
> I have a sequence of characters:
>
> x <- c("Alice", "Bob", "Charles")
>
> How can I produce the following results:
>
> "Alice, Bob, Charles"
>
> ?
>
> paste? merge?
>
> Thank you very much
Try
paste(x, collapse = ", ")
Cheers,
Andrew
--
Andrew Robinson
Director, CEBRA and Professor of Biosecurity,
School/s of BioSciences and Mathematics & Statistics
University of Melbourne, VIC 3010 Australia
Tel: (+61) 0403 138 955
Email: a...@unimelb.edu.au
Website: https://researchers.ms.unime
Hi,
I have a sequence of characters:
x <- c("Alice", "Bob", "Charles")
How can I produce the following results:
"Alice, Bob, Charles"
?
paste? merge?
Thank you very much!
[[alternative HTML version deleted]]
__
R-help@r-project.org mailin
Neglected to cc the list!
Bert
-- Forwarded message -
From: Bert Gunter
Date: Wed, Nov 4, 2020 at 6:40 PM
Subject: Re: [R] Error message when using "revtools" package
To: John , R-help
Perhaps better suggestion: r-sig-meta-analysis ?
Bert Gunter
"The trouble with having an
Perhaps better suggestion: r-sig-meta-analysis ?
Bert Gunter
"The trouble with having an open mind is that people keep coming along and
sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
[[alternative HTML version deleted]]
Hi,
I tried to read a bib file by "read_bibliography" function in
"revtools" package, but I got an error message but don't know how to fix
it. Anyone can help? Thank you so much!!
###
library(revtools)
data2 <- read_bibliography("mlf_ref201105_2.bib", return_df = FALSE)
###
Error mess
On 04/11/2020 4:43 p.m., Philip Charles wrote:
Hi Duncan,
Thanks; that's really useful info, and now that you point it out I
completely agree that the frame arguments description does make my
original use invalid - I will pay closer attention to such details in
future. Would you suggest sapp
Hi Duncan,
Thanks; that's really useful info, and now that you point it out I completely
agree that the frame arguments description does make my original use invalid -
I will pay closer attention to such details in future. Would you suggest
sapply(...,as.numeric) is the most 'R'-y way of conv
You can see the change to the help page here:
https://github.com/wch/r-source/commit/d1d3863d72613660727379dd5dffacad32ac9c35#diff-9143902e81e6ad39faace2d926725c4c72b078dd13fbb1223c4a35f833b58ee6
Before the change, it said the input should be
a data frame whose components are logical vectors, fa
Hi R gurus,
We do a lot of work with biological -omics datasets (genomics, proteomics etc).
The text file inputs to R typically contain a mixture of (mostly) character
data and numeric data. The number of columns (both character and numeric data)
in the file vary with the number of samples me
I agree with Duncan.
I co-ordinated a large literature review with initially more than 5000 papers
and about 30 reviewers, and all the bibliometrics information was in bibtex
format, as it is easy to interchange between programs.
Cheers,
Rainer
> On 4 Nov 2020, at 10:28, Duncan Murdoch wrote
Hello,
No, flights[2] is *not* equal to flights$months. The former is a
data.frame with only one column, therefore it has a dimension attribute.
The latter is a column, a vector of the data.frame flights, it does not
have the attribute dim set.
The difference is very important, see what clas
Hi,
You might want to become familiar with the ?str and ?dim functions, which can
help you identify the structure of the objects that you are passing to
colMeans().
In the first case, flights[2] is a data frame with a single column, so will
have two dimensions with a row and column structure.
On 04/11/2020 8:26 a.m., Engin Yılmaz wrote:
Dear
I use *flights* database library(nycflights13)
The following code is working as
colMeans(flights[2])
* 6.54851*
but other code is not working as
colMeans(flights$month)
*Error in colMeans(flights$month) : *
* 'x' must be an array of at lea
Dear
I use *flights* database library(nycflights13)
The following code is working as
colMeans(flights[2])
* 6.54851*
but other code is not working as
colMeans(flights$month)
*Error in colMeans(flights$month) : *
* 'x' must be an array of at least two dimensions*
*flights[2]* is equal to th
You might also want to take a look at this survey:
https://ropensci.org/technotes/2020/05/07/rmd-citations/
> On Nov 4, 2020, at 9:22 AM, John wrote:
>
> Hi,
>
> I 'd like to create a table for literature review. Is there any good
> data structure (database) I may use? Now I just use a simp
Dear John
If you are doing a systematic review have you thought of investigating
some of the packages in the CRAN Task View on MetaAnalysis like metagear
or revtools? I have not used any of them but they claim to support that
part of the process.
Michael
On 04/11/2020 09:22, John wrote:
Hi
Solved. Thanks Achim and Peter ...
though following that approach we now are relying implicitly on column names.
But at least I've got this silly example working now. Thanks for the
explanation Achim.
:-)
> On 2020-11-04, at 20:05, Achim Zeileis wrote:
>
> EXTERNAL EMAIL: Treat content wi
On Wed, 4 Nov 2020, peter dalgaard wrote:
Don't use $ notation in lm() formulas. Use lm(w ~ h, data=DAT).
...or in any other formula for that matter!
Let me expand a bit on Peter's comment because this is really a pet peeve
of mine:
The idea is that the formula "w ~ h" described the relati
Don't use $ notation in lm() formulas. Use lm(w ~ h, data=DAT).
-pd
> On 4 Nov 2020, at 10:50 , Boris Steipe wrote:
>
> Can't get data from a data frame into predict() without a detour that seems
> quite unnecessary ...
>
> Reprex:
>
> # Data frame with simulated data in columns "h" (indepen
Can't get data from a data frame into predict() without a detour that seems
quite unnecessary ...
Reprex:
# Data frame with simulated data in columns "h" (independent) and "w"
(dependent)
DAT <- structure(list(h = c(2.174, 2.092, 2.059, 1.952, 2.216, 2.118,
1.755, 2
On 04/11/2020 4:22 a.m., John wrote:
Hi,
I 'd like to create a table for literature review. Is there any good
data structure (database) I may use? Now I just use a simple dataframe as
follows, but in the second item I swap the order of year and author, and it
records 2013 as author and "XH"
Hi,
I 'd like to create a table for literature review. Is there any good
data structure (database) I may use? Now I just use a simple dataframe as
follows, but in the second item I swap the order of year and author, and it
records 2013 as author and "XH" as year. Is there any better structure
23 matches
Mail list logo