Re: [R] R and .asc file extension

2022-05-20 Thread Francois Morneau
Dear Thomas, If your .asc file is a raster (Esri ASCII raster format), you may consider the functions 'raster' in the raster package or 'read_starts' in the star package. Otherwise (or even)  'scan' or 'read.table' from base/utils may be your friends. Best, François Le 20/05/2022 à

Re: [R] missing values error in if statement

2022-05-20 Thread Rui Barradas
Hello, I'm getting an error when running your code: learner = lrn("classif.randomForest", predict_type = "prob") #> Error: Element with key 'classif.randomForest' not found in DictionaryLearner! Rui Barradas Às 14:12 de 20/05/2022, Neha gupta escreveu: When I run print(fc) it shows

Re: [R] missing values error in if statement

2022-05-20 Thread PIKAL Petr
Hm, what do **you** mean by fraction This is what you posted > >> >Error in if (fraction <= 1) { : missing value where TRUE/FALSE > >> >needed On May 19, 2022 2:30:58 PM PDT, Neha gupta I just showed that if object **fraction** is NA, it results exactly in the error you posted. From where is

Re: [R] missing values error in if statement

2022-05-20 Thread Neha gupta
Actually it's found in a library (mlr3extralearners). I have already imported this library in my code. On Friday, May 20, 2022, Rui Barradas wrote: > Hello, > > I'm getting an error when running your code: > > learner = lrn("classif.randomForest", predict_type = "prob") > #> Error: Element with

Re: [R] R and .asc file extension

2022-05-20 Thread Ebert,Timothy Aaron
A google search returned a stack overflow page that might help. stackoverflow.com/questions/20177581/reading-an-asc-file-into-r (add the https part to get a functional link.) I would also try looking at the file using something like notebook, or any program that is a plain text editor. That way

Re: [R] R and .asc file extension

2022-05-20 Thread Uwe Ligges
On 20.05.2022 15:27, Thomas Subia via R-help wrote: Colleagues, I have data which has a .asc file extension. asc likely means ASCII and can be any kind of text data, so wed need some contents to suggest a function. But any for text files should work. Best, Uwe Ligges Can R read that

Re: [R] missing values error in if statement

2022-05-20 Thread Neha gupta
When I run print(fc) it shows 'Inf'. It mean it doesn't calculate the bias/fairness, maybe due to missing values. RF passes 1/5 metrics Total loss : Inf On Fri, May 20, 2022 at 3:06 PM Rui Barradas wrote: > Hello, > > This is a frequent way of coding and a source for questions. > > >

Re: [R] missing values error in if statement

2022-05-20 Thread PIKAL Petr
Hi Strange, you say > prot <- ifelse(test$CE == '2', 1, 0) /// Error comes here but with your data ifelse(test$CE == '2', 1, 0) [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 [38] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0