search for: quantcut

Displaying 15 results from an estimated 15 matches for "quantcut".

2009 Jul 08
0
Help resolving error in quantcut
I am trying to use the quantcut function to create deciles, but I am getting the error below. I am new to using this function and do not know how to properly use the options or some other conversion that is necessary. #initial summary using describe function in Hmisc library DegreeBurn4th n missing unique Mean .05...
2008 Nov 03
1
quantcut
I'm trying to devide x into tertiles, but ends up with integer limits even x holds one decimal. The analysis is extremely sensitive to the limits and I like to keep them right. How can that be done? quartiles <- quantcut( x[x >= 0], q=seq(0,1, by=(1/3)) > table(quartiles) quartiles [180,344] (344,448] (448,644] 16467 16476 16452 [[alternative HTML version deleted]]
2009 Dec 15
1
Supressing Scientific Notation
I'm trying to display my deciles without scientific notation, but have not found an option that will allow me to do so. According to web searches, the options(scipen=999) should remove scientific notation, but it seems not too. Does this option work with quantcut function? Is there any other option that can be used? I am using verison 2.10.0. library(gtools) library(gdata) options(scipen=999) > parad<-quantcut(benchmarkPara$Benchmark_Total, q=seq(0,1,by=0.1), na.rm=TRUE) > table(parad) parad [2.29e+05,2.7e+05] (2.7e+05,3.69e+05] (3.69e+05,3.99e...
2007 May 26
1
using "cut"
Suppose I have some data >x <- rnorm(1000); >y <- x*x; then try to cut it into 2 chunks, >c <- cut(y, breaks=2); >summary(y) Min. 1st Qu. Median Mean 3rd Qu. Max. 6.879e-06 9.911e-02 3.823e-01 9.499e-01 1.297e+00 8.342e+00 >summary(c) (-0.00833,4.17] (4.17,8.35] 958 42 Is that the correct behavior? Why is the left hand
2009 Apr 16
2
splitting vector into equal sets
...servations. For example: suppose I want to split 20 observations in 3 groups, then I also want the option to put the extra two observations into the 1st group or the last group or one in each group starting from 1st or starting from last. I have already tried the "cut" & the "quantcut" function but of no use. Any help will be appreciated. Note that I am looking for an R function rather than lines of code. Regards Utkarsh
2012 Feb 28
2
Error: could not find function "hier.part"
...ogratio gtools::inv.logit gtools::invalid gtools::keywords gtools::logit gtools::logratio2foldchange gtools::mixedorder gtools::mixedsort gtools::odd gtools::permutations gtools::permute gtools::quantcut gtools::rdirichlet gtools::running gtools::scat gtools::setTCPNoDelay gtools::smartbind gtools::sprint gtools::strmacro I am new to R, and I googled everything about the error message. I don't really understand wha...
2010 Jan 07
1
Help formating data to display commas
...at will display the data with commas, they only seem to add decimals. Is there a format that will display commas without me reverting to the labels statement. This is an ongoing process where the values are updated, so using the labels statement would be too much to manage. Benchparaq<-levels(quantcut(benchmarkPara$Benchmark_Total, q=seq(0,1,by=0.25), na.rm=TRUE)) > #,labels=c("$267,000-<$436,000","$436,000-<$559,000","$559,000-<$836,000","$836,000-<$1,590,000")) > lower <-as.numeric(sub("\\((.+),.*", &quot...
2006 Oct 05
5
[Fwd: Re: Block comments in R?]
Ooops! Sorry, I send it only to Uwe Ligges the first time. Best, Philippe Grosjean This is perhaps another solution, more elegant in the way the block comment is written... but it requires to redefine `!` and slows it a little bit because it tests first its arguments before calling .Primitive(!): It takes advantage of `!` being not defined for character arguments: > !2 [1] FALSE >
2002 Sep 23
3
New version of gregmisc package
...ogram interleave Interleave Rows of Data Frames or Matrices lowess Scatter Plot Smoothing nobs Compute the Number of Non-missing Observations plotCI Plot Error Bars plotmeans Plot Group Means and Confidence Intervals quantcut Create a Factor Variable Using the Quantiles of a Continuous Variable rename.vars Rename variables in a dataframe reorder Reorder the Levels of a Factor running Apply a Function Over Adjacent Subsets of a...
2002 Sep 23
3
New version of gregmisc package
...ogram interleave Interleave Rows of Data Frames or Matrices lowess Scatter Plot Smoothing nobs Compute the Number of Non-missing Observations plotCI Plot Error Bars plotmeans Plot Group Means and Confidence Intervals quantcut Create a Factor Variable Using the Quantiles of a Continuous Variable rename.vars Rename variables in a dataframe reorder Reorder the Levels of a Factor running Apply a Function Over Adjacent Subsets of a...
2002 Oct 31
1
Re: gregmisc version 0.7.3 now available
...sts Construct a User-Specified Contrast Matrix nobs Compute the Number of Non-missing Observations permute Randomly Permute the Elements of a Vector plotCI Plot Error Bars plotmeans Plot Group Means and Confidence Intervals quantcut Create a Factor Variable Using the Quantiles of a Continuous Variable rename.vars Rename variables in a dataframe reorder Reorder the Levels of a Factor running Apply a Function Over Adjacent Subsets of a...
2010 Jun 16
3
Decile
Hello comunity, I'm trying to find a similar function as decile of SPSS, NTILES (10) some of you know about that, I will appreciate your help in advance. In SPSS VARIABLES=Sales (A) /NTILES (10) /PRINT=NO for example if I have Next data input: case IdCust Sales Profit 1 265 140.81 314.31 2 266 1778.96 408.32 3 267 2663.66 820.85 4 268 2994.14 913.73 5 269 2185.58 686.64 6 271 105.21
2003 Jan 31
0
Version 0.8.0 of the gregmisc package is now available
...servations permute Randomly Permute the Elements of a Vector plotCI Plot Error Bars plotmeans Plot Group Means and Confidence Intervals qqnorm.aov Makes a half or full normal plot for the effects from an aov model quantcut Create a Factor Variable Using the Quantiles of a Continuous Variable rename.vars Rename variables in a dataframe reorder Reorder the Levels of a Factor running Apply a Function Over Adjacent Subsets of a...
2007 Jun 11
3
if statement
Hi all, I have a rather naive question. I have the height of 100 individuals in a table and I want to assign the tallest 30% as Case=1 and the bottom 30% as Case=0. How do I do that? thanks. jiong The email message (and any attachments) is for the sole use of the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure or distribution is
2002 Mar 29
2
Output from examples in help files
I have a large number of troff help files which are automatically converted to .Rd files. Many of these have examples which contain the printed output of the examples. This makes example(functionname) not work. Is there a way to avoid removing all this output by delimiting it in some way such that the output will not appear in R-ex? Secondly, it would be nice if there was a place where output