paulponcet / modeest Goto Github PK
View Code? Open in Web Editor NEWMode estimation
Mode estimation
Estimating the mode of a trimmed G prime set using the 'modeest' package...
Error: argument 'x' contains missing values
I encountered the above error. Please help.
I have found this question on stackoverflow . When trying to calculate the mode from a factor like this:
color <- c("blue","green","blue","blue","green","yellow","pink","blue")
color <- as.factor(color)
The mode is NA
:
mlv.factor(x=color,method='mfv')
Mode (most frequent value): NA
Bickel's modal skewness: -2
Call: mlv.factor(x = color, method = "mfv")
Warning message:
In discrete(x, ...) : NAs introduced by coercion
I have looked into the function an found that mlv.factor()
calls discrete()
:
th <- discrete(x, ...)
f <- factor(x)
f
[1] blue green blue blue green yellow pink blue
Levels: blue green pink yellow
tf <- tabulate(f)
tf
[1] 4 2 1 1
as.numeric(levels(f)[tf == max(tf)])
[1] NA
Warning message:
NAs introduced by coercion
It cannot coerce "blue"
to numeric, hence the function does not return anything.
Hi @polmath, I don't understanding file encoding issues well, and I typically run away from them, or take the path of least resistance.
In case it helps you to know, it may be difficult for Americans to edit and resubmit existing code. Characters like the accented 'e' in the file below aren't interpreted correctly with my installations of RStudio, Notepad++, Notepad, or NetBeans. From what I could tell, the GitHub browser did a better job, so I edited it directly in there.
I'm not saying you should change anything so it's easier for us to work with. But I wanted to let you know there might be extra friction/obstacles developing.
Estimating the mode of a trimmed G prime set using the 'modeest' package...
Error: argument 'x' contains missing values
I encountered the above error. Please help.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.