Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

soc.csa encounter the Error on the example code of Taste dataset #105

Open
419kfj opened this issue Apr 30, 2022 · 4 comments
Open

soc.csa encounter the Error on the example code of Taste dataset #105

419kfj opened this issue Apr 30, 2022 · 4 comments

Comments

@419kfj
Copy link

419kfj commented Apr 30, 2022

I am checking the taste data set example of "Taste dataset" on p52 of https://cran.r-project.org/web/packages/soc.ca/soc.ca.pdf

On the csa part, I encounter the error.

options(passive=NULL)
class.age     <- which(data_taste$Age == '55-64')
result.csca   <- soc.csa(result.mca, class.age, sup)

Error is as following.

colSums(sup) でエラー: 'x' は数値でなければなりません
(Sorry my system is Japanese, so the message is in Japanese. It meas Error at colSums(sup) 'x' have to be numeric. )

I know "sup" is defind at the top of this example script,
sup <- data.frame(data_taste$Gender, data_taste$Age, data_taste$Income)
.

So I expact to pass the "sup" directly and try as next .

result.csca   <- soc.csa(result.mca, class.age)

It generate the result. But I am not sure this result is reliable.

How can I do on this issue.

regards.

kazuo

@antongrau
Copy link
Member

Dear Kazuo,

Thank you so much for your issue report.

I find the same error and have not yet discovered the source of the error - nor a solution. I suspect that I will remove the possibility to calculate supplementary categories within the soc.csa function. Instead you should use the function average.coord or better still supplementary.categories():

soc.ca::supplementary.categories(res.csa, sup[class.age,])

  • Anton

@419kfj
Copy link
Author

419kfj commented Jun 29, 2022

Anton,

Thank you for your reply.

But, I can't find "soc.ca::supplementary.categories" function in soc.ca 0.8.0.

@antongrau
Copy link
Member

antongrau commented Oct 11, 2022 via email

@pablillocea
Copy link

Hi both!

Almost exactly two years later and in version 0.8.0, I still encounter the same issue. Furthermore, the function supplementary.categories does not exist within the package.

Are there plans to solve this error? Is there any way one can contribute?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants