search for: utkarshsinghal

Displaying 19 results from an estimated 19 matches for "utkarshsinghal".

2009 May 04
4
Splitting a vector into equal groups
Hi All, I have vector of length 52, say, x=sample(30,52,replace=T). I want to sort x and split into five *nearly equal groups*. Note that the observations are repeated in x so in case of a tie I want both the observations to fall in same group. This seems a very common task to do, but still I couldn't find an R function to do this. Any help would be highly appreciated. Regards Utkarsh
2009 Jun 30
4
R version-2.9.1 for Linux
Hi All, I am currently using R version 2.8.1 on linux cent os 4.4 (i386) and want to upgrade to version 2.9.1. It seems to me that version-2.9.1 is it not for my OS. Am I right? Regards Utkarsh [[alternative HTML version deleted]]
2010 Dec 17
1
[Fwd: adding more columns in big.matrix object of bigmemory package]
...small enough to be read in usual R, just the combined dataset is huge. Any thoughts are welcome. Thanks, Utkarsh -------- Original Message -------- Subject: adding more columns in big.matrix object of bigmemory package Date: Thu, 16 Dec 2010 18:29:38 +0530 From: utkarshsinghal [1]<utkarsh.singhal at global-analytics.com> To: r help [2]<r-help at stat.math.ethz.ch> Hi all, Is there any way I can add more columns to an existing filebacked big.matrix object. In general, I want a way to modify an existing big.matrix object, i.e., add rows/...
2009 May 18
2
intermediate iterations of stepwise regression
Hi all, I am performing a stepwise regression by running the "step" function on an "lm" object. Now I want to save the intermediate iterations. I know the argument trace=T will print it on the console, but I rather want to assign it to some R object or may be output it in a CSV or text file. Any help will be appreciated. Regards Utkarsh
2011 May 14
2
calling "exists" function inside another function is not working
Hi all, I want to define a function such that one of its argument if passed do one thing and if not passed do the second thing. So basically, I have to check whether the argument is passed or not inside the function. I am trying to use 'exists' function to do this. > f = function(a,b){exists("b")} > f(a=3, b=4) [1] TRUE This is working as expected.
2011 May 14
2
calling "exists" function inside another function is not working
Hi all, I want to define a function such that one of its argument if passed do one thing and if not passed do the second thing. So basically, I have to check whether the argument is passed or not inside the function. I am trying to use 'exists' function to do this. > f = function(a,b){exists("b")} > f(a=3, b=4) [1] TRUE This is working as expected.
2009 May 27
3
Defining functions - an interesting problem
I define the following function: (Please don't wonder about the use of this function, this is just a simplified version of my actual function. And please don't spend your time in finding an alternate way of doing the same as the following does not exactly represent my function. I am only interested in a good explanation) > f1 =
2009 Nov 23
3
FUN argument to return a vector in aggregate function
Hi All, I am currently doing the following to compute summary statistics of aggregated data: a = aggregate(warpbreaks$breaks, warpbreaks[,-1], mean) b = aggregate(warpbreaks$breaks, warpbreaks[,-1], sum) c = aggregate(warpbreaks$breaks, warpbreaks[,-1], length) ans = cbind(a, b[,3], c[,3]) This seems unnecessarily complex to me so I tried > aggregate(warpbreaks$breaks, warpbreaks[,-1],
2009 Jun 02
2
bigmemory - extracting submatrix from big.matrix object
I am using the library(bigmemory) to handle large datasets, say 1 GB, and facing following problems. Any hints from anybody can be helpful. _Problem-1: _ I am using "read.big.matrix" function to create a filebacked big matrix of my data and get the following warning: > x = read.big.matrix("/home/utkarsh.s/data.csv",header=T,type="double",shared=T,backingfile
2009 Sep 14
1
setting plotting device
Hi All, I have recently *re*-installed R-2.9.1 in my Linux machine. Since then, I am unable to plot using the usual interactive device. > plot(1:10) This plots in a pdf file "Rplots.pdf" in my working directory. > sessionInfo() R version 2.9.1 (2009-06-26) i686-pc-linux-gnu locale:
2009 Apr 30
2
problem in as.date
I never understood that why is the value returned by as.date function in the library(survival) never matches with the description given in the help file: Following is the extract from ?as.date Description: Converts any of the following character forms to a Julian date: 8/31/56, 8-31-1956, 31 8 56, 083156, 31Aug56, or August 31 1956. Usage: as.date(x, order = "mdy", ...)
2009 Jul 03
2
bigglm() results different from glm()
Hi Sir, Thanks for making package available to us. I am facing few problems if you can give some hints: Problem-1: The model summary and residual deviance matched (in the mail below) but I didn't understand why AIC is still different. > AIC(m1) [1] 532965 > AIC(m1big_longer) [1] 101442.9 Problem-2: chunksize argument is there in bigglm but not in biglm, consequently,
2009 Jun 16
1
Testing if all elements are equal in a vector/matrix
Hi All, There are several replies to the question below, but I think there must exist a better way of doing so. I just want to check whether all the elements of a vector are same. My vector has one million elements and it is highly likely that there are distinct elements in the first few itself. For example: > x = c(1,2,rep(1,100000)) I want the answer as FALSE, which is clear from the
2009 Nov 23
0
R-help Digest, Vol 81, Issue 23
...in 'MatchBalance' of the package 'Matching' > (anna0102) > 114. Re: dynlm predict with newdata? (Achim Zeileis) > 115. Re: Removing "+" and "?" signs (Peter Dalgaard) > 116. FUN argument to return a vector in aggregate function > (utkarshsinghal) > 117. Downloading clim.pact package (ZABLONE OWITI) > 118. non-intuitive behaviour after type conversion (Alan Kelly) > 119. Re: MASS loading error (Uwe Ligges) > 120. Re: FUN argument to return a vector in aggregate function > (Jim Lemon) > 121. Odp: FUN argume...
2009 Jun 01
1
installing sn package
...uestion (John C Nash)   41. Re: Harmonic Analysis (Gerard M. Keogh)   42. Re: How to write a loop? (Andrew Dolman)   43. Re: file.move? (Prof Brian Ripley)   44. Re: Sort matrix by column 1 ascending then by column 2       decending (Paul Geeleher)   45. Defining functions - an interesting problem (utkarshsinghal)   46. Re: Hierarchical glm with binomial family (Ben Bolker)   47. Re: Warning message as a result of logistic regression       performed (Gavin Simpson)   48. Re: Multivariate Transformations (Gavin Simpson)   49. Re: How to exclude a column by name? (Stavros Macrakis)   50. Re: Neural Network re...
2009 Jul 09
2
How to Populate List
...lation pyramids (Victor Manuel Garcia Guerrero)   157. Re: Population pyramids (Daniel Malter)   158. Re: RDCOMClient: how to close Excel process? (Lauri Nikkinen)   159. Re: Population pyramids (Victor Manuel Garcia Guerrero)   160. Re: bigglm() results different from glm()+Another question       (utkarshsinghal)   161. Re: Extracting a column name in loop? (Moshe Olshansky)   162. Cuminc Plot (kende jan)   163.  Node colors in pvclust (nyk)   164. Re: print() to file? (Moshe Olshansky)   165. Re: error: no such index at level 2 (Petr PIKAL)   166. Re: Mysteriously vanishing LD_LIBRARY_PATH (Patrick Connol...
2009 Jun 12
0
glm binomial logit - removing extra computations
Hi all, I am using glm function with family binomial(logit) to fit logistic regression model. My data is very big and the algorithm is such that it has to run glm function hundreds of times. Now *I need only the **estimates of the coefficients and std. error in my output, *but apparently glm function is computing several other statistics and parameters (mentioned below) which increases the
2009 Apr 16
2
splitting vector into equal sets
Hi R, I have explored R archives a lot but couldn't find an efficient way of doing the following: I want to split a vector into sets of equal sizes. Is there any inbuilt function of doing so with the option of specifying how to treat the remaining observations. For example: suppose I want to split 20 observations in 3 groups, then I also want the option to put the extra two observations
2010 Dec 16
0
adding more columns in big.matrix object of bigmemory package
Hi all, Is there any way I can add more columns to an existing filebacked big.matrix object. In general, I want a way to modify an existing big.matrix object, i.e., add rows/columns, rename colnames, etc. I tried the following: > library(bigmemory) > x = read.big.matrix("test.csv",header=T,type="double",shared=T,backingfile="test