similar to: Regular Expression

Displaying 20 results from an estimated 700 matches similar to: "Regular Expression"

2010 Aug 10
6
How to invert a list ?
Dear list, I have a list, as follows : a <- 5 names(a) <- "a" b <- 9 names(b) <- "b" c <- 15 names(c) <- "c" x <- list("i" = a, "j" = b, "j" = c) I want to invert the list, like this : $a i 5 $b j k 9 15 I do not find a clean solution. Could anyone give me elegant ideas ? Thanks in advance, Carlos
2010 Nov 08
5
How to plot a normal distribution curve and a shaded tail with alpha?
I want to create a graph to express the idea of the area under a pdf curve, like http://r.789695.n4.nabble.com/file/n3032194/w7295e04.jpg Thank you for any help. ----- A R learner. -- View this message in context: http://r.789695.n4.nabble.com/How-to-plot-a-normal-distribution-curve-and-a-shaded-tail-with-alpha-tp3032194p3032194.html Sent from the R help mailing list archive at Nabble.com.
2010 Jul 12
1
problem with comparisons for vectors
I don't know the real reason, but help("==") gives some clues. For numerical and complex values, remember == and != do not allow for the finite representation of fractions, nor for rounding error. Using all.equal with identical is almost always preferable. See the examples. x1 <- 0.5 - 0.3 x2 <- 0.3 - 0.1 x1 == x2 # FALSE on most machines
2010 Aug 16
4
print numbers
Hi, When I plot, the axis ticks are printed as "50.00 25.00 10.00 1.00 0.05 0.01", is there any way to print them as "50 25 10 1 0.05 0.01" instead? Thanks John
2010 Aug 02
1
Convert an expression to a function
Hi John, Here is my code practicing. Please give me some advises. Thank you. Wu Gong # Extract the function string f.str <- sub("y~","",exprtext) # Get arglist from the text sp1 <- paste("\\",c(getGroupMembers(Arith),"(",")"),sep="") sp2 <- getGroupMembers(Math) sps <-
2010 Jun 03
5
string handling
I have a data.frame as the following: var1 var2 9G/G09 abd89C/T90 10A/T9 32C/C 90G/G A/A . . . . . . 10T/C 00G/G90 What I want is to get the letters which are on the left and right of '/'. for example, for "9G/G09", I only want "G", "G", and for "abd89C/T90", I only want "C" and
2013 Jul 23
1
Heat Map for species - code from Numerical Ecology with R
Hello, I am relatively new to R and I am working through the code that is provided in the book Numerical Ecology with R and I have run across an error message that I can't seem to figure out. I am using the vegan, ade4, gclus and cluster packages. The code is as follows: # Ordered community table # Species are ordered by their weighted averages on site scores or <- vegemite(spe,
2000 Jul 21
1
confint() error
Dear all, I have run the confint() function according to below and I get the following error message: > confint(stepAIC.glm.spe.var.konn2.abund, level=0.95) Waiting for profiling to be done... Error: missing value where logical needed In addition: Warning message: NaNs produced in: sqrt((fm$deviance - OriginalDeviance)/DispersionParameter) or > confint(stepAIC.glm.spe.var.konn2.abund,
2008 Oct 20
1
Calculate SPE in PLS package
Dear list, I want to calculate SPE (squared prediction error) in x-space, can someone help? Here are my codes: fit.pls<- plsr(Y~X,data=DAT,ncomp=3,scale=T,method='oscorespls',validation="CV",x= T) actual<-fit.pls$model$X pred<-fit.pls$scores %*% t(fit.pls$loadings) SPE.x<-rowSums((actual-pred)^2) Am I missing something here? Thanks in advance. Stella Sim
2009 Oct 19
1
updating columns using other column as reference
Dear R-gurus, Just supose I have a dara.frame that looks like myDF<-read.table(stdin(),head=T,sep=",") codID,namesp,k1,k2,k3,k4 1,spA,2,5,6,3 2,spB,4,5,4,6 3,spC,2,1,5,6 4,spC,5,4,3,2 5,spD,1,2,3,4 6,spE,2,4,3,1 I need to update the columns k1-k4 with the namesp, but considering the math between Kx and codID. My desired output must looks like: codID,namesp,k1,k2,k3,k4
2000 Aug 14
2
conf. int. for lm() and Up-arrow
Dear all, Is there any function for calculating confidence limits for coefficients in an lm() object? I know of the confint() function in the MASS library working very well on my binomial GLMs and I have tried it (using glm () , family=gaussian) but it gives NAs according to below. Does the confint() function not accept gaussian GLMs? Could there be convergence problems in the GLM? Note the
2012 Jul 27
1
labeling loading vectors in vegan
Hello, I am using vegan to do an NMDS plot and I would like to suppress the labels for the loading vectors. Is this possible? Alternatively, how can I avoid overlap? Many thanks for the help. Example code: #perform NMDS using metaMDS() function spe.nmds<-metaMDS(data, distance='bray',k=2 , engine = "isoMDS", autotransform=F, trymax=1000) #calculate the loading (i.e.,
2010 Nov 17
2
How to catch warnings
Hello when my code executes I receive the message that were some warnings. I want to catch warning messages at run time so to print some local variables and try to understand why this warning happens. I searched on internet and I tried withCallingHandlers( which seems to work but as I used Rkward the result is awful. I get a prompt to copy paste a value only while at the same time my background
2005 Mar 19
3
Asterisk and Cisco AS53xx/54xx Access Server Platform
Hello, I've got an ISDN PRI circuit terminating in a Cisco AS5350, which in turn is talking to an Asterisk server via SIP for call origination and termination. Seems simple enough, and it works for the most part, but: 1) Caller ID name data comes in on the PRI, but doesn't appear to get handed off to the Asterisk server via SIP, at least not in any format that Asterisk
2011 Feb 10
2
Rioja package, creating transfer function, WA, "Error in FUN"
Hi, I am a new R user and am trying to construct a palaeoenvironmental transfer function (weighted averaging method) using the package rioja. I've managed to insert the two matrices (the species abundance and the environmental data) and have assigned them to the y and x values respectively. When I try and enter the 'WA' function though, I get an 'Error in FUN' message (see
2005 Jan 11
1
Standard error for the area under a smoothed ROC curve?
Hello, I am making some use of ROC curve analysis. I find much help on the mailing list, and I have used the Area Under the Curve (AUC) functions from the ROC function in the bioconductor project... http://www.bioconductor.org/repository/release1.5/package/Source/ ROC_1.0.13.tar.gz However, I read here... http://www.medcalc.be/manual/mpage06-13b.php "The 95% confidence interval for
2010 Sep 23
3
accumulation curves
Hi, I am trying to fit a logarithmic trendline to a scatterplot of a species accumulation curve. I've tried abline, lines, curve and scatter.smooth but none of these work. Can anyone help please, Kyran
2003 Sep 22
1
creates directory that can't be deleted (PR#4246)
Full_Name: Xiaobao Wang Version: R 1.7.1 OS: Windows XP Submission from: (NULL) (24.45.25.102) accidentally done the following: rpt.dir <- paste("c:/report/testR","bestsub",spe="/") dir.create(rpt.dir) (spe should be sep). Now the directory "c:/report/testR bestsub " cannot be removed. I tried to remove it from Windows Explorer and got the message
2011 Jan 11
3
Generation of Normal Random Numbers
Dear R helpers I have a data frame as given below df = data.frame(A = c(776,827,836,995,855,1026,1203,1363,965,1195),                        B = c(806,953,1049,1056,1243,764,1148,1162,948,1154),                        C = c(959,1155,1193,1163,863,1070,1087,877,1132,944),                        D = c(906,760,978,1170,1009,883,1007,960,828,113)) # Actually the real data has number of vectors and
2006 Aug 14
1
Lattice barchart with different fill pattern
Dear list, I am new to lattice plots. I want to make a barchart with 10 and more levels. I need to use a grey scale for printing purposes. The problem is that with 10 or more levels in factors it is very difficult to distinguish each level in the plot and legend, since the greys are very similar (some levels have value of zero and don't appear). Here is an example of my problem: df <-