similar to: write fixed format

Displaying 20 results from an estimated 6000 matches similar to: "write fixed format"

2006 May 19
1
Writing to a file with fixed precision
Dear R users; A follow-up question regarding writing to a file with fixed precision: Assuming for each column of x, I would like to have a different format, then I modify the code as: x.fmt <- apply(x, 1, function(x) sprintf("%.14f %.10f %2.5f", x)) where three different formats are %.14f %.10f %2.5f. The error message I got is "Error in sprintf(fmt, ...) : too few
2006 May 16
2
split the data.frame
Dear R folks: I wonder anyone has a elegent way of doing what I need to do. I have a data frame called with four columns: V1, V2, A1 and A2: V1 V2 A1 A2 A B 1.2 2.0 A D 1.2 4.0 A C 2.4 2.2 What I need to do is to convert it into the following data frame with a new column x, where x is just the stacked up of A1 and A2 placed with respective V1 and V2 in the first two
2006 Jul 11
1
problem of fixed-formated output using sprintf
Dear R users: I'm trying to generate a output file with fixed format using function "sprintf" in R. However, the execution time in R is very long even the toy data (smaller size df) seems to work fine. The syntax that I used is as follows: df.fmt <- sprintf("%2s%2s%2.4f", df$v1, df$v2, df$v3) write.table(df.fmt, output.name,...) The actual dataset is a df with the
2004 Mar 10
3
How to use MLE-class?
Hi there, I had successfully use "MLE" function to solve my problem. Is there anyone knows how to get related information? i.e., value of likelihood function, information matrix, and etc. I know MLE-class can do it but I can not find any information tells me how to do it. Thanks a billions, Yihsu [[alternative HTML version deleted]]
2007 Dec 09
3
editor under MAC system
Dear R-user; I recently switched from PC to MAC. Is there a compatible editor as Win-editor with package RWinEdit for MAC? Thanks Yihsu Chen [[alternative HTML version deleted]]
2006 May 18
2
create a vector
Dear R users: I have an elementary question: how to creat a vector of [A1, A2, A3...... A300]? I know c(1:300) would give 1, 2, 3, ...., 300 but not sure how to attch a A to each element. Thank you Yihsu Chen The Johns Hopkins University
2008 Dec 11
4
how to plot implicit functions
Dear R users -- I think this question was asked before but there was no reply to it. I would appreciate any suggestion any of you might have. I am interested in plotting several "implicit functions" (F(x,y,z)=0) on the same fig. Is there anyone who has an example code of how to do this? Thank you Yihsu
2006 Apr 27
2
add city and point in the map
Dear Helpers: I'm trying to use packages "maps" and "mapdata" (see blow) to display the research resutls on map (Mid-Atlantic region). In particular, I need to mark a number of points in the map by giving their latitude and longitude information. For instance, I would like to mark a point on (long, lat) =(75.56027, 39.09271). Also, I need to mark several cities that I
2007 Jul 09
1
ca.jo
Dear R users; I'm using ca.jo for a VECM model. Is there a way that I can get sd/p-value to see whether coefficients estimated are statistical significant? Thank you Yours, Yihsu [[alternative HTML version deleted]]
2006 May 18
1
How to write output in a specific formate with irregular space
Dear R users: My question is how to write output in a specific formate with irregular spacing? Say that I have the following DF with three columns (A-C): A B C a10 100.0 212 The objective is to write an output file such that column A occupies 1-10 spaces aligned to the left, column B occupies 11-15 spaces aligned to the right, and finally column C takes 16-25 spaces
2008 Feb 01
1
calculation fraction/ratio
Dear R users I wonder if there is a quick way to calculate the ratio/fraction of a list/data frame. For example, if I have a data frame with two fields: "Index" and "A". I would like to know the fractions of A's within the same "Index". That is, for Index =1, three fractions will be "1/(1+2+3)=0.17", "2/(1+2+3)=0.33", and
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
2010 Feb 01
6
Import fixed-format ascii file with mixed record types
I need to import several ascii files in fixed format with two different record types. The data comes from European Labor Force Surveys, wich is a household survey. The first record type is for people over 16 years, and the second much sorter is for people aged 15 or less (this record has a filler with several blanks to get the same record length). The files tipically have 160000 records, with 176
2008 Mar 07
3
newbie question dovecot and ldap
Hello, Please let me know how I can troubleshoot this - driving me crazy! I have the following dovecot-ldap.conf file: hosts = ldap.ucmerced.edu dn=cn=natsciadmin,ou=Special Users,dc=ucmerced,dc=edu dnpass=******** ldap_version = 3 base = ou=People,dc=ucmerced,dc=edu deref = never scope = subtree user_attrs = uid user_filter = (&(ou=Natural
2008 May 06
1
"DNS update failed" during ads join
I received the warning "DNS updated failed!" during net join. Is this an important warning? Will there be problems? Immediately after the join, clients using smbclient were able to authenticate and access shares on this server - even though "net ads testjoin" complained about kerberos problems. # net join -U Administrator Administrator's password: Using short domain name
2008 Mar 08
2
dovecot and ldap config - getting no password in reply
I almost go this liked but then I get the following: Mar 7 18:09:43 malaga dovecot: auth(default): ldap(jnorris,76.20.83.98): pass search: base=ou=People,dc=ucmerced,dc=edu scope=subtree filter=(&(uid=jnorris)) fields=uid,userPassword Mar 7 18:09:43 malaga dovecot: auth(default): ldap(jnorris,76.20.83.98): result: uid(user)=jnorris Mar 7 18:09:43 malaga dovecot: auth(default):
2006 Nov 20
1
Research Assistant position
University of California Merced Merced, CA Programmer Analyst II/III (Research Assistant) Job Code SSNRI723A Open until filled. ? In the Sierra Nevada Research Institute at UC Merced, act in support of research in applied climatology and statistical modeling for wildfire, energy and water resource management applications and assist the Principle Investigator with the development of software,
2012 Jul 30
3
curve comparison
Dear R users, I have seven regression lines I´d like to compare, in order to find out if these are significatively different. The main problem is that these are curves, non normal, non homogeneous data, I´ve tried to linearize them but it has not worked. So I´d like to know if you know any command or source in R which explains how to perform this kind of comparison. Thanks in advance for your
2011 Apr 12
2
parse_Rd raises error when example section contains a quoted percent character
I was writing Rd documentation for a new package when I came across this issue. Here's the smallest example: > library(tools) > cat("\\examples{x <- '<%=rnorm(1)%>'}\n",file=file.path(tempdir(),'test.Rd')) > readLines(file.path(tempdir(),'test.Rd')) [1] "\\examples{x <- '<%=rnorm(1)%>'}" >
2011 May 25
2
Importing fixed-width data
I have a data set where the lines look like: 2011-05-13 00:00:00 EONAAL330 dfa13002516PSCNONA 2011-05-13 00:00:01 EONAAL223 laa13044510AS.NONM Some lines are missing the field before and after the NON: 2011-05-13 00:00:05 EONBHS229 mia13001621NON I read them into R using df = read.fwf(file, widths=c(19,-4,7,3,8,2,1,3,1),