Giter VIP home page Giter VIP logo

Comments (10)

angelinetsui avatar angelinetsui commented on August 22, 2024

no, this is deliberate because of issue #46 . This issue has been noted in past MB studies and we need to ensure that all subid is unique for further analyses

from mb2-analysis.

GalRaz avatar GalRaz commented on August 22, 2024

ok.

from mb2-analysis.

GalRaz avatar GalRaz commented on August 22, 2024

It seems that the subid modification comes from this line:
mutate(subid = paste0(subid, sep = " _ ", lab, trial_num))

I think we should at remove the trial_num (did you mean to put trial_id?) from the subid column, because otherwise group_by(subid) starts treating each trial, rather than each subject, differently. We could add experiment_num to subid though.

from mb2-analysis.

angelinetsui avatar angelinetsui commented on August 22, 2024

Got it, thanks for your explanation, may be we shouldn't make it too unique to avoid problems like that.....I honestly think that subid + lab is already unique enough to do the trick...perhaps just combining these two names. thoughts? @GalRaz @mahowak

from mb2-analysis.

mahowak avatar mahowak commented on August 22, 2024

subid needs to uniquely identify each subject. 

subid + lab should usually do it, but because labs assign their own subid, they might call a particular subject mb2-1 in both Pilot 1a and Pilot 1b. 

What @GalRaz said sounds good: subid + lab + experiment_num should be unique

I am also a little thrown by having the sep arg right in the middle of the paste like that, how about:

mutate(subid = paste(subid, lab, experiment_num, sep="_"))

from mb2-analysis.

angelinetsui avatar angelinetsui commented on August 22, 2024

subid+lab+exp_num sounds good.

I can remove the sep arg, cause I don't think putting it at the end helps anything. I like putting it in the middle for me to see the original subid, but I am okay if you want to remove the sep

Do you want me to change the codes, or @GalRaz?

from mb2-analysis.

mahowak avatar mahowak commented on August 22, 2024

from mb2-analysis.

angelinetsui avatar angelinetsui commented on August 22, 2024

sounds good to change it to paste()

from mb2-analysis.

GalRaz avatar GalRaz commented on August 22, 2024

just put in a pull request; closing

from mb2-analysis.

mahowak avatar mahowak commented on August 22, 2024

Just to close the loop here, paste0 doesn't actually take a sep arg. It just concats all the args with no sep. But it lets you pass garbage names as arg names.

> paste0("this", sillyarg="is", fakearg="a", dsfj9iw="test")
[1] "thisisatest"

from mb2-analysis.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.