search for: tempxx

Displaying 20 results from an estimated 33 matches for "tempxx".

Did you mean: temp1x
2007 May 24
2
object getConnection
Hi, I use the functions socketConnections() and getConnection() which are working fine. Thanks to the authors. After opening nicely some socketConnection, getConnection(3) returns something like : description class mode text opened can read can write "->127.0.0.1:7496" "socket" "wb" "binary" "opened" "yes"
2009 May 09
5
Reading large files quickly
I'm finding that readLines() and read.fwf() take nearly two hours to work through a 3.5 GB file, even when reading in large (100 MB) chunks. The unix command wc by contrast processes the same file in three minutes. Is there a faster way to read files in R? Thanks!
2008 Feb 06
4
inserting text lines in a dat frame
Hi Jim I am trying to prepare a bed file to load as accustom track on the UCSC genome browser. I have a data frame that looks like the one below. > x V1 V2 V3 1 chr1 11255 55 2 chr1 11320 29 3 chr1 11400 45 4 chr2 21680 35 5 chr2 21750 84 6 chr2 21820 29 7 chr2 31890 46 8 chr3 32100 29 9 chr3 52380 29 10 chr3 66450 46 I would like to insert the following 4 lines at the beginning:
2004 Oct 07
3
Read.Table Reading a Text file
Dear R users and Helpers I am beginner with using R and interested in carrying out certain task for my statistical research. I am reading data for a text file, which could contain data in following pattern x y 8 10 11 14 16 16 18 15 6 20 4 4 20 18 As per the example I have two columns and 7 rows of data in each. However is real life data situation I may not know how many columns are present
2008 Jul 03
1
Migrating from S-Plus to R - Exporting Tables
Does something like this get you close: x <- list() keys <- LETTERS[1:6] # create for (i in keys){ x[[i]] <- data.frame(a=1:5, b=1:5, c=1:5) } # output output <- file('tempxx.txt', 'w') for (i in keys){ write.table(i, row.names=FALSE, col.names=FALSE, file=output, quote=FALSE) write.table(x[[i]], file=output, quote=FALSE) } close(output) On Wed, Jul 2, 2008 at 12:15 PM, Leandro Marino <leandro at cesgranrio.org.br> wrote: > I am puting ag...
2007 Aug 28
3
data formatting: from rows to columns
Hi All, I have some data I need to write as a file from R to use in a different program. My data comes as a numeric matrix of n rows and 2 colums, I need to transform each row as a two rows 1 col output, and separate the output of each row with a blanck line. Foe instance I need to go from this: V2 V3 27 2032567 19 28 2035482 19 126 2472826 19 132 2473320 19 136 2035480 135
2004 Oct 08
1
reading partial file content
...Reading a Text file > > > > James > Thank you for response. I am working on treatment for missing > data for both bivariate and multivariate normal data. Coming back to > example. My problem was that once we do execute this command > x.1 <- read.table('/tempxx.txt', fill=T) > > > How can access the particular column say X8 and all it's values so that I > could assign some other operations on them. > Because if I say > print.default(x.1) > > the result.. > > V1 V2 > 1 X y > 2 8 10 > 3 11 1...
2006 Jan 28
1
Regex question
Dear R useRs, is there any simple, build in function to match specific regular expression in data file and write it to a vector. I have the following text file: *NEW RECORD *ID-001 *AB-text *NEW RECORD *ID-002 *AB-text etc. Now I have to match all ID fields and print them to a vector: 001 002 etc. I know that this is very simple with Perl or R-Perl interface, but if possible, I want to do
2008 Feb 25
1
Graph Axis
Hi I have data of exchange rates and time, and am trying to draw a graph that will show the rates on the y axis and dates on the x axis. I am using the following code: plot(rate, type='l', xlab='Date', ylab='Rate', main='? to Euro rate over 5 years')This gives me the graph I want although I want to display the dates on the x axis, even if its just 2002,
2009 May 26
1
Finding and removing non-printable ascii characters in a file
Hi! I'm completely confusing myself attempting to solve this one. Is there a simple way of removing particular ASCII characters from a CSV file using R. Hopefully something simpler and faster than cycling through each individual character and comparing them to a list of characters to remove then deleting as necessary. As always, any help would be appreciated. Thanks! Dan [[alternative
2007 Jun 09
1
write.table: last line should differ from usual eol
Dear R-Team, I have a problem with writing an array to (for example) a .txt-file. Because of the .txt-file must be read from another programm (OPL ILOG), the syntax of the output must be from a special form: name_of_the_object = [ [1,2, ... ], [1,...], ... ]; I think it's easier to understand with a small example: X<-array(1:4,c(2,2)) should be written as: X = [[1,3],
2008 Feb 14
1
write output in a custom format
Hi, I need to create a text file in the following format, > 1 100.0 0 > 0 0 > 1 1 > 0 0 > 1 1 > # > 1 100.0 0 > 0 0 > 0 1 > 1 0 > 1 1 ... where # is part of the format and not a R comment. Each block (delimited by #) consists of a first line with three values, call it dose, and a list of (x,y) coordinates which are a matrix or data.frame, >
2010 May 31
5
read in data file into R
Hi I'm trying to read a data file with output from another program (admb) into R for further analysis. However I'm not very successfull. The file extension for the data file is file.rep but it also doesn't help when I change it to file.txt I have two problems/questions: 1. The file is a single line of n values separated by a single space tab each. These values represent a time
2010 Feb 02
2
using rbind in a for loop
*Dear R users, *I'm facing a trivial problem but I cannot solve it. My question is: I want to make data set like this. > i_lon1 i_lat1 i_lon2 i_lat2 i_lon3 i_lat3 i_lon4 i_lat4 > i+1_lon1 i+1_lat1 i+1_lon2 i+1_lat2 i+1_lon3 i+1_lat3 i+1_lon4 i+1_lat4 > i+2_lon1 i+2_lat1 i+2_lon2 i+2_lat2 i+2_lon3 i+2_lat3 i+2_lon4 i+2_lat4 . . . > i+5_lon1 i+5_lat1 i+5_lon2 i+5_lat2 i+5_lon3
2008 Jul 02
1
Insert text in data.frame
Dear R-helper, I wonder if anyone can help me. I am trying to convert a dataset to a format recognizable by a software onboard a research vessel but I am having problems with some steps. I have a data frame as follows: Conc Lat Lon Depth Point0000 56.25 -5.65 70 Point0001 56.55 -5.35 85 Point0002 56.25 -5.65 65 Point0003 56.37
2006 Nov 07
1
Help on processing an in-house apps timer file
Hi, Our in-house AS400 based application produce a timer file as follows: TranName,Date Time, TimeA,A+B, TimeB MAC00029,20061027 112500.030,703,703,0 MAC00029,20061027 112500.342,703,719,16 MAC00056,20061027 112500.920,484,500,16 MAC00029,20061027 112501.186,812,812,0 MAC00029,20061027 112502.092,672,672,0 MAC00029,20061027 112502.264,687,687,0 MAC00056,20061027 112503.264,453,453,0
2008 Jul 23
1
Q re iterating a process and appending results to output file
Greetings. This is very basic but we can't figure it out. The following simple code counts how many values land in the "tail" (below a quantile) of a standardized normal distribution of random numbers. First two commands are inputs: > c <-0.05 > i <-2500 Second two commands are formulas I want to repeat many times (sort of like an Excel/VBA macro) using those same
2009 Jul 08
2
R Help Question
Hi, I am currently working on reading large files into R. My files are text documents with four columns and around 10 million lines. Each line is set up as: string|integer|string|integer I have been trying to use read.table to read in the file, but I think I am reading too much into memory and the application quits. I want to be able to analyze the entire text document at once. I have thought
2008 Nov 26
2
Very slow: using double apply and cor.test to compute correlation p.values for 2 matrices
My two matrices are roughly the sizes of m1 and m2. I tried using two apply and cor.test to compute the correlation p.values. More than an hour, and the codes are still running. Please help to make it more efficient. m1 <- matrix(rnorm(100000), ncol=100) m2 <- matrix(rnorm(10000000), ncol=100) cor.pvalues <- apply(m1, 1, function(x) { apply(m2, 1, function(y) { cor.test(x,y)$p.value
2009 Aug 03
1
selectively altering variable value
Hello, I have run an eye-tracking experiment for which I now like to analyse the saccades. Participants looked from a fixation cross (ia = 5) to the target area (ia = 4) in following example of a data frame. ia = 9 stands for everything else. A saccade is indicated by saccade = 1. Sometimes the saccade just ends before the target area (see below). This is due to the parameters that determine a