Displaying 20 results from an estimated 600 matches similar to: "write.table -- maintain decimal places"
2011 Jan 14
2
read in data, maintain decimal places
Good day, All,
Is there any way to maintain the number of decimal places in the type of situation below?
I would like to maintain the number of decimal places in 0.667, despite the fact that its column-mates have a fourth decimal place.
Thank you for your time.
Jim
dat.txt contents:
MARKER ALLELES FREQ1 RSQR EFFECT2 STDERR CHISQ PVALUE
rs6599753 C,T
2005 Jun 27
1
stage left and right effects
Here are two effects (with a common base) that perform a stage
left/right effect. The effect is named after the Hanna Barbara
character Snagglepuss. :) It shakes the contents briefly and then
jets off (stage) to the left or right.
I used the Shake effect as a guide to this one. The StageBase accepts
the element and an "amount" to initially shake the element by. So in
2005 Jun 24
1
Blind Toggle "effect"
I wrote a simple toggle function similar to Element.toggle that will
toggle a section between being up and down using the Blind effect.
I''m relatively new to the code, so I''m not sure if it''s implemented
100% correctly or if it can be done better. I am using it though and
it seems to be working fine.
Anyway, here''s the code and if you think it''s
2005 Jun 24
1
Executing custom effect for n seconds
Glad to see this list get going!
I have a custom effect ''Pulse'' that basically does an opacity fade in/
out.
I want to execute this effect with a custom duration.
I''m looking for a consistent approach that is inline with
script.alicio.us and Prototype.
Is there a way to do something like this (pseudo code):
Effect2.Pulse = function(element) {
new
2005 Jun 24
3
flashing divs in IE with use of BlindUp and BlindDown
I''m having an issue with flashing divs in IE (firefox is fine and the
only other browser I''ve used)
My scenario is as follows. I have 2 divs (initially hidden) and using
the BlindDown and BlindUp functions (possibly others) the divs flash
when starting to roll down in BlindDown (due to the Element.show call)
and also at the end of the BlindUp call (due to the Element.hide call)
2005 Jun 28
1
Thomas script.aculo.us (important bug and add ons)
Sorry. Posted from wrong email originally. Moderator, please ignore other
post. Thx.
To Thomas Fuchs,
First of all, thanks for your amazing scripts on script.aculo.us. You''ve got
quite some talent. I knew I was in for a treat when I read your goals
(mainly about simplicity). My goals exactly. Keep it simple is great when
you''re trying to integrate 100 different things.
I wrote
2003 Oct 22
1
passing a variable (containing the value of the argument) to a function
My previous question put in a simpler way:
How would I pass a value of a variable to a function such as
lm(Effect1~Trt*Dose, data = x, contrasts = list(Trt = contr.sum, Dose =
contr.sum))?
Here, 'Effect' is a column name in my data matrix, and I want "Effect1" to
be replaced by "Effect2" and so on (my other column names in the data
frame) for successive anova
2019 May 30
1
Possible bug in formatC
I do not know if this is a bug or a case of improper documentation. The
documentation for formatC() implies that the difference between the options
format="f" and format="g" is that with "g", scientific format is sometimes
used. There is another difference between them that is not mentioned in the
documentation. drop0trailing=FALSE is ignored when format is set to
2010 Nov 29
3
how to use by() ?
Hello, All!
How might one accomplish this using the by() function?
m1 is a data frame.
# populate column "m1$major_allele"
for ( i in 1:length(m1$major_allele)) {
if ( m1$Freq1[i] == m1$MAF[i]){
m1$major_allele[i] = m1$Al1[i]
}
else{
m1$major_allele[i] = m1$Al2[i]
}
}
Jim
[[alternative HTML version deleted]]
2011 May 08
2
Pretty printing numbers
Friends
I am trying to format a number to a string so 2189.745 goes to "2,189.35"
and 309283.929 goes to "309,283.93"
I have tried to use formatC(X, big.mark=",",drop0trailing=FALSE, format="f")
but it does not get the number of decimals correct. Specifying digits does
not work as that is significant digits. I could use a switch statement
switching on
2010 Jul 01
2
Export data frame of high dimension to txt
I managed with success to export a data frame of 367 columns and 37 rows to a txt file, but unfortunately I couldn't manage the same with the transposed data frame. Specifically, it seems like the notebook cannot "read" correctly 367 columns, so it reads the first 145 columns and it folds down the rest of them and consequently it folds down the respective data.
2008 May 08
3
lme nesting/interaction advice
Hi everyone,
I am confused on how to specify some nesting and interaction terma with lme().
I have a dataset where some flies where selected for accessory gland size, made
to mate in presence/absence of another male and the level of some protein
measured. Now the complex stuff.
The selection has been replicated twice, so that the selection term has got two
levels (large and small) with
2010 Feb 17
2
extract the data that match
Hi r-users,
I would like to extract the data that match. Attached is my data:
I'm interested in matchind the value in column 'intg' with value in column 'rand_no'
> cbind(z=z,intg=dd,rand_no = rr)
z intg rand_no
[1,] 0.00 0.000 0.001
[2,] 0.01 0.000 0.002
[3,] 0.02 0.000 0.002
[4,] 0.03 0.000 0.003
[5,] 0.04 0.000 0.003
[6,]
2013 Mar 13
1
expression exponent labeling
Hi all,
I want to label an axis with exponents, but can't get it done with expression.
Any hints would be very welcome!
# simulated data, somewhat similarly distributed to my real data:
set.seed(12); d <- rbeta(1e6, 0.2,2)*150 ; d <- d[d>1e-8]
hist( d? , breaks=100)
# now on a logarithmically scaled axis:
hist(log10(d), breaks=100, xaxt="n")
abline(v=
2011 Feb 04
1
GWAF package: lme.batch.imputed(): object 'kmat' not found
Hello, All,
GWAF 1.2
R.Version() is below.
system(lme.batch.imputed(
phenfile = 'phenfile.csv',
genfile = 'CARe_imputed_release.0.fhsR.gz',
pedfile='pedfile.csv',
phen='phen1',
covar=c('covar1','covar2'),
kinmat='imputed_fhs.kinship.RData',
outfile='imputed.FHS.IBC.GWAF.LME.output.0.txt'
))
Gives the error messages:
Error in
2005 Jun 28
0
New beta of script.aculo.us
Hi,
A new beta version is ready ready for downloading at http://
script.aculo.us/downloads
Changes:
* Updated to Prototype 1.3.0
* Fixed sortables that are absolutely positioned
* Fixed draggables on pages with no droppables
* Added Effect.Transitions.pulse
* Added Effect.Pulsate and Effect.Fold effect by Justin Palmer
* Added transitions by Mark Pilgrim: .full,
2005 Jun 29
0
Effects flicker in firefox when called with setTimeout
Hi,
I have a page calling a fade effect from a setTimeout. In Firefox the
element flickers before fading. It works fine in IE - I haven''t
tested any others. Has anyone else noticed this?
I''ve included a simple prototype below (sorry haven''t got web space to
post to - anyone know of any good free space?). Whilst in the
prototype it doesn''t to be much of an
2010 Feb 04
2
help needed using t.test with factors
I am trying to use t.test on the following data:
date type INTERVAL nCASES MTF SDF MTO SDO
nFST MF nOBS MO MB BIASCV BIASEV ME MAE
RMSE CRCF
2001-06-15 avn GE1.00 4385 0.246 0.300 1.502
0.556 1367 1.373 4385 1.502 1.471 0.285 0.164
-1.256 1.266 1.399 0.056
2001-06-15 avn
2012 Oct 09
1
why does R stepAIC keep unsignificant variables?
Ran a bunch of variables in R and the final result of StepAIC is as below:
Why are the first 5 variables kept in the stepwise result?? Are the last
4 variables finally chosen after Stepwise? Thanks
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 1.315e-01 2.687e-01 0.490 0.63611
Core_CPI__ 1.290e-02 7.496e-03 1.721 0.11927
GDP_change -3.482e-03 2.075e-03 -1.678 0.12767
2007 Mar 18
1
HELP...Running data
We are two french students and we have a problem concerning an exercize.
We don't know how to resolve it.
It would be fantastic if someone can help us.
Thanks.
Description:
This study examined how the metabolic cost of locomotion varied
with speed, stride frequency and body mass. Cost was determined
by measuring oxygen consumption (?vo2?), analyzing the oxygen
content in air inhaled and