linked categories without creating new one

Good morning all,

I have a puzzle for you :slight_smile:
From a given database organize like this:

column 1 : Country: (x= 1,2,3 ...) (1,2,3 by digital encoding)
2 : Region: (x = 1,2 ...)
3 City: (x= 1,2,3,4 ...)
4 Element: (x = text)

Attributes, properties are added to an associated category, we can for example add the spoken language (english: 1, French: 2 etc) which gives us a new column associated with Country.

I try to "select" or link the French speaking countries but without creating a new category (like country * language with english = 0)

Is it possible ? This is more of a normalization problem than programming on R but I know there are a lot of statisticians here :wink:

(The final idea, just in case, is to propose an indicator of relevance or compatibility (in%) for the search)

Thanks for reading me :slight_smile:


Your problem description is pretty confusing to me and I'm not entirely sure what it is you like to do (i.e. what the output should look like).

Can you generate a reprex of the problem and also provide an actual example of what the input / output should look like. A reprex consists of the minimal code and data needed to recreate the issue/question you're having. You can find instructions how to build and share one here:

Good luck,

Hi Pj, thanks for react !

That's my problem actually, i don't know what the outpoot should like.
"Normaly" to linked categories, we just , as "women with children" is "women (=1, men =0) "Children" (=n) but here i want to avoid it.

Is it more clear ?

we just add a new column (categories)*

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.