how to increase the limit for max.print in R

R

R Problem Overview


I am using the Graph package in R for maxclique analysis of 5461 items.

The final output item which I get is very long, so I am getting the following warning:

> reached getOption("max.print") -- omitted 475569 rows

Can somebody please provide me the pointers with how to increase the limit for max.print.

R Solutions


Solution 1 - R

Use the options command, e.g. options(max.print=1000000).

See ?options:

 ‘max.print’: integer, defaulting to99999’.  ‘print’ or ‘show’
      methods can make use of this option, to limit the amount of
      information that is printed, to something in the order of
      (and typically slightly less than) ‘max.print’ _entries_.

Solution 2 - R

See ?options:

options(max.print=999999)

Solution 3 - R

set the function options(max.print=10000) in top of your program. since you want intialize this before it works. It is working for me.

Solution 4 - R

You can use the options command to change the max.print value for the value limit you want to reach. For example:

options(max.print = 1000000)

There you can change the value of the max.print in R.

Solution 5 - R

I fixed it just now. But it looks busty. Anyone make it simple please?

def list_by_tag_post(request):

# get POST
all_tag = request.POST.getlist('tag_list')

arr_query = list(all_tag)

for index in range(len(all_tag)):
    tag_result = Tag.objects.get(id=all_tag[index])

    all_english_text = tag_result.notes.all().values('english_text', 'id')

    arr_query[index] = all_english_text



for index in range(len(arr_query)):

    all_english_text = all_english_text | arr_query[index]


# Remove replicated items
all_english_text = all_english_text.order_by('id').distinct()


# render
context = {'all_english_text': all_english_text, 'all_tag': all_tag}
return render(request, 'list_by_tag.html', context)

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionJayView Question on Stackoverflow
Solution 1 - RNPEView Answer on Stackoverflow
Solution 2 - RrcsView Answer on Stackoverflow
Solution 3 - Ruser11049208View Answer on Stackoverflow
Solution 4 - RAdam RosarioView Answer on Stackoverflow
Solution 5 - RJayView Answer on Stackoverflow