Re: [R] read.csv fails in R console in Ubuntu terminal but works in RStudio after R 3.6.3 upgrade to R 4.0.2?

2020-07-15 Thread Jeff Newmiller
Perhaps read FAQ 7.43? [1] [1] https://cran.r-project.org/doc/FAQ/R-FAQ.html#How-can-I-enable-secure-https-downloads-in-R_003f On July 15, 2020 4:02:27 PM PDT, Rui Barradas wrote: >Hello, > >R 4.0.2 on Ubuntu 20.04 LTS, sessionInfo below. > >I'm also unable to read the file with Rscript from

Re: [R] read.csv fails in R console in Ubuntu terminal but works in RStudio after R 3.6.3 upgrade to R 4.0.2?

2020-07-15 Thread Rui Barradas
Hello, R 4.0.2 on Ubuntu 20.04 LTS, sessionInfo below. I'm also unable to read the file with Rscript from the Ubuntu terminal but the error is not the same as the OP's. The first try was a file test1.R with the following commands.

Re: [R] [FORGED] read.csv fails in R console in Ubuntu terminal but works in RStudio after R 3.6.3 upgrade to R 4.0.2?

2020-07-15 Thread Rolf Turner
On 15/07/20 7:45 pm, Sam H wrote: Hi, I am trying to download some data using read.csv and it works perfectly in RStudio and fails in the R console in the terminal in Ubuntu 18.04 after upgrading from R 3.6.3 to 4.0.2. Before upgrading this worked in the R console in the terminal also

Re: [R] levels

2020-07-15 Thread Erin Hodgess
Hi Andy: I just checked in "options", and the following appears: $stringsAsFactors [1] FALSE I think this might be it. You may want to look at options() in R-3.6.1. Thanks, Erin Erin Hodgess, PhD mailto: erinm.hodg...@gmail.com On Wed, Jul 15, 2020 at 9:45 AM andy elprama wrote: >

Re: [R] read.csv fails in R console in Ubuntu terminal but works in RStudio after R 3.6.3 upgrade to R 4.0.2?

2020-07-15 Thread Bert Gunter
I may be wrong, but probably better posted on r-sig-debian rather than here. 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 ) On Wed, Jul 15, 2020 at 8:44 AM Sam H

Re: [R] Help for forecasting by SVM

2020-07-15 Thread Bert Gunter
Please read and follow the posting guide linked below when asking for help here. This is not a "we do the work for you" forum. 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"

Re: [R] levels

2020-07-15 Thread Marc Schwartz via R-help
> On Jul 15, 2020, at 4:31 AM, andy elprama wrote: > > Dear R-users, > > Something strange happened within the command "levels" > > R version 3.6.1 > name <- c("a","b","c") > values <- c(1,2,3) > data <- data.frame(name,values) > levels(data$name) > [1] "a" "b" "c" > > R version 4.0 > name

Re: [R] levels

2020-07-15 Thread Jeff Newmiller
Read the NEWS about R4.0.0 [1] (search for stringsAsFactors), or read any of the many announcements in blogs and forums around the Internet. [1] https://cran.r-project.org/doc/manuals/r-release/NEWS.html On July 15, 2020 1:31:06 AM PDT, andy elprama wrote: >Dear R-users, > >Something strange

Re: [R] levels

2020-07-15 Thread Eric Berger
Hi Andy, I believe this is because R 4.0 has changed the default behavior of data.frame(). Prior to 4.0, the default was stringsAsFactors=TRUE. In 4.0, the default is stringsAsFactors=FALSE. If you run your code in R 3.6.1 and change the command to data <-

[R] Help for forecasting by SVM

2020-07-15 Thread Md. Moyazzem Hossain
Dear Concern, I am interested to forecast a time series by SVM. I have used library e1071 and svm.pred. Please help me by recommending an R code. Thanks in advance. *Md* [[alternative HTML version deleted]] __ R-help@r-project.org mailing

[R] levels

2020-07-15 Thread andy elprama
Dear R-users, Something strange happened within the command "levels" R version 3.6.1 name <- c("a","b","c") values <- c(1,2,3) data <- data.frame(name,values) levels(data$name) [1] "a" "b" "c" R version 4.0 name <- c("a","b","c") values <- c(1,2,3) data <- data.frame(name,values)

[R] read.csv fails in R console in Ubuntu terminal but works in RStudio after R 3.6.3 upgrade to R 4.0.2?

2020-07-15 Thread Sam H
Hi, I am trying to download some data using read.csv and it works perfectly in RStudio and fails in the R console in the terminal in Ubuntu 18.04 after upgrading from R 3.6.3 to 4.0.2. Before upgrading this worked in the R console in the terminal also without any issues. Why would that be? How

Re: [R] Year and month from a sequence

2020-07-15 Thread Rui Barradas
Hello, Yet another way, with package lubridate. When creating the "Date" objects, I set day = 1 to compare to TRUE below. library(lubridate) start <- as.Date(ISOdate(1861, 1, 1)) end <- as.Date(ISOdate(2005, 12, 1)) start + months(4139 - 2400) #[1] "2005-12-01" end == start + months(4139 -

Re: [R] Year and month from a sequence

2020-07-15 Thread Eric Berger
Hi Milu, Jim gave a good solution. Another approach is to use standard packages and objects. In particular 'ts' (time series) objects from the stats package, and 'xts' (extensible time-series) objects from the xts package. library(xts) # construct dummy data z <- rnorm(36) # convert it into a