[R] Behaviour of dfmax in glmnet

2019-02-28 Thread Abhishek Ghose
Hi, I am new to glmnet, so I do not yet understand fully what the various parameters do. I am trying to build a multinomial classifier which restricts the number of features used in the model. From reading the docs and some answers on this forum, I understand dfmax is the way to do it. I

[R] ESTIMATION OF PANEL VAR

2017-03-20 Thread Abhishek Kumar Rohit
Is there any package available for estimating Panel VAR. Can the packages vars and palm be combined in some way to do that? Regards, *Abhishek Rohit* Research Fellow IIM Raipur [[alternative HTML version deleted]] __ R-help@r-project.org

[R] Fw: how to use 97.5%,2.5% values of parameters for next calculation

2016-10-06 Thread abhishek pandey
Sent from RediffmailNG on Android From: abhishek pandeyabhishekpandey_1...@rediffmail.com Sent:Thu, 06 Oct 2016 13:24:39 +0530 To: r-help-ow...@r-project.org Subject: how to use 97.5%,2.5% values of parameters for next calculation Sir I request you to help me for completing my programm. SIZE

[R] (no subject)

2016-10-06 Thread abhishek pandey
kindly solve my problem sir. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

[R] ATTN: Urgent Guidance Needed on scraping tweets for last 10 years using TwitteR / search twitter function.

2014-07-30 Thread Abhishek Dutta
Hi This is Abhishek and I am trying to look for tweets on 'Election' from 2000 to YTD. I have registered on twitter and performed a handshake between the systems as well. Next I am trying to fetching tweets chronologically using the below code:- tweets1.list = searchTwitter('Election',lang=en

Re: [R] ATTN: Urgent Guidance Needed on scraping tweets for last 10 years using TwitteR / search twitter function.

2014-07-30 Thread Abhishek Dutta
Hi Tim, Thanks a tonne for your reply. Will check twitter Archives. Thanks Best Abhishek On Wed, Jul 30, 2014 at 4:57 PM, Timothy W. Cook t...@mlhim.org wrote: The Twitter API doesn't provide data that far back. There are services that have archived the data and charge a fee depending

[R] how to make R render plots faster

2013-11-22 Thread Abhishek Pratap
Hi All We are using R to spit out plots(heatmaps) which are being rendered on a shiny app (web page). Currently we are facing an issue with the time it takes R to render a plot taking out the time it takes to do the computation. Let me show the same through a contrived example. In this basic test

[R] reshaping a data frame

2013-06-10 Thread Abhishek Pratap
Hi Guys I am trying to cast a data frame but not aggregate the rows for the same variable. here is a contrived example. **input** temp_df - data.frame(names=c('foo','foo','foo'),variable=c('w','w','w'),value=c(34,65,12)) temp_df names variable value 1 foow34 2 foow

Re: [R] reshaping a data frame

2013-06-10 Thread Abhishek Pratap
(within(temp1_df,{Seq1-ave(value,names,variable,FUN=seq_along)}),names+Seq1~variable,value.var=value)[,-2] res # names w x #1 foo 29 28 #2 foo 36 33 #3 foo 35 39 #4 foo1 29 37 #5 foo1 37 29 #6 foo1 34 30 A.K. - Original Message - From: Abhishek Pratap abhishek

[R] manipulating R contingency tables

2013-04-06 Thread Abhishek Pratap
Hi Guys I am back with another thing that's puzzling me. I am creating contingency tables but then I want to filter out certain columns and also find if any entry in the table is 0. Example: gts labels A1 B2 G3 121 127 120 223 112 0 Here I want to remove B2 column

[R] about subsetting vectors/list in R

2013-04-04 Thread Abhishek Pratap
Hey Guys Getting spinned about a slick way to join every 2 entry in a list / vector in R x=(rep(c('A','G','C','T'),1000)) A G C T A G C T etc form another list with entries as AG CT AG etc so join the first 2 and so on. Thanks!' '-Abhi [[alternative HTML version deleted]]

Re: [R] about subsetting vectors/list in R

2013-04-04 Thread Abhishek Pratap
On Thu, Apr 4, 2013 at 5:53 PM, R. Michael Weylandt michael.weyla...@gmail.com wrote: On Thu, Apr 4, 2013 at 7:46 PM, Abhishek Pratap abhishek@gmail.com wrote: Hey Guys Getting spinned about a slick way to join every 2 entry in a list / vector in R x=(rep(c('A','G','C','T

[R] Using caegorical variables in package randomForest.

2012-03-13 Thread abhishek
idea how can i use the c*ategorical variables for building a two class classifier.* I am using a factor consisting of 0 and 1 for the classification target. Thank you for your ideas. - abhishek -- View this message in context: http://r.789695.n4.nabble.com/Using-caegorical-variables

[R] dividing values of each column in a dataframe

2012-02-06 Thread Abhishek Pratap
Hey Guys I want to divide(numerically) all the columns of a data frame by different numbers. Here is what I am doing but getting a weird error. The values in each column are not getting divided by the corresponding value in the denominator vector instead by the alternative values. I am sure I am

[R] Comparing two gff/gtf files : de novo transcripts v/s reference

2011-10-24 Thread Abhishek Pratap
Hi All I am wondering if people based on their experience could share what methods one could use to compare two gff/gtf files. The reason why I want to do so is that we have constructed a RNA-Seq based transcriptome and would like to compare it with reference transcriptome we had from in-silico

Re: [R] Comparing two gff/gtf files : de novo transcripts v/s reference

2011-10-24 Thread Abhishek Pratap
Hey Martin Thats exactly what I intended but sent it to general R list. Will post it again. Thanks for checking. -A On Mon, Oct 24, 2011 at 2:32 PM, Martin Morgan mtmor...@fhcrc.org wrote: On 10/24/2011 02:23 PM, Abhishek Pratap wrote: Hi All I am wondering if people based

[R] quick question : interpolating file name in pipe command

2011-05-05 Thread Abhishek Pratap
Hi Guys I am trying to read a bunch of files in the loop but pipe function which I use to cut few columns is somehow unable to interpolate the file variable. eg: file=check.txt data - read.table(pipe(cut -f 2,3 file), sep=\t, col.names=c('pos','cov') ) cut: file: No such file or directory

Re: [R] quick question : interpolating file name in pipe command

2011-05-05 Thread Abhishek Pratap
You can ignore my question I was able to figure out the way. I guess when I touch R after couple of weeks I am rusty. -Abhi On Thu, May 5, 2011 at 2:15 PM, Abhishek Pratap abhishek@gmail.com wrote: Hi Guys I am trying to read a bunch of files in the loop but pipe function which I use

[R] Clustering problem

2011-03-21 Thread Abhishek Pratap
Hi Guys I want to apply a clustering algo to my dataset in order to find the regions points(X,Y) which have similar values(percent_GC and mean_phred_quality). Details below. I have sampled 1% of points from my main data set of 85 million points. The result is still somewhat large 800K points

Re: [R] Interactive/Dynamic plots with R

2011-02-28 Thread Abhishek Pratap
Thanks Greg for all the suggestions. -Abhi On Sat, Feb 26, 2011 at 2:07 PM, Tal Galili tal.gal...@gmail.com wrote: Hello Abhishek, Also notice that if you are on windows, then rggobi doesn't work for the latest R (with ggobi 2.1.8) because of GTK/dll issues.  In such a case, Greg's other

Re: [R] Interactive/Dynamic plots with R

2011-02-26 Thread Abhishek Pratap
Healthcare greg.s...@imail.org 801.408.8111 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of Abhishek Pratap Sent: Friday, February 25, 2011 12:37 AM To: r-help@r-project.org Subject: [R] Interactive/Dynamic plots with R Hi

[R] Interactive/Dynamic plots with R

2011-02-24 Thread Abhishek Pratap
Hi Guys In order to look at a dense plot I would like to have the capability to plot dynamic/interactive. Before I try rgobi which I heard can help me; I would like to take your opinion. Thanks! -Abhi __ R-help@r-project.org mailing list

Re: [R] modifying factors in a data frame

2010-08-19 Thread Abhishek Pratap
then data1$sample - as.factor(as.numeric(data1$sample)) HTH Peter Alspach -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- project.org] On Behalf Of Abhishek Pratap Sent: Thursday, 19 August 2010 5:41 p.m. To: r-help@r-project.org Subject: [R

[R] modifying factors in a data frame

2010-08-18 Thread Abhishek Pratap
Hi All I have a data frame in which on the columns is a factor with following levels Levels: M006 M0114 M0379 M0432 M0823 M1012 M1096 M1107 SW393 SW708 I want to change all the M006 to 1, M0114 to 2 and so on. What I am trying is not working. data1$sample[data1$sample =='M006'] - 1 Warning

[R] Passing values to a function when using apply

2010-04-27 Thread Abhishek Pratap
Hi All Slightly lost on how should I pass values to a function I am calling using apply. apply( veh_drg_animal1[ , c(readCount,gene_length)] ,1, stats() ) here stats is a custom function where I want to pass two parameters from data frame as shown and a third argument which is constant per

Re: [R] Passing values to a function when using apply

2010-04-27 Thread Abhishek Pratap
,total) { ( count/( total * (length_gene ) ) ) * ( 10^9) } Thanks! -Abhi On Tue, Apr 27, 2010 at 2:18 PM, Henrique Dallazuanna www...@gmail.com wrote: Try this: apply( veh_drg_animal1[ , c(readCount,gene_length)] ,1,  stats, agr3 = your_constant) On Tue, Apr 27, 2010 at 3:10 PM, Abhishek

Re: [R] Passing values to a function when using apply

2010-04-27 Thread Abhishek Pratap
Hi Guys Thank you for clearing something I dint know. Just wondering the reason of putting the word function(x) in the apply function when we have already declared stats function separately. I better understand how the arguments are passed. Thanks! -Abhi On Tue, Apr 27, 2010 at 2:46 PM, Erik

Re: [R] Passing values to a function when using apply

2010-04-27 Thread Abhishek Pratap
Makes sense. Thanks guys for your quick reverts! -Abhi On Tue, Apr 27, 2010 at 3:34 PM, Erik Iverson er...@ccbr.umn.edu wrote: Abhishek Pratap wrote: Hi Guys Thank you for clearing something I dint know. Just wondering the reason of putting the word function(x)  in the apply function

Re: [R] Merging files

2010-04-27 Thread Abhishek Pratap
Hi Alex merge wont write a file automatically. You need to use something which can direct the output to a file. write.table(merge12, file = output.data ) should do the trick. Read more at ?write.table -Abhi On Tue, Apr 27, 2010 at 5:23 PM, Alex Jameson ajameso...@gmail.com wrote: David,

Re: [R] ShortRead with BWA

2010-04-27 Thread Abhishek Pratap
Hi Duke While your mails are most welcome to this mailing list. You may find the following mailing list more useful as it caters to the Bioconductor and Next Generation Sequencing stuff. Bioc-sig-sequencing mailing list bioc-sig-sequenc...@r-project.org

Re: [R] Maximum Likelihood Estimation in R

2010-04-21 Thread Abhishek Pratap
Hey Henrik I dont do MLE myself but this recent blog might be helpful. http://www.johnmyleswhite.com/notebook/2010/04/21/doing-maximum-likelihood-estimation-by-hand-in-r/ -A On Wed, Apr 21, 2010 at 10:02 AM, Thomas Stewart tgstew...@gmail.com wrote: Two possible problems: (a) If you're

[R] Merging data frames on two conditions

2010-04-06 Thread Abhishek Pratap
Hi Guys I have two data frames which I would like to merge on two conditions. I am doing the following (abstract form) new.data.frame - merge(df1,df2, by=c(Col1,Col2)) It is giving me a null result. Basically I need to apply two conditions. I also tried sqldf but it is running forever. Will

Re: [R] Merging data frames on two conditions

2010-04-06 Thread Abhishek Pratap
723152 ... On Tue, Apr 6, 2010 at 3:59 PM, David Winsemius dwinsem...@comcast.netwrote: On Apr 6, 2010, at 3:54 PM, Abhishek Pratap wrote: Hi Guys I have two data frames which I would like to merge on two conditions. I am doing the following (abstract form) new.data.frame - merge(df1,df2

Re: [R] Merging data frames on two conditions

2010-04-06 Thread Abhishek Pratap
And I should also add that if I merge only on one column it works fine but the result is not what I want. merge(data_lane6_snps, data_lane6_snps_rsid , by = c(SNP) : works as expected. Is the chr column being a factor creating probs here ? -A On Tue, Apr 6, 2010 at 4:03 PM, Abhishek Pratap

Re: [R] Merging data frames on two conditions

2010-04-06 Thread Abhishek Pratap
correct results since it is possible for two chromosomes to have a SNP at the same bp location so the merge needs to take both SNP position and Chromosome into account. Thanks! -Abhi On Tue, Apr 6, 2010 at 4:42 PM, David Winsemius dwinsem...@comcast.netwrote: On Apr 6, 2010, at 4:03 PM, Abhishek

Re: [R] Merging data frames on two conditions

2010-04-06 Thread Abhishek Pratap
Just so you know length(intersect(data_lane6_snps$SNP, data_lane6_snps_rsid$SNP)) 796120 I just need to include the chr condition now where I am stuck. -Abhi On Tue, Apr 6, 2010 at 4:51 PM, Abhishek Pratap abhishek@gmail.comwrote: Hi David I can understand looking the SNP data values

Re: [R] Merging data frames on two conditions

2010-04-06 Thread Abhishek Pratap
, Abhishek Pratap wrote: Just so you know length(intersect(data_lane6_snps$SNP, data_lane6_snps_rsid$SNP)) 796120 I just need to include the chr condition now where I am stuck. -Abhi On Tue, Apr 6, 2010 at 4:51 PM, Abhishek Pratap abhishek@gmail.com wrote: Hi David I can understand

[R] Adding a prefix to all values in a col in a data.frame

2010-04-05 Thread Abhishek Pratap
Hi All I am looking for a way to prefix a constant value to all the rows in column in a data frame. Eg. V1 2 3 4 5 I want to make it like this V1 number2 number3 number4 number5 Thanks! -Abhi [[alternative HTML version deleted]] __

Re: [R] Adding a prefix to all values in a col in a data.frame

2010-04-05 Thread Abhishek Pratap
Thanks Henrique. It works fine. Cheers! -Abhi On Mon, Apr 5, 2010 at 1:41 PM, Henrique Dallazuanna www...@gmail.comwrote: Try this: DF - transform(DF, V1 = sprintf('number%d', V1)) On Mon, Apr 5, 2010 at 2:38 PM, Abhishek Pratap abhishek@gmail.com wrote: Hi All I am looking

[R] Plotting 15 million points

2010-02-25 Thread Abhishek Pratap
Hi All I have a vector of about 15 million numbers which I would like to plot. The goal is the see the distribution. I tired the usual steps. 1. Histogram : never gets complete my window freezes w/out log base 10 2. Density : I first calculated the kernel density and then plotted it which

Re: [R] Plotting 15 million points

2010-02-25 Thread Abhishek Pratap
] 16750589 hist(log(s,10),breaks=100) Thanks! -Abhi On Thu, Feb 25, 2010 at 7:38 PM, Nordlund, Dan (DSHS/RDA) nord...@dshs.wa.gov wrote: -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Abhishek Pratap Sent: Thursday, February 25

[R] Taking mean of 3 cols in data frame : error

2010-01-29 Thread Abhishek Pratap
Hi All I am seeing quite a silly thing for which I dont have much of explanation. I want to take per row mean of 3 columns of a data frame. What I am getting is all NA in the result. Here is what I am doing apply(a[,1:3],1,mean) I get warnings. In mean.default(newX[, i], ...) : argument

Re: [R] Taking mean of 3 cols in data frame : error

2010-01-29 Thread Abhishek Pratap
I see what is happening here. When I am reading the data frame values from a csv file, they are not read as numerics. _A On Sat, Jan 30, 2010 at 12:29 AM, Abhishek Pratap abhishek@gmail.com wrote: Hi All I am seeing quite a silly thing for which I dont have much of explanation. I want

Re: [R] Taking mean of 3 cols in data frame : error

2010-01-29 Thread Abhishek Pratap
I exactly know my problem. The read.table by default reads my data from few columns as factors/character type. Can you please give me an example of how to force it to read these columns as numbers. I dont see example of how to use (as.is) Thanks! -Abhi On Sat, Jan 30, 2010 at 12:34 AM, Abhishek

[R] Operating on each row of data frame

2010-01-13 Thread Abhishek Pratap
Hi All I have a data frame in which there are 4 columns . Column 1 : name Column 2-4 : values I would like to calculate mean/Standard error of values in column 2-4 and store them in column 5,6 respectively. I have done the following but doesn't seem to work mean_N_SE -function(x) { name

Re: [R] Operating on each row of data frame

2010-01-13 Thread Abhishek Pratap
)],1,mean),apply(d[,c(2,3,4)],1,sd)) HTH, Stephan Abhishek Pratap schrieb: Hi All I have a data frame in which there are 4 columns . Column 1 : name Column 2-4 : values I would like to calculate mean/Standard error of values in column 2-4 and store them in column 5,6 respectively

[R] Normalization of Data

2009-11-15 Thread Abhishek Pratap
Hi All I am looking for some resource to learn data normalization. I understand I am talking very broad here, I need something like a primer to give me a jump start. If you happen to know any good resource please do let me know. Cheers, -Abhi [[alternative HTML version deleted]]

Re: [R] Normalization of Data

2009-11-15 Thread Abhishek Pratap
:29 -0800, Abhishek Pratap escribió: Hi All I am looking for some resource to learn data normalization. I understand I am talking very broad here, I need something like a primer to give me a jump start. If you happen to know any good resource please do let me know. Cheers, -Abhi

Re: [R] Writing R Scripts and passing command line arguments

2009-09-09 Thread Abhishek Pratap
on Rscript will help. Thanks, -Abhi On Mon, Sep 7, 2009 at 2:37 PM, cls59 ch...@sharpsteen.net wrote: Abhishek Pratap wrote: 1. What's the best way to pass command line arguments to R scripts ? As Gabor mentioned, the commandArgs function and the getopt package provide some

Re: [R] Joining Characters in R {issue with paste}

2009-09-09 Thread Abhishek Pratap
I did try ?paste and paste(a,b,separator=). same result Thanks, -Abhi On Wed, Sep 9, 2009 at 5:11 PM, milton ruser milton.ru...@gmail.com wrote: You not tryed ?paste :-) paste(a,b,sep=) bests milton On Wed, Sep 9, 2009 at 5:08 PM, Abhishek Pratap abhishek@gmail.comwrote: Hi Guys

Re: [R] Joining Characters in R {issue with paste}

2009-09-09 Thread Abhishek Pratap
and their descriptions, specifically the sep argument? Presumably, you want, paste(a, b, sep = ) -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Abhishek Pratap Sent: Wednesday, September 09, 2009 4:09 PM To: r-help@r-project.org

[R] Writing R Scripts and passing command line arguments

2009-09-07 Thread Abhishek Pratap
Hi Guys I am Abhishek, primarily a bioinformatician. I have recently started using a lot of R thanks to some excellent packages available. Lately I have felt the need to batch process few of the R scripts I have been working with and strangely enough I am not able to find a good resource on how

[R] Logistic regression on aggregate data

2008-08-11 Thread Vibhanshu Abhishek
Hi, I want to run a logistic regression on summary data and I was not able to find the adequate R function to do so. The data is summarized daily and instead of the binary y_t I have n_d and m_d, where is the number of instances in which a choice could have been made and m_d is the number of