similar to: Controlling widths in write.fwf()

Displaying 20 results from an estimated 1000 matches similar to: "Controlling widths in write.fwf()"

2009 Apr 20
7
Fitting linear models
I am not sure if this is an R-users question, but since most of you here are statisticians, I decided to give it a shot. I am using the lm() function in R to fit a dependent variable to a set of 3 to 5 independent variables. For this, I used the following commands: >model1<-lm(function=PBW~SO4+NO3+NH4) Coefficients: (Intercept) SO4 NO3 NH4 0.01323 0.01968
2009 Feb 03
3
Boxplots by variable
Dear R users, I have a matrix "final" which looks like this: final oSO4 oNO3 mSO4 mNO3 [1,] 3.3728 0.2110 1.9517421 1.01883602 [2,] 0.8249 0.0697 1.5970292 0.11368781 [3,] 0.2636 0.1004 0.6012445 0.24356332 [4,] 8.0072 0.3443 6.1016998 3.63207149 [5,] 13.5079 0.6593 12.4011068 1.55323386 [6,] 6.1293 0.1989 5.7620926 0.12884845 [7,] 0.6004 0.0661
2009 Feb 06
1
Tables in legend
I need to create a legend for a simple scatter plot in the following format. This is Blah1 number1 number2 This is Blah2 number3 number4 . . . This is Blah6 number11 number12 I looked up these help pages and found the following solution. lStr<-c(Blah1, Blah2,....Blah6, number 1, number2, ...number12) legend(x="topright",lStr,ncol=3) So this creates the tabular format I am
2012 Sep 14
1
Any way to get read.table.ffdf() (in the ff package) to pass colClasses or comment.char parameters through to read.fwf() ?
Hi everyone, my apologies if I'm overlooking something obvious in the documentation. I'm relatively inexperienced with the (awesome) ff package. My goal is to use the read.table.ffdf() function to call the read.fwf() function and pass through the colClasses and comment.char arguments. The code below shows exactly what doesn't work for me. If the colClasses and comment.char
2004 Nov 08
1
Possible bug in read.fwf (PR#7350)
Full_Name: Shigeru Mase Version: R 1.9.1 and 2.0.0 OS: Debian Linux Submission from: (NULL) (219.35.150.115) I tried to read the following text file "test.txt" with 5 lines using read.fwf() function: # comment 1 1234567 # comment 2 1 234567 # comment 3 12345 67 # comment 4 # comment 5 In R 1.9.1, I got the following result (since I have R 2.0.0 installed now I cannot reproduce
2004 Jul 10
1
read.table, read.fwf, and na.strings (PR#7075)
# Your mailer is set to "none" (default on Windows), # hence we cannot send the bug report directly from R. # Please copy the bug report (after finishing it) to # your favorite email program and send it to # # r-bugs@r-project.org # ###################################################### Is this intended behavior for the read.fwf(na.strings="-999")? I anticipated that
2010 Jun 05
1
Write.fwf works from Mac, throws different number of row error in Windows
Hello, I am having a problem with write.fwf in Windows. I wrote a code to ingest a number of text files with weather data in them, process them, and then output a text file with two parts: 1) a set of column names, 2) the processed data table. I wrote and tested the program on my Mac, and it worked fine. However, on the windows machine, where I intend the work to be done, when I run the
2005 Oct 21
1
read.fwf(...,header=TRUE,...) (PR#8236)
Full_Name: Giovanni Bonafe' Version: 2.2.0 OS: Linux Submission from: (NULL) (195.62.164.225) If the file "example.dat" is like this: aaa bbb ccc 3.4 1.2 5.6 4.6 10 32 667 343 1.7 With the older 1.9.1, as expected: > data<-read.fwf(file = "example.dat",widths=c(3,4,4),header=TRUE) > data aaa bbb ccc 1 3.4 1.2 5.6 2 4.6 10.0 32.0 3 667.0 343.0
2002 Jun 13
1
problem with read.fwf
Here is an example of the data I'm reading in using read.fwf: 5342.0 5450.4 0.9200 0.4506 34.7030 27.8411 37.1306 46.0034 0.0000 5438.0 5549.6 0.9300 0.4477-34.7280 27.8616 37.1506 46.0234 0.0000 And the commands I'm using to read it in: widths <- c(7,7,8,8,8,8,8,8,8) filedata <- read.fwf(fileopen, widths,sep="",dec=".") The problem is with
2002 Dec 12
1
Read FWF, problem and solution?
Running R 1.6.1 Linux Slackware 8.1 233MHZ AMD-K6 96MB RAM Using read.fwf, I tried to open a fixed-width file that of about 4 MB residing in the working directory, using the command below: dat<-read.fwf("sc01aai.dat", widths=fields$length) where fields$lengths is a vector of column widths, 28 to be exact. The data are a mix of character, text, and factor variables. R started
2005 Oct 20
4
read.fwf doesn't work with header = TRUE (PR#8226)
Full_Name: Emmanuel Paradis Version: 2.1.1 OS: Linux Submission from: (NULL) (193.49.41.105) read.fwf(..., header = TRUE) does not work properly since: 1/ the original header is printed on the console and not in FILE; 2/ the different 'parts' of the header should be separated with tabs to work with the call to read.table. Here is a suggested fix for src/library/utils/R/read.fwf.R:
2012 Mar 10
1
Subsetting a data.frame -> Read in with FWF format from .DAT file
Hi there, I am having trouble subsetting a data frame by a conditional via one column (of many). I read the file into R through "read.fwf," where I specified column widths. Original data is .DAT. I then utilized "names" function to read in column headings. For one column, PRVDR_NUM, I wish to further amend the entire data set, but only have PRVDR_NUM == 050108. This is
2010 Nov 12
1
issue with ... in write.fwf in gdata
Dear R-list This is just message to inform that the there is an issue with write.fwf in the gdata library (from version 2.5.0 on). It does not seem to accept further arguments to write.table like "eol" as the help file indicates as it stops when executing tmp <- lapply(x, format.info, ...). Great package though - I use it a lot except for this function :) See example below. >
2009 Apr 22
2
Exporting objects plotted with plot3d() - rgl package
Dear all, Can anybody tell me how to export a 3d figure made with the plot3d function? I'm careless about whether it's still interactive or not in another format, as long I can get it out of R. Thanks! Alejandro Gonz?lez Departamento de Biodiversidad y Conservaci?n Real Jard?n Bot?nico Consejo Superior de Investigaciones Cient?ficas Claudio Moyano, 1 28014 Madrid, Spain Tel +0034
2006 Oct 30
4
read.fwf and header
Hi! I have data (also in attached file) in the following form: num1 num2 num3 int1 fac1 fac2 cha1 cha2 Date POSIXt 1 1 f q 1900-01-01 1900-01-01 01:01:01 2 1.0 1316666.5 2 a g r z 1900-01-01 01:01:01 3 1.5 1188830.5 3 b h s y 1900-01-01 1900-01-01 01:01:01 4 2.0 1271846.3 4 c i t x 1900-01-01 1900-01-01 01:01:01 5 2.5 829737.4 d j u w 1900-01-01 6 3.0
2006 Oct 30
4
read.fwf and header
Hi! I have data (also in attached file) in the following form: num1 num2 num3 int1 fac1 fac2 cha1 cha2 Date POSIXt 1 1 f q 1900-01-01 1900-01-01 01:01:01 2 1.0 1316666.5 2 a g r z 1900-01-01 01:01:01 3 1.5 1188830.5 3 b h s y 1900-01-01 1900-01-01 01:01:01 4 2.0 1271846.3 4 c i t x 1900-01-01 1900-01-01 01:01:01 5 2.5 829737.4 d j u w 1900-01-01 6 3.0
2004 Sep 15
3
Read.fwf
Dear List I have a fixed width file with variables of varying width. The help is pretty transparent for this feature, but I can't seem to figure out how I can make effective use of the package with my data. In my dataset, the first 80 columns are of width 1 followed by other variables with width larger than 1. I think the correct way to do this, by brute force, would be >
2007 Nov 08
1
Bug (?) in read.fwf
Hi, I'm trying to use read.fwf temp = read.fwf ("Raw data.txt", widths = c (11, 21, 10, rep (16, 6)) ,skip = 2, n = 2, stringsAsFactors = FALSE, strip.white = TRUE) but no matter what I do the strings are turned into factors. I believe it's the "n=2" parameter that causes the problem as it seems to work without this. Am I missing something? Thanks in advance,
2002 May 03
3
skipping columns with read.fwf?
I have a file in fwf. It is rather large, about 40,000 rows and 40 variables (columns). I only need about 10 variables form the data set for the analysis at hand. Unfortunately, these 10 variables are not contiguous in the file, for example, the first is position 1-8, the next position 25-27, then 40. Is there a way to read the selected varaibles that I need without reading in the entire data
2006 Sep 15
1
how to change perimissions across a directory tree
Hello all, I have samba 3 with a share named shareA using these settings: [shareA] comment = Directory Amministrazione path = /col/shareA browseable = no valid users = @amm force group = amm public = no writable = yes create mask = 0770 directory mask = 0770 printable = no where user1, user2, user3 and user4 belong to "amm" group. I would like to