Displaying 20 results from an estimated 4000 matches similar to: "log2(quote(1:10)) evaluates the quoted 1:10, log() does not"
2003 Oct 29
1
I have a problem with the log2 function
Dear R users,
according the help(log), the function
log2(x) should give the natural logarithm of x.
I expect in case of x=2 to to get 0.6931, however, R gives me 1 as a result.
Similar, logb(2,2) gives 1 again.
I'm wondering if I have missed something ?
Yours
Frank
--
Frank Mattes, MD e-mail: f.mattes at ucl.ac.uk
Department of Virology fax 0044(0)207 8302854
Royal Free Hospital
2008 Feb 27
1
Warnings generated by log2()/log10() are really large/takes a long time to display
x <- rnorm(1e6);
y <- log(x); # or logb(x) or log1p(x)
w <- warnings();
print(object.size(w));
## [1] 480
str(w);
$ NaNs produced: language log(x)
- attr(*, "dots")= list()
- attr(*, "class")= chr "warnings"
y <- log2(x); # or log10(x)
w <- warnings();
print(object.size(w));
## [1] 8000536
str(w);
## List of 1
## $ NaNs produced: language
2011 Jun 30
2
volcano plot.r
Hello.
My name is Akashah. i work at metabolic laboratory. From my study, i found that volcano plot can help a lot in my section.
i already studied about the volcano plot and get the coding to run in R software, unfortunately, there is may be something wrong with the coding. This is because no graph appear, but no error (blue color text) was shown on the R console. Below is the coding for
2011 Jun 20
2
(no subject)
HELLO, anybody... could you help me to check the below coding for volcano.
what is the mistake?
what the plot could not display?
# volcano_plot.r
#
# Author: Amsha Nahid, Jairus Bowne, Gerard Murray
# Purpose: Produces a volcano plot
#
# Input: Data matrix as specified in Data-matrix-format.pdf
# Output: Plots log2(fold change) vs log10(t-test P-value)
#
#
2017 Feb 17
4
Wish List: Extensions to the derivatives table
The derivative table resides in the function D. In S+ that table is extensible because it is written in the S language. R is faster but less flexible, since that table is programmed in C. It would be useful if R provided a mechanism for extending the derivative table, or barring that, provided a broader table. Currently unsupported mathematical functions of one argument include expm1, log1p,
2011 Jun 13
2
log2() and -min() very quick question
I'm looking over good-code a post-doc in my lab wrote and trying to learn
how it works. I came across the following:
rel.abundance <- as.matrix(read.delim("rel.abundance.csv",row.names=1,as.is
=TRUE))
rel.abundance <- log2(rel.abundance-min(rel.abundance)+1)
I'm not sure what the second line is doing. I ran each line in R and
couldn't see a noticeable difference in
2003 Jun 24
3
R-1.7.1 regression test failure on alphaev68-dec-osf5.1
I'm attempting to compile and install R version 1.7.1 for my statistical
geneticists. It seems to compile correctly -- that is, it compiles
without errors -- but the regression test is failing in the following
manner:
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> ## log
> stopifnot(all.equal(log(1:10), log(1:10, exp(1))))
> stopifnot(all.equal(log10(30), log(30, 10)))
>
2017 Feb 17
1
Wish List: Extensions to the derivatives table
The issue is that without an extensible derivative table or the proposed extensions, it is not possible to automatically produce (without manual modification of the deriv3 output) a function that avoids catastrophic cancellation regardless of the working range.
Manual modification is not onerous as a one-time exercise, but can be time consuming when it must be done numerous times, for example
2006 Aug 24
1
how to constrast with factorial experiment
Hello, R users,
I have two factors (treat, section) anova design experiment where
there are 3 replicates. The objective of the experiment is to test if
there is significant difference of yield between top (section 9 to 11)
and bottom (section 9 to 11) of the fruit tree under treatment. I
found that there are interaction between two factors. I wonder if I
can contrast means from levels of
2012 Feb 28
1
Volcano Plot
Hi I am using the ggplot2 package for the volcano plot and I am using the
following code for the same:
g = ggplot(data=data, aes(x=data[11], y=-log10(data[12]), colour=threshold))
+
+ geom_point(alpha=0.4, size=1.75) +
+ opts(legend.position = "none") +
+ xlim(c(-10, 10)) + ylim(c(0, 15)) +
+ xlab("log2 fold change") + ylab("-log10 p-value")
data[11] is a
2004 Nov 24
6
Searching for antilog function
Dear R-users,
I have a basic question about how to determine the antilog of a variable.
Say I have some number, x, which is a factor of 2 such that x = 2^y. I
want to figure out what y is, i.e. I am looking for the antilog base 2 of x.
I have found log2 in the Reference Manual. But I am struggling how to
get the antilog of that.
Any help will be appreciated!
> version
platform
2004 Dec 17
1
How can I take anti log of log base 2 values in R
Hi,
I am using R for microarray data anlaysis. When I
normalize my data, it converts all my data in to log
base 2 values. how can I convert back to log base
10..is there any function in R which I can use or how
can I take anti log. or is there any function in R
for antilog.
Please let me know,..if anyone knows..
Thank you so much,
Saurin
=====
Saurin's WebWorld:
2010 May 05
1
testInstalledBasic question
Hi,
I'm currently in the process of writing an R-installation SOP for my
company. As part of that process I'm using the recommendations from the 'R
Installation and Administration' document, section 3.2, "Testing an
installation". This is done on an XP machine, using the latest binary of
2.11.0.
The binary is downloaded and then installed from the installer. I then
2017 Mar 20
2
-ffast-math optimizations impacted by symbol renaming in header files
Hi,
I came across an issue where some optimizations that would normally be applied to standard math function calls are not getting applied when the –ffast-math option is enabled on the Clang command line on a Linux x86_64 target.
I tracked down the issue to occurring because the –ffast-math option is triggering Clang to preprocess the math.h header file with the __FINITE_MATH_ONLY__ macro set
2004 Nov 29
4
escaping backslash in a string
How can I get a single backslash in a character string?
My goal is to escape dots in a string that will be used as a regular
expression. I thought I could do it this way:
gsub(".", "\\.", x)
Unfortunately, "\\" does not represent a literal backslash as I
expected, but rather a pair of backslashes:
> "\\."
[1] "\\."
> "\\"
[1]
2011 Aug 30
0
[LLVMdev] exp2 and log2 intrinsic expansion
I'm having a problem when generating the following LLVM intrinsics:
@llvm.exp2.f32
@llvm.log2.f32
On linux, these are available on as part of standard math libraries, the
code geenrator expands them into library calls, and the linker happily finds
them. However, on Windows and OSX, where no implementation exists, instead
of throwing a runtime error, we get a call to a function with a null
2003 Nov 21
1
Using log() on an openMosix cluster
Hi all, I was hoping to get some advice about a problem that I realize
will be difficult to reproduce for some people. I'm running R 1.7.1 on
an openMosix (Linux) cluster and have been experiencing some odd
slow-downs. If anyone has experience with such a setup (or a similar
one) I'd appreciate any help. Here's a simplified version of the problem.
I'm trying to run the
2009 Jun 18
1
lattice logaritmic scale (basis "e" ), rewriting labels using xscale.component
Hi there,
sorry for troubling everybody once again, I've got a problem rewriting
Sarkar's function for
rewriting the tick locations in a logaritmic way (s.
http://lmdvr.r-forge.r-project.org/code/Chapter08.R):
His example works for log 2 but I need log e (natural logarithm). My
problem is that if I replace
2 with "e" (using paste()), I get the error message that the location
2003 Dec 22
2
Memory allocation
Hello:
I am trying to work with a couple of microarray data sets, using
platform i386-pc-mingw32
arch i386
os mingw32
system i386, mingw32
status
major 1
minor 8.1
year 2003
month 11
day 21
language R
In the shortcut for invoking R I have set
2005 Oct 31
3
question about precision, floor, and powers of two.
At the risk of being beaten about the face and body, can somebody explain
why the middle example: log2(2^3); floor(log2(2^3)) is different than
examples 1 and 3?
> log2(2^2); floor(log2(2^2))
[1] 2
[1] 2
> log2(2^3); floor(log2(2^3))
[1] 3
[1] 2
> log2(2^4); floor(log2(2^4))
[1] 4
[1] 4
>
DrC
[[alternative HTML version deleted]]