similar to: help with regexp

Displaying 20 results from an estimated 1000 matches similar to: "help with regexp"

2012 Mar 28
2
lapply and paste
I have a list of suffixes I want to turn into file names with extensions. suff<- c("C1", "C2", "C3") paste("filename_", suff[[1]], ".ext", sep="") [1] "filename_C1.ext" How do I use lapply() on that call to paste()? What's the right way to do this: filenames <- lapply(suff, paste, ...) ? Can I have lapply()
2011 Dec 09
2
unexpected behaviour of sub() / usage of regexp
Dear R users, the way I understand the documentation of sub() and regexp the following code: sub('[[:digit:]]{1,2}', '', '9ewww') ... should yield: 'ewww' It returns, however: 'www' Why is this the case? My code should just substitute 1 (minimum) or up to 2 (maximum) digits, i.e. numbers and not the 'e' in the string. Do I misinterpret
2011 May 05
3
Alter a line in a file.
Hi all R users Ive got a file that contains diffrent settings in the manor of: setting1="value1" setting2="value2" setting3="value3" setting4="value4" . . . What I want to do is open the file and change the value of a specific setting like wanna change setting4="value4" -> setting4="value5" and then save the file again.
2010 Jan 22
1
[LLVMdev] debugging a pass for LTO
Thank you very much for your suggestions. That's very helpful. However, since I'm trying to compile several somewhat large projects, I assume generating bitcode for each single file and linking them together might be painful (I don't want to modify too much the project makefiles). So I hope my pass can be used just with simple compilation command like "llvm-gcc
2008 Dec 26
2
about randomForest
hello, I want to use randomForest to classify a matrix which is 331030?42,the last column is class signal.I use ? Memebers.rf<-randomForest(class~.,data=Memebers,proximity=TRUE,mtry=6,ntree=200) which told me" the error is matrix(0,n,n) set too elements" then I use: Memebers.rf<-randomForest(class~.,data=Memebers,importance=TRUE,proximity=TRUE) which told me"the error is
2010 Dec 16
5
test whether all elements of a vector are identical
Dear list, this might be an easy one, but I could figure out a solution (or how to google the right term). Is there any way to test whether all elements of a vector are identical? For numeric vectors I would use sum(diff(vector)==0)==0 but I have character vectors. Any Ideas? Cheers Jannis
2011 Apr 27
3
setting options only inside functions
Dear list members, is it possible to set some options only inside a function so that the original options are restored once the function is finished or aborted due to an error? Until now I do something like: dummy=function() { old.options=options(error=dummy1()) .... options(old.options) } This works for most cases but when the function terminates because of an error and its last
2013 Apr 08
4
checkUsage from codetools shows errors when function uses functions from loaded packages
Dear list members, I frequently program small scripts and wrap them into functions to be able to check them with checkUsage. In case these functions (loaded via source or copy pasted to the R console) use functions from other packages, I get this error: no visible global function definition for ?xxxxxxx? For example: test = function() { require(plotrix) color.legend() }
2011 Jan 12
2
RNetCDF: retrieving variable names and units
Dear List, does anybody has experience with the RNetCDF package? I manage to open a connection and copy data from a ncdf file but would need a way to automatically retrieve variable names (ideally all of them from one file) and units from the file. Any ideas? Jannis
2010 May 18
4
scaling with relative units in plots or retrieving axes limits in plots
Dears, a way to define x and y positions in plots in relative numbers (e.g in fractions between 0 and 1 referring to relative positions inside the plot region) would really help me. One example I would need this to would be to add text via text() to a plot always at a defined spot, e.g the upper left corner. Until now I always determined maximum x and y values and used those, but defining
2005 Mar 09
3
[LLVMdev] new llvm-testresults mailing list
Hi All, Do to popular request, I just set up a new mailing list to capture the nightly tester output from the various testers running 'round the world. The new list is available here: http://mail.cs.uiuc.edu/mailman/listinfo/llvm-testresults If you're running a nightly tester, please update your crontab to send mail to the llvm-testresults at cs.uiuc.edu list (potentially in addition
2004 Sep 05
3
[LLVMdev] POST MORTEM: llvm-test changes
Okay, I'll have to fix NightlyTest.pl not to use shell script syntax that isn't universal. Look for a commit soon. Reid. On Sun, 2004-09-05 at 13:31, Vladimir Merzliakov wrote: > > Bash 2.05b on Linux handles this fine. I was asking what > > your "default" system shell is on FreeBSD. Probably /bin/sh, right? > > Perhaps you can: > > > >
2006 Aug 03
4
Map a resource that is a join model
How should you map resources that are join models like Memberships? Lets say have you have Members and Groups that are joined through Memberships. map.resources :members do |members| members.resources :groups do |groups| groups.resources :memberships end end This doesn''t seem right. It would be nice to access all members, groups, and memberships at /members,
2004 Sep 06
0
[LLVMdev] POST MORTEM: llvm-test changes
After fixing nested () problem manual run nighttest finished successfully with one remarkable logged problem: INITIALIZED CVS Root = :pserver:anon at llvm-cvs.cs.uiuc.edu:2401/var/cvs/llvm BuildDir = /home/wanderer/pkg/build/llvm/night/build WebDir = /home/wanderer/pkg/build/llvm/night/testresults-X86-FreeBSD Prefix = /home/wanderer/pkg/build/llvm/night/testresults-X86-FreeBSD/2004-09-06
2007 Dec 28
2
[LLVMdev] llvm-gcc testresults?
How do the llvm-gcc developers handle regression testing? Are there regular postings of the make check results for llvm-gcc-4.2 such as on the gcc-testresults mailing list? If not, it might be a good idea if linux and darwin workstations could be found to dedicate as regression test machines and a llvm-gcc-testresults mailing list created for those results. That would be extremely useful in
2008 Jan 31
2
[LLVMdev] [llvm-testresults] OldGrawp-O0-PIC i386 nightly tester results
On Jan 30, 2008, at 9:12 PM, Apache wrote: > http://llvm.org/nightlytest/test.php?machine=231&night=4754 > Name: il0102a-dhcp80.apple.com > Nickname: OldGrawp-O0-PIC > Buildstatus: OK > > New Test Passes: > test/CFrontend/2008-01-28-PragmaMark.c [DEJAGNU] > > > New Test Failures: > Benchmarks/Shootout-C++/except [LLC compile, ] >
2009 Dec 01
4
median for time data
Hi everybody How do I do to calculate the median and average of a colum of time data like this: "8:50:10". I also need to plot the time difference between two colums Thanks a lot -- View this message in context: http://n4.nabble.com/median-for-time-data-tp932287p932287.html Sent from the R help mailing list archive at Nabble.com.
2011 Aug 01
3
General indexing in multidimensional arrays
Dear R community, I have a general question regarding indexing in multidiemensional arrays. Imagine I have a three dimensional array and I only want to extract on vector along a single dimension from it: data <- array(rnorm(64),dim=c(4,4,4)) result <- data[1,1,] If I want to extract more than one of these vectors, it would now really help me to supply a logical matrix of the
2011 Jan 20
2
Procuct of a sequence or vector
Dear list, is there a function in R that returns the product of a vector? E.g. if the vector is c(1,2,3,4) it should return 1*2*3*4=24 Cheers Jannis
2012 Nov 18
2
list.files, recursively
Dear R developers, as far as I understand the manual of list.files(), there is only a way to exclude directories from the returned vector if you use list.files recursively. In non recursive mode, there seems to be no way of excluding directories (the include dirs argument does not seem to have any effect). Would it not be more intuitive and practical to allow the switching off of directory