similar to: stupid regexp question

Displaying 20 results from an estimated 900 matches similar to: "stupid regexp question"

2009 Oct 27
4
automatically adjusting axis limits
Dear R users, I am a newbie. Just switched from MATLAB. So thanks a lot for your patience. I have 50000 spectra collected in field. Each spectra has two columns : Wavelength (56) and the actual measurement. Each measurement came in a different .txt file on disk (50000 files in total). I wrote a script that reads every spectra in a for loop and constructs two variables : Wavelength (56) and
2009 Dec 10
2
plotting with varying dot sizes
Dear all, I am trying to plot on a spatial map the punctual measurements of the data located in the file (https://opengeo.metu.edu.tr/test.csv). I'd like to have the dots in some way proportional to the magnitudes of the measurements. I have difficulties with the code given below: The dot sizes do not vary not proportionally when varying the coefficient ("0.725"). It either plots
2010 Nov 10
1
log-transformed linear regression
Hello, I have a basic question. Sorry if it is so evident.... I have the following data file : http://ekumen.homelinux.net/mydata.txt I need to model Y~X-1 (simple linear regression through the origin) with these data : load(file="mydata.txt") X=k[,1] Y=k[,2] aa=lm(Y~X-1) dev.new() plot(X,Y,log="xy") abline(aa,untf=T) abline(b=0.0235, a=0,col="red",untf=T)
2015 Oct 04
2
Conditional importFrom (roxygen?)
Folks: I am getting a build failure when I: #' @importFrom utils shortPathName which roxygenizes it to the NAMESPACE. I suspect this is because this particular function is Windows-only, but I'm a bit confused how I should "properly" importFrom a function like this so it doesn't cause a build failure, but I don't get a note in my R CMD CHECK if I DON'T have it:
2006 Feb 20
2
glob2rx function not working
Dear R users, Inspired by previous list discussion of the glob2rxc function, I am attempting to create a new vector called TOTAL by summing all vectors whose names begin with ABC: TOTAL = sum(list = ls(pattern = glob2rx("ABC*"))) I'm running R 2.2.1 on Windows XP. Can anyone say what I'm missing? Thank you, Mark
2013 Mar 14
2
Grep with wildcards across multiple columns
I have a fairly large data set with six variables set up like the following dummy: # Create fake data df <- data.frame(code = c(rep(1001, 8), rep(1002, 8)), year = rep(c(rep(2011, 4), rep(2012, 4)), 2), fund = rep(c("10E", "10E", "10E", "27E"), 4), func = rep(c("110000",
2007 Oct 15
2
Wildcards
Care to explain how i can use a wildcard expression to "source" all files ending with .R in a subdirectory ? I've tried something like this 'source(glob2rx("*.R"))' without success. Thank you -- View this message in context: http://www.nabble.com/Wildcards-tf4627981.html#a13214214 Sent from the R help mailing list archive at Nabble.com.
2010 Nov 16
2
Pass character vector to function argument
A bit embarrassed to post this seemingly trivial question, but I can't find anything in the archive that's quite relevant: a1=1 a2=2 obs=objects(pattern=glob2rx("a?")) I want to utilize 'obs' as a function argument to produce something like: sum(a1,a2) Obviously, sum(obs) doesn't work, but I've tried variations of 'eval', 'parse',
2008 Jun 03
3
Rpart and case weights: working with functions
I can't get rpart accept case weights defined inside a function. It keeps using the copy defined in the "global" environment (if they exists) instead of the function-defined ones. Here is what I do: test.function <- function (formula, data) { weights <- rep(.1, 100) rpart(formula, data, weights) } test.function(x~y, data) And I get an error: > Error in
2008 Apr 24
2
changing format of a float value to another
hello How can I change a vector's float value from ("1.085714e-01") format to a simpler format (like 0.1xxx). regards -- Ahmet Temiz Jeo. M?h. Afet ??leri Gen. Md.l??? Deprem Ar. D. Ahmet Temiz Geo. Eng. General Dir. of Disaster Affairs -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.
2015 Aug 02
3
ayuda con análisis de supervivencia
Hola a todos, -Estoy estudiando el efecto de dos genotipos (~tratamientos) en la aparición de síndrome metabólico (MetS) con datos longitudinales recogidos a tiempo 0,7,10,15,20 y 25 años. -He hecho un dataframe con las siguientes variables MetS: Síndrome Metabólico (Si=1,No=0) bmi: Indice de masa corporal (IMC) cuando se produce la conversión a MetS+ . Para los que permancen MetS-, esta variable
2003 Jul 21
3
R commands from a text file ?
Hello I was wondering if it was possible to enter R commands from an external text file. If it is possible, it will be easy for repetetive tasks. Does anyone have an idea ? thanks in advance Ahmet Temiz TURKEY ______________________________________ ______________________________________ The views and opinions expressed in this e-mail message are ...{{dropped}}
2007 Apr 24
2
problem in tapply command
hello when I entered following command, I got NA values for some catagories. > tapply(slp_jeo2$slp,slp_jeo2$jeo,mean ) 999 Ca Cka DCy Jh JKi Kk 14.06665 NA 14.60445 NA NA NA NA NA KTa KTac Ku Kua Kus Ky Kyk ODe NA NA NA NA NA NA
2008 Oct 23
3
xy.coords in text
Hello, I want to add text annotation about correlation on "pairs" plots. I found that I could pass a function to the "panel" argument of pairs : panel.annot <- function(x, y, ...) { points(x, y, ...) c <- cor.test(x, y) legend("topleft", legend=substitute(rho == r, list(r=sprintf("%.2f", c$estimate))), bty="n") } And then :
2011 Jan 21
3
How to find data that includes certain values
I am trying to return an index for a data set by searching using filenames. The name may be ANG_AUT.N.0734C70411A-1_1sA_0734C70411A.fasta, but i'd just like to search it using the term "0734C70411" as the file may be 0734C70411A or 0734C70411C or 0734C70411D Any way to do this other than doing something like this. where 0734C70411A is part of matrix list[,8]
2023 Jan 14
2
Removing variables from data frame with a wile card
Thanks to all. Very helpful. Steven from iPhone > On Jan 14, 2023, at 3:08 PM, Andrew Simmons <akwsimmo at gmail.com> wrote: > > ?You'll want to use grep() or grepl(). By default, grep() uses extended > regular expressions to find matches, but you can also use perl regular > expressions and globbing (after converting to a regular expression). > For example: >
2008 Dec 21
3
Globbing Files in R
Dear all, For example I want to process set of files. Typically Perl's idiom would be: __BEGIN__ @files = glob("/mydir/*.txt"); foreach my $file (@files) { # process the file } __END__ What's the R's way to do that? - Gundala Viswanath Jakarta - Indonesia
2012 Nov 14
1
R wildcards, sapply and as.factor
I want to change the type to factor of all variables in a data frame whose names match a certain pattern. So here I am trying to change the type to factor of all variables whose name begins with?namestub?in the dataframe?df. attach(df)sapply(grep(glob2rx("namestub*"),names(df)),as.factor) But this doesn't work since >levels(df$namestub1)NULL
2009 Dec 02
1
category with respect to category
hello I have two categorical data and want to visualise them to see their changes? Which graph do you recommend me for category with respect to category ? kind regards Ahmet Temiz -- Open WebMail Project (http://openwebmail.org) -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.
2003 Oct 31
2
Therotical basis of Kriging
hello I want to know about therotical basis of Kriging in elemantary level. I will appreciate if anyone sends me address,link,e-documents, etc.. kind regards -- Ahmet Temiz General Directory of Disaster Affairs Ankara TURKEY ______________________________________ Inflex - installed on mailserver for domain @deprem.gov.tr Queries to: postmaster at deprem.gov.tr