similar to: question of R to do perl matching and matched string extraction

Displaying 20 results from an estimated 8000 matches similar to: "question of R to do perl matching and matched string extraction"

2010 Aug 22
4
how to implement string pattern extraction in R
Hi, In perl, to get a substring matching a particular pattern can be implemented like the following example: $x = "AAAA.txt"; if ($x=~ /(.*?)\.txt/){ $prefix = $1; } So how to do the same thing in R? Can someone provide me the code sample? Thanks much in advance. -- Waverley @ Palo Alto
2010 Sep 03
3
R program google search
Hi, Can someone help as how to use R to program google search in the R code? I know that other languages can allow or have the google search API If someone can give me some links or sample code I would greatly appreciate. Thanks. -- Waverley @ Palo Alto
2008 Mar 09
2
question about matrix one column values matching a vector of values
Hi, I have a matrix a = matrix (1:16, 4, 4) b = c (2,3) I want to find out which rows of a, where a[,1] equals any values of b? I know that if b is only one value, e.g, b=2, then what I want is a[a[,1] == 2,] But what about if it is not one value but a vector of values? Thanks much in advance. -- Waverley @ Palo Alto
2009 Jul 25
4
ROCR package question
I use ROCR to plot multiple runs' performance. Using the sample code as example: # plot ROC curves for several cross-validation runs (dotted # in grey), overlaid by the vertical average curve and boxplots # showing the vertical spread around the average. data(ROCR.xval) pred <- prediction(ROCR.xval$predictions, ROCR.xval$labels) perf <- performance(pred,"tpr","fpr")
2008 Oct 29
2
how to get the value of aov summary into another variable
Hi, I have a question of aov. e.g. aov.ex = aov(x~y) summary(aov.ex) The aov summary will print to the screen. How can I extract the aov result, in particular the values of Pr(>F) and F value into a vector so that I can use them for other use? Thanks. -- Waverley @ Palo Alto
2007 Jun 27
3
exaustive subgrouping or combination
Dear Colleagues, I am looking for a package or previous implemented R to subgroup and exaustively divide a vector of squence into 2 groups. For example: 1, 2, 3, 4 I want to have a group of 1, (2,3,4) (1,2), (3,4) (1,3), (2,4) (1,4), (2,3) (1,2,3), 4 (2,3), (1,4) ... Can someone help me as how to implement this? I get some imaginary problem when the sequence becomes large. Thanks much in
2009 Feb 07
2
Question about ROCR package
Hi, I have a question about ROCR package. I got the ROC curve plotted without any problem following the manual. However, I don't know to extract the values, e.g. y.values ( I think it is the area under the curve auc measure). The return is an object of class "performance" which have Slots and one of the slot is "y.values". I type the object and I can see them in
2009 Nov 17
2
question about function heatmap
Hi, I am using the function heatmap(stats) to draw a microarray heatmap, columns are samples and rows are gene features. I did a 2D clustering during the heatmap drawing. The features and samples indeed cluster into several blocks both vertically and horizontally. I can get the index of re-ordered rows and columns after the heatmap drawing by typing the the return variable of the heatmap
2008 Feb 21
2
how to create ROC curve for 2 dimensional classifiers
Hi, I understand for 1 d classifiers, you can use ROCR package. Is there a package you can plot ROC curve for 2d classifiers? One of my colleagues asked me about this. I have been quite puzzled, conceptually, how you can do the ROC curve for 2d classifiers. Can someone share his/her knowledge or experience? Thanks in advance. -- Waverley @ Palo Alto
2007 May 31
1
RMySQL DBI question
Dear colleague, I have two data frame which I tried to use dbWriteTable function with append=TRUE to write to the mysql database. The problem is that if I am run my R script directly then it is fine. Both data frame got written into the database. But when I tried to embed the script to be called as system("R --save < whatever.R") in my perl script, I saw very strange things. One
2006 Nov 03
2
one row matrix
Hi, when I assign a one row matrix to another variable, then somehow R automatically convert that varaible into a list. For example: > a = matrix (12, 3, 4) > b = a[1,] > b [1] 12 12 12 12 Is there a way to enable R automatically make b as a one row matrix , rather than explicitly assign like matrix (b, ncol=1). I have come across a couple of time, that when I try to check how many
2009 Jul 30
2
how to change the thickness of the lines of the boxplot outliers
Hi, I tried to use boxplot function. I am following the ?boxplot and can change the whisker box width using lwd parameter. However, when outline=TRUE, the thickness of the circle of the outliers is not proportionally changed when I change the line width of the whisker box. There must be another parameter for that. Unfortunately I don't know. please help and thanks much in advance. --
2010 May 23
1
User R to create MySQL database and table
Hi, I am thinking about using R to create a database, then create table in MySQL server. Can I do that using RMySQL package? I am familiar with RMySQL, and in the online help most of the sample code assumes the database exists and transact with the table inside the database. Can someone provide me some sample code to create a database and table? Specifically create a database first, then
2006 Nov 03
1
question of one matrix column being treated as list rather than vector
Hi, I have one matrix derived from my function. It is as following: Browse[1]> each.uaa.data [,1] [,2] [1,] 33 152.3530 [2,] 33 264.7059 [3,] 51 583.3333 [4,] 33 323.3333 [5,] 50 292.549 [6,] 33 300 [7,] 56 104.1176 [8,] 52 246.6667 [9,] 53 242.5490 [10,] 33 212.9412 when I tried to get each.uaa.data[,2], it gave me a list, when I expect a vector so that
2009 Feb 12
1
how to perform power analysis and sample size estimation/projection using R
Hi, I have a question in regarding to how to perform power analysis and sample size estimation/projection using R? I know power.t.test. It works really well with only one feature analysis. I have a set of features which collectively can discriminate binary classes. I can do power.t.test for each one feature to get a distribution for the sample size estimation to achieve certain power and
2007 Jun 04
2
RMySQL question, sql with R vector or list
Hi, I am trying to write a RMySQL sql script inside R such that part of the SQL would be R list or vector. For example, I want to select * from Atable where ID would equal to a members of R list or vector of "1, 2, 3". Here the ID list was generated inside R and then try to feed to mysql to call to get additional data sets. Can someone on the list help? Thanks. -- Waverley @ Palo
2009 Oct 28
1
need help explain the routine input parameters for seROC and cROC found in the R archive
Please help. I found the code in the archive. The author of this script says: "The first function (seROC) calculate the standard error of ROC curve, the second function (cROC) compare ROC curves." Can some one explain to me what are the na, nn and r parameters which are used as the input to the following two functions? Thanks much in advance. > From: Bernardo Rangel Tura >
2010 Jun 17
1
Asterisk SIP/IAX peers can't connect after Firewall change?
Hi all, I tried searching, so if this has already been discussed please point me in the right direction. On separate occasions I've seen cases where Asterisk boxes will be unable to register with each other via SIP or IAX2 when a Firewall is replaced. I'll describe two different cases. In both we have three offices connected via IPsec tunnels. Case 1: High Availability firewall
2008 Apr 01
0
PAMR package question: How to plot Estimated probabilities for the training data and test data
Hi, I have tried some time trying to figure out how to use pamr to plot multiclass Estimated probabilities for the training data and test data? Specifically, how to recreate the PAMR publication on PNAS with Tibshrani et al. The publication is as attached. The plot I want to do is Figure 5. I have downloaded the pamr package and the function which gives similar plot is pamr.plotcvprob
2009 Mar 02
1
Question about normalization to a set of internal standards
Hi, I have a question of the method as how to normalize the data sets according to a set of the internal measurements. For example, I have performed two batches of experiments contrasting two different conditions (positive versus negative conditions): one at a time. 1. each experiment, I measure signals of variable v1 to v100. I want to understand v1 to v100 change under these two contrasting