R print cutoff values under a certain value









up vote
0
down vote

favorite












I am trying to print only values over 1.1 for a factor analysis. I assumed the print command was what I wanted, but the cutoff didnt work.



Reproducible example:



print(c(1,2,3,.5),digits=2,cutoff=1.1,sort=T)
#returns: [1] 1.0 2.0 3.0 0.5


How can I get it to return only value over 1.1?










share|improve this question





















  • Try something like (assuming num is your vector) num[num > 1.1]
    – DatamineR
    May 26 '15 at 20:04















up vote
0
down vote

favorite












I am trying to print only values over 1.1 for a factor analysis. I assumed the print command was what I wanted, but the cutoff didnt work.



Reproducible example:



print(c(1,2,3,.5),digits=2,cutoff=1.1,sort=T)
#returns: [1] 1.0 2.0 3.0 0.5


How can I get it to return only value over 1.1?










share|improve this question





















  • Try something like (assuming num is your vector) num[num > 1.1]
    – DatamineR
    May 26 '15 at 20:04













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I am trying to print only values over 1.1 for a factor analysis. I assumed the print command was what I wanted, but the cutoff didnt work.



Reproducible example:



print(c(1,2,3,.5),digits=2,cutoff=1.1,sort=T)
#returns: [1] 1.0 2.0 3.0 0.5


How can I get it to return only value over 1.1?










share|improve this question













I am trying to print only values over 1.1 for a factor analysis. I assumed the print command was what I wanted, but the cutoff didnt work.



Reproducible example:



print(c(1,2,3,.5),digits=2,cutoff=1.1,sort=T)
#returns: [1] 1.0 2.0 3.0 0.5


How can I get it to return only value over 1.1?







r






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked May 26 '15 at 20:01









Rilcon42

2,50373162




2,50373162











  • Try something like (assuming num is your vector) num[num > 1.1]
    – DatamineR
    May 26 '15 at 20:04

















  • Try something like (assuming num is your vector) num[num > 1.1]
    – DatamineR
    May 26 '15 at 20:04
















Try something like (assuming num is your vector) num[num > 1.1]
– DatamineR
May 26 '15 at 20:04





Try something like (assuming num is your vector) num[num > 1.1]
– DatamineR
May 26 '15 at 20:04













2 Answers
2






active

oldest

votes

















up vote
1
down vote



accepted










The print function normally doesn't have cutoff - you are probably looking at a special implementation of print since it is generic, which means it can have different implementations for different data types (see documentation).



To select elements with a criteria, you can do num[criteria], in this case num[num > 1.1] as @DatamineR suggested.






share|improve this answer




















  • Any suggestions for how to remove values within a factor analysis object? I am happy to provide data if needed.
    – Rilcon42
    May 26 '15 at 20:15










  • @Rilcon42: Could you try post more code? I'm not really sure what a factor analysis object is, do you mean the things here stat.ethz.ch/R-manual/R-patched/library/stats/html/…?
    – Ziyao Wei
    May 26 '15 at 20:30










  • Yep thats it exactly!
    – Rilcon42
    May 26 '15 at 20:41










  • Do you intend to extract values from uniqueness? If so f$uniquenesses[f$uniquenesses > 1.1] would work, for other attributes it should be along similar lines. You can post more code if that will help.
    – Ziyao Wei
    May 26 '15 at 20:47










  • That was exactly what I needed. Thanks!
    – Rilcon42
    May 26 '15 at 20:48

















up vote
1
down vote













This is three years too late, but the cutoff command does work in factor analysis:
some factor analysis where i only want loadings larger than 0.3:



print(factanal(df,factoramount)$loadings, cutoff=0.3)





share|improve this answer








New contributor




Huy Pham is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

















    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













     

    draft saved


    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f30467834%2fr-print-cutoff-values-under-a-certain-value%23new-answer', 'question_page');

    );

    Post as a guest






























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    1
    down vote



    accepted










    The print function normally doesn't have cutoff - you are probably looking at a special implementation of print since it is generic, which means it can have different implementations for different data types (see documentation).



    To select elements with a criteria, you can do num[criteria], in this case num[num > 1.1] as @DatamineR suggested.






    share|improve this answer




















    • Any suggestions for how to remove values within a factor analysis object? I am happy to provide data if needed.
      – Rilcon42
      May 26 '15 at 20:15










    • @Rilcon42: Could you try post more code? I'm not really sure what a factor analysis object is, do you mean the things here stat.ethz.ch/R-manual/R-patched/library/stats/html/…?
      – Ziyao Wei
      May 26 '15 at 20:30










    • Yep thats it exactly!
      – Rilcon42
      May 26 '15 at 20:41










    • Do you intend to extract values from uniqueness? If so f$uniquenesses[f$uniquenesses > 1.1] would work, for other attributes it should be along similar lines. You can post more code if that will help.
      – Ziyao Wei
      May 26 '15 at 20:47










    • That was exactly what I needed. Thanks!
      – Rilcon42
      May 26 '15 at 20:48














    up vote
    1
    down vote



    accepted










    The print function normally doesn't have cutoff - you are probably looking at a special implementation of print since it is generic, which means it can have different implementations for different data types (see documentation).



    To select elements with a criteria, you can do num[criteria], in this case num[num > 1.1] as @DatamineR suggested.






    share|improve this answer




















    • Any suggestions for how to remove values within a factor analysis object? I am happy to provide data if needed.
      – Rilcon42
      May 26 '15 at 20:15










    • @Rilcon42: Could you try post more code? I'm not really sure what a factor analysis object is, do you mean the things here stat.ethz.ch/R-manual/R-patched/library/stats/html/…?
      – Ziyao Wei
      May 26 '15 at 20:30










    • Yep thats it exactly!
      – Rilcon42
      May 26 '15 at 20:41










    • Do you intend to extract values from uniqueness? If so f$uniquenesses[f$uniquenesses > 1.1] would work, for other attributes it should be along similar lines. You can post more code if that will help.
      – Ziyao Wei
      May 26 '15 at 20:47










    • That was exactly what I needed. Thanks!
      – Rilcon42
      May 26 '15 at 20:48












    up vote
    1
    down vote



    accepted







    up vote
    1
    down vote



    accepted






    The print function normally doesn't have cutoff - you are probably looking at a special implementation of print since it is generic, which means it can have different implementations for different data types (see documentation).



    To select elements with a criteria, you can do num[criteria], in this case num[num > 1.1] as @DatamineR suggested.






    share|improve this answer












    The print function normally doesn't have cutoff - you are probably looking at a special implementation of print since it is generic, which means it can have different implementations for different data types (see documentation).



    To select elements with a criteria, you can do num[criteria], in this case num[num > 1.1] as @DatamineR suggested.







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered May 26 '15 at 20:06









    Ziyao Wei

    20.1k1267105




    20.1k1267105











    • Any suggestions for how to remove values within a factor analysis object? I am happy to provide data if needed.
      – Rilcon42
      May 26 '15 at 20:15










    • @Rilcon42: Could you try post more code? I'm not really sure what a factor analysis object is, do you mean the things here stat.ethz.ch/R-manual/R-patched/library/stats/html/…?
      – Ziyao Wei
      May 26 '15 at 20:30










    • Yep thats it exactly!
      – Rilcon42
      May 26 '15 at 20:41










    • Do you intend to extract values from uniqueness? If so f$uniquenesses[f$uniquenesses > 1.1] would work, for other attributes it should be along similar lines. You can post more code if that will help.
      – Ziyao Wei
      May 26 '15 at 20:47










    • That was exactly what I needed. Thanks!
      – Rilcon42
      May 26 '15 at 20:48
















    • Any suggestions for how to remove values within a factor analysis object? I am happy to provide data if needed.
      – Rilcon42
      May 26 '15 at 20:15










    • @Rilcon42: Could you try post more code? I'm not really sure what a factor analysis object is, do you mean the things here stat.ethz.ch/R-manual/R-patched/library/stats/html/…?
      – Ziyao Wei
      May 26 '15 at 20:30










    • Yep thats it exactly!
      – Rilcon42
      May 26 '15 at 20:41










    • Do you intend to extract values from uniqueness? If so f$uniquenesses[f$uniquenesses > 1.1] would work, for other attributes it should be along similar lines. You can post more code if that will help.
      – Ziyao Wei
      May 26 '15 at 20:47










    • That was exactly what I needed. Thanks!
      – Rilcon42
      May 26 '15 at 20:48















    Any suggestions for how to remove values within a factor analysis object? I am happy to provide data if needed.
    – Rilcon42
    May 26 '15 at 20:15




    Any suggestions for how to remove values within a factor analysis object? I am happy to provide data if needed.
    – Rilcon42
    May 26 '15 at 20:15












    @Rilcon42: Could you try post more code? I'm not really sure what a factor analysis object is, do you mean the things here stat.ethz.ch/R-manual/R-patched/library/stats/html/…?
    – Ziyao Wei
    May 26 '15 at 20:30




    @Rilcon42: Could you try post more code? I'm not really sure what a factor analysis object is, do you mean the things here stat.ethz.ch/R-manual/R-patched/library/stats/html/…?
    – Ziyao Wei
    May 26 '15 at 20:30












    Yep thats it exactly!
    – Rilcon42
    May 26 '15 at 20:41




    Yep thats it exactly!
    – Rilcon42
    May 26 '15 at 20:41












    Do you intend to extract values from uniqueness? If so f$uniquenesses[f$uniquenesses > 1.1] would work, for other attributes it should be along similar lines. You can post more code if that will help.
    – Ziyao Wei
    May 26 '15 at 20:47




    Do you intend to extract values from uniqueness? If so f$uniquenesses[f$uniquenesses > 1.1] would work, for other attributes it should be along similar lines. You can post more code if that will help.
    – Ziyao Wei
    May 26 '15 at 20:47












    That was exactly what I needed. Thanks!
    – Rilcon42
    May 26 '15 at 20:48




    That was exactly what I needed. Thanks!
    – Rilcon42
    May 26 '15 at 20:48












    up vote
    1
    down vote













    This is three years too late, but the cutoff command does work in factor analysis:
    some factor analysis where i only want loadings larger than 0.3:



    print(factanal(df,factoramount)$loadings, cutoff=0.3)





    share|improve this answer








    New contributor




    Huy Pham is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.





















      up vote
      1
      down vote













      This is three years too late, but the cutoff command does work in factor analysis:
      some factor analysis where i only want loadings larger than 0.3:



      print(factanal(df,factoramount)$loadings, cutoff=0.3)





      share|improve this answer








      New contributor




      Huy Pham is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.



















        up vote
        1
        down vote










        up vote
        1
        down vote









        This is three years too late, but the cutoff command does work in factor analysis:
        some factor analysis where i only want loadings larger than 0.3:



        print(factanal(df,factoramount)$loadings, cutoff=0.3)





        share|improve this answer








        New contributor




        Huy Pham is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        This is three years too late, but the cutoff command does work in factor analysis:
        some factor analysis where i only want loadings larger than 0.3:



        print(factanal(df,factoramount)$loadings, cutoff=0.3)






        share|improve this answer








        New contributor




        Huy Pham is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        share|improve this answer



        share|improve this answer






        New contributor




        Huy Pham is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        answered Nov 10 at 11:59









        Huy Pham

        112




        112




        New contributor




        Huy Pham is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.





        New contributor





        Huy Pham is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.






        Huy Pham is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.



























             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f30467834%2fr-print-cutoff-values-under-a-certain-value%23new-answer', 'question_page');

            );

            Post as a guest














































































            這個網誌中的熱門文章

            What does pagestruct do in Eviews?

            Dutch intervention in Lombok and Karangasem

            Channel Islands