similar to: Writing to a file with fixed precision

Displaying 20 results from an estimated 300 matches similar to: "Writing to a file with fixed precision"

2005 Oct 10
1
Writing to a file with fixed precision
Hi, I'm trying to ouput to a filled with a fixed precision: eg. if I have data x=c(1.0,1.4,2.0), I want to be able to ouput the following to a file: 1.00000000000000 1.40000000000000 2.00000000000000 I was wondering if there was a function to do this in R? Thanks, Richard Richard Hedger Département de Biologie Université Laval Québec, Canada, G1K 7P4 [[alternative HTML version deleted]]
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
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
2007 Feb 22
2
write fixed format
Dear R users; Is there a function in R that I can put "text" with proper alignments in a fixed format. For instance, if I have three fields: A, B and C, where both A and C are text with 3 characters and left alignment; B is a numeric one with 2 decimals and 3 integer space digits. How can I put the following row in a file? (note there is a space between a and 2, and after b.)
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
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
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
2006 May 16
0
solution of split data.frame
Dear Folks: My recent question concerning split data.frame has been solved using both following approaches. (Question is listed at the end.) solution 1: Try melt from the reshape package (by Gabor) library(reshape) melt(DF, 1:2) You may may need to resort it if the order is important. solution 2: good for large dataset (by Robert) "If your data set is really big, i.e. bigger than R
2013 Mar 07
1
How to export data with defined decimal places
Hi all mailing listers, I want to export data with specified precision into .txt file. How can I make it? See below sprintf("%.10f",pi) [1] "3.1415926536" when carry out write.matrix(pi,"pi.txt"), 3.141592653589793115998 in pi.txt file not with 10 decimal places like using sprintf("%.10f",pi) Thanks Marino [[alternative HTML version deleted]]
2011 Apr 13
1
Decimals in R/SQL
Hello, When I am writing in sqldf or RSQLite I lose the decimals in my matrix. The only way I can get decimals is by multiplying by 1.00000, etc. I have tried manipulating the options, but it is only effective once I multiply by 1.0000. I appreciate any suggestions! Thanks! Example: z <- sqldf ("select ST, SUM(AGEP*PWGTP)*1.000000000/SUM(PWGTP)*1.00000000000000 as wgtage from ss09
2006 Jun 12
3
panic in buf_hash_remove
Hi, had recently this panic during some I/O stress tests: > $<msgbuf [...] panic[cpu1]/thread=fffffe80005c3c80: BAD TRAP: type=e (#pf Page fault) rp=fffffe80005c3980 addr=30 occurred in module "zfs" due to a NULL pointer dereference sched: #pf Page fault Bad kernel fault at addr=0x30 pid=0, pc=0xfffffffff3ee322e, sp=0xfffffe80005c3a70, eflags=0x10206 cr0:
2015 Jan 08
2
Solaris 10 make check core dumps
Hello everyone, I'm doing a standard build on Solaris 10 with Dovecot 2.2.15 without anything fancy: ./configure make make check make install Configure output looks like this: *** Install prefix . : /usr/local File offsets ... : 64bit I/O polling .... : poll I/O notifys .... : none SSL ............ : yes (OpenSSL) GSSAPI ......... : no passdbs ........ : static passwd passwd-file shadow
2013 Feb 17
1
addition in the initial question
Dear Elisa, Try this: vec1<-c(33,18,13,47,30,10,6,21,39,25,40,29,14,16,44,1,41,4,15,20,46,32,38,5,31,12,48,27,36,24,34,2,35,11,42,9,8,7,26,22,43,17,19,28,23,3,49,37,50,45) vec2<-vec1[1:26] names(vec2)<-LETTERS[1:26] label1<-unlist(lapply(mapply(c,lapply(seq(0,45,5),function(x) x),lapply(seq(5,50,5),function(x) x),SIMPLIFY=FALSE),function(i)
2017 Sep 02
0
problem in testing data with e1071 package (SVM Multiclass)
Hello all, this is the first time I'm using R and e1071 package and SVM multiclass (and I'm not a statistician)! I'm very confused, then. The goal is: I have a sentence with sunny; it will be classified as "yes" sentence; I have a sentence with cloud, it will be classified as "maybe"; I have a sentence with rainy il will be classified as "no". The
2010 Sep 26
3
Anarchy Online
im getting another problem with wine and Anarchy Online, this time with nvidia version mismatch. http://pastebin.com/uACZwMb3 I am on Archlinux 64-bit (fairly standard installation). wine-1.3.1