similar to: Globbing Files in R

Displaying 20 results from an estimated 700 matches similar to: "Globbing Files in R"

2008 Jun 16
4
Superimposing Line over Histogram in Density Plot
Hi, Currently I have a density plot generated with this snippet. Is there a way I can add a line curve on top of it? I mean in one figure __BEGIN__ myhist <- hist(x col="blue", main = "Density Plot", xlab = "Exp Level", ) __END__ - Gundala Viswanath Jakarta - Indonesia
2011 Mar 31
1
Assign Names of columns in data.frame dinamically
Hello List. I have many files of ECG, each one with 7 column and I need only the second column and the name of each ECG. I am doing this but althought I have various days trying this i haven't gotten, so I ask help with this, if somebody cans help me I'll be so thankfully. --------------------------------------------------------------------------------------------------------
2008 Jun 11
3
Finding Coordinate of Max/Min Value in a Data Frame
Hi, Suppose I have the following data frame. __BEGIN__ > library(MASS) > data(crabs) > crab.pca <- prcomp(crabs[,4:8],retx=TRUE) > crab.pca$rotation PC1 PC2 PC3 PC4 PC5 FL 0.2889810 0.3232500 -0.5071698 0.7342907 0.1248816 RW 0.1972824 0.8647159 0.4141356 -0.1483092 -0.1408623 CL 0.5993986 -0.1982263 -0.1753299 -0.1435941 -0.7416656 CW
2008 Aug 05
2
Iterating Named List
Hi all, I have the following named list: > print(y) $`200052_s_at` [1] -1066.975 -1063.893 -1062.815 -1062.121 -1059.004 $`200071_at` [1] -959.823 -953.980 -953.886 -948.781 -974.890 $`200084_at` [1] -1135.804 -1132.863 -1128.197 -1128.633 -1125.890 What I want to do is to iterate this name list and process its members. To do that I attempt the following code (but failed): __BEGIN__ ny
2009 Jan 09
3
Pack and Unpack Strings in R
Dear all, Does R has any function/package that can pack and unpack string into bit size? The reason I want to do this in R is that R has much more native statistical function than Perl. Yet the data I need to process is so large that it required me to compress it into smaller unit -> process it -> finally recover them back again into string with new information. In Perl the
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
2009 Jan 08
2
Faster Printing Alternatives to 'cat'
Dear all, I found that printing with 'cat' is very slow. For example in my machine this snippet __BEGIN__ # I need to resolve to use this type of loop. # because using write(), I need to create a matrix which # consumes so much memory. Note that "foo, bar, qux" object # is already very large (>2Gb) for ( s in 1:length(x) ) {
2008 Jun 23
2
Pairwise Partitioning of a Vector
Hi, How can I partitioned an example vector like this > print(myvector) [1] 30.9 60.1 70.0 73.0 75.0 83.9 93.1 97.6 98.8 113.9 into the following pairwise partition: PAIR1 part1 = 30.9 part2 = 60.1 70.0 73.0 75.0 83.9 93.1 97.6 98.8 113.9 PAIR2 part1 = 30.9 60.1 part2 = 70.0 73.0 75.0 83.9 93.1 97.6 98.8 113.9 .... PAIR9 part1 = 30.9
2008 Jun 12
1
Data.matrix fail to convert data.frame into matrix
Hi, With the following codes, I attempt to convert the data.frame into a matrix. However I notice that data.matrix function doesn't seem to work. __ BEGIN__ dat <- read.table("mydata", comment.char = "!" , na.strings = "null"); # Select n-genes by random sample # n = 1 nosamp <- 1 geneid <- sequence(nrow(dat)) geneid.samp <- sample(geneid,nosamp)
2005 Nov 27
2
'For each file in folder F do....'
Hello, I have 2700 text files in a folder and need to apply the same program/procedure to each individually. I'm trying to find how to code something like: For each file in <Folder> do {<Procedure>} is there an easy way to do this? other suggestions? I have tried to list all the files names in a vector e.g. >listfiles[1:10,1] 1 H:/Rtest/AXP.txt 2 H:/Rtest/BA.txt 3
2008 Jun 19
2
Create Matrix from Loop of Vectors, Sort It and Pick Top-K
Hi, I have the following dataset (simplified for example). __DATA__ 300.35 200.25 104.30 22.00 31.12 89.99 444.50 22.10 43.00 22.10 200.55 66.77 Now from that I wish to do the following: 1. Compute variance of each row 2. Pick top-2 row with highest variance 3. Store those selected rows for further processing To achieve this, I tried to: a) read the table and compute variance for each row,
2011 Oct 05
2
kriging shapefiles
Hi! Im new to R and I need to interpolate a shapefile using kriging. I've been able to plot/read the shapefile using the package maptools or rgdal. I've searched the internet for sample codes but most of the kriging codes that I've found done in R is done using txtfiles or CSVs.  An example could be of great help. Thanks. [[alternative HTML version deleted]]
2008 Aug 05
1
About Creating a List by Parsing Text
Hi all, I have the following data in which I want to parse and store them in a list __DATA__ > print(comp.ll) [1] "\tGene 11340 211952_at RANBP5 k= 1 LL= -970.692 " [2] "\tGene 11340 211952_at RANBP5 k= 2 LL= -965.35 " [3] "\tGene 11340 211952_at RANBP5 k= 3 LL= -963.669 " [4] "\tGene 12682 213301_x_at TRIM24 k= 1 LL= -948.527 "
2009 Mar 05
3
Connection Pooling on Rails 2.2.2 (Windows Vista)
Hi, I''m trying to setup rails 2.2.2 pool connections to MySQL by specifying the pool setting with 5 in database.yml but no hope.. It doesn''t work. My rails is running on webrick in the production mode and the webrick is launched by RadRails. Even though I send multiple requests to my app on rails at the same time, it seemed only one connection is shared ( pooled ). I also
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:
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",
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]
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 Apr 19
3
stupid regexp question
Hello, I have a stupid regexp question. I have a large data frame of strings. I would like to convert all occurences of : "W.m^{-2}" to "W/m2" I make the following test : gsub(glob2rx("W.m^{-2}"), "W/m2", "W.m^{-2}") but it does not seem to work. I don't know how to do it otherwise as I could never learn how to deal with the special
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',