[R] How to install package meta on Linux Ubuntu 21?,
David Winsemius
dw|n@em|u@ @end|ng |rom comc@@t@net
Thu Sep 30 06:12:04 CEST 2021
On 9/29/21 8:04 PM, Jeff Newmiller wrote:
> This is called hijacking a thread. Bad etiquette.
>
> You need to pay attention to column types and NA values. Only do regular expression manipulations on character data, and NA is never something you can do string operations on.
To Giuseppa;
When you see the characters <NA> without any surrounding quotes they are
not really character values, but rather how the print function displays
a missing value for a factor column. You cannot "eliminate it". In a
very real sense it has already been "eliminated".
Read up on missing value handling at:
?NA... although that aspect is not mentioned at the help page (although
it should be. Look at this console session fragment:
> factor(NA)
[1] <NA> # factor missing values get the extra angle brackets.
Levels:
> NA
[1] NA
> char <- c("a", "NA", NA)
> char
[1] "a" "NA" NA # note that a character value of "NA" has quotes but
a real missing value has none.
--
David.
>
> On September 29, 2021 7:24:41 PM PDT, giuseppacefalu using gmail.com wrote:
>> Hello,
>>
>> I wonder if you can help me with this. I am trying to eliminate unnecessary characters from the columns of a data frame. For example this one, "df <- mutate_all(df,
>> funs(str_replace_all(., "\\[|\\]", "")))" eliminates the [ and ] that sometimes surround a number. Ex; [24.5] [54.6]
>>
>> When I use the same command to eliminate the string "<NA>" it does not work. The only difference I have noticed is that the cell in the column containing the [ ] characters contains all the numbers in one row, but the cell in the column containing the "<NA>" characters contains several rows.
>>
>> For example: variable_name
>> 1 <NA>
>> 2 <NA>
>> 3 <NA> ...
>> I wonder if I have to collapse all the rows in a single row and eliminate one row.
>>
>> Thank you,
>>
>> Giuseppa Cefalu
>>
>> -----Original Message-----
>> From: R-help <r-help-bounces using r-project.org> On Behalf Of Rui Barradas
>> Sent: Wednesday, September 29, 2021 3:13 PM
>> To: Kevin Thorpe <kevin.thorpe using utoronto.ca>; Luigi Marongiu <marongiu.luigi using gmail.com>
>> Cc: R Help Mailing List <r-help using r-project.org>
>> Subject: Re: [R] How to install package meta on Linux Ubuntu 21?
>>
>> Hello,
>>
>> The recommended way is to install r-base-dev, you probably only have r-base.
>>
>> sudo apt-get update
>> sudo apt-get install r-base-dev
>>
>>
>> Hope this helps,
>>
>> Rui Barradas
>>
>> Às 17:53 de 29/09/21, Kevin Thorpe escreveu:
>>> It looks to me like you do not have the development packages installed in Ubuntu. These should be easy to obtain with a suitable apt-get command, but since I am not a primary Ubuntu user, I do not know the package names.
>>>
>>>
>>>> On Sep 29, 2021, at 9:46 AM, Luigi Marongiu <marongiu.luigi using gmail.com> wrote:
>>>>
>>>> Hello
>>>> I have R version 4.1.1 (2021-08-10) -- "Kick Things", on an Ubuntu 21
>>>> machine. I am trying to install the package meta but I get the
>>>> following error:
>>>> ```
>>>> ...
>>>> ERROR: dependency ‘RcppEigen’ is not available for package ‘lme4’
>>>> * removing ‘/home/gigiux/R/x86_64-pc-linux-gnu-library/4.1/lme4’
>>>> Warning in install.packages :
>>>> installation of package ‘lme4’ had non-zero exit status
>>>> ERROR: dependency ‘lme4’ is not available for package ‘meta’
>>>> ```
>>>> I tried to install RcppEigen but:
>>>> ```
>>>> ...
>>>> /usr/bin/ld: cannot find -llapack
>>>> /usr/bin/ld: cannot find -lblas
>>>> /usr/bin/ld: cannot find -lgfortran
>>>> collect2: error: ld returned 1 exit status
>>>> make: *** [/usr/share/R/share/make/shlib.mk:10: RcppEigen.so] Error 1
>>>> ERROR: compilation failed for package ‘RcppEigen’
>>>> * removing ‘/home/gigiux/R/x86_64-pc-linux-gnu-library/4.1/RcppEigen’
>>>> Warning in install.packages :
>>>> installation of package ‘RcppEigen’ had non-zero exit status ```
>>>> and lme4 requires RcppEigen.
>>>> I launched
>>>> `$ sudo apt-get install r-cran-rcppeigen` installation successful but
>>>> I got the same error in installing RcppEigen.
>>>> What could be the error?
>>>> --
>>>> Best regards,
>>>> Luigi
>>>>
>>>> ______________________________________________
>>>> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
>>>> https://stat.ethz.ch/mailman/listinfo/r-help
>>>> PLEASE do read the posting guide
>>>> http://www.R-project.org/posting-guide.html
>>>> and provide commented, minimal, self-contained, reproducible code.
>> ______________________________________________
>> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
>> ______________________________________________
>> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list