similar to: log2() and -min() very quick question

Displaying 20 results from an estimated 2000 matches similar to: "log2() and -min() very quick question"

2010 Mar 10
1
log2(quote(1:10)) evaluates the quoted 1:10, log() does not
This is very minor, but shouldn't log2(quote(1:10)) throw an error,the same as log() and other math functions do? It looks like log2 and log10 evaluate a call object instead of throwing a non-numeric-argument error. They do object to non-call language objects, like expressions. > log2(quote(1:10)) [1] 0.000000 1.000000 1.584963 2.000000 2.321928 2.584963 [7] 2.807355 3.000000
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
2012 Jan 10
1
Adding Institution-Affiliation to Description File of R Package
Hi, I'm just finishing up an R package and I was wondering if anyone knows how to include institution name in the "Description File." That is, my current Description File looks like: Package: curatedCancerData Type: Package Title: Cancer Gene Expression Analysis Version: 1.0 Date: 2011-12-24 Author: Benjamin F. Ganzfried, et al. Maintainer: Benjamin F. Ganzfried
2005 Sep 23
2
multi-class histogram?
I am new to R, and I couldn't find the answers to my question in a faq. This could however be because I didn't know what to look for...:) I have three classes of data, data for bacteria, archaea and eukaryotes. I wish to display these in a histogram where all of the values are used to calculate each column. But, I want each column split in three, where the size of each coloured area
2011 Oct 28
2
quick matching question
Hey, I'm trying to match patient identifiers from two separate input files, and then add information from one of the input files to the corresponding output file. I'd greatly appreciate any help! More specifically, Input_File_1 has a column header "bcr_patient_barcode" Input_File_2 has a column header "Barcode" and a column header "Batch" I want my script
2011 Sep 16
3
Problematic If-Else statement
Hi guys, My code (next 2 lines below) isn't doing what I'm expecting it to: tmp <- ifelse(uncurated$days_to_tumor_recurrence=="null","norecurrence","recurrence") curated$recurrence_status <- tmp I want the column "recurrence_status" in my output file to have values "recurrence" (if the input value had a number in the
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
2011 Jun 02
2
Matrix Question
Hi, First of all, I would like to introduce myself as I will probably have many questions over the next few weeks and want to thank you guys in advance for your help. I'm a cancer researcher and I need to learn R to complete a few projects. I have an introductory background in Python. My questions at the moment are based on the following sample input file: *Sample_Input_File*
2011 Dec 16
2
package.skeleton()
Hi-- I'm creating an R package, I've read through "Writing R Extensions" and the package.skeleton() R page-- and I'm still running into a little confusion. I would greatly appreciate any advice you can provide. Where do I run my following line of code from?: > package.skeleton(name = "a", code_files = "EsetObject.r" I'm currently running it from
2011 Jun 20
1
Quick R syntax question
Hi -- I had a pretty quick R question since unfortunately I have not been able to find an answer on Google. It shouldn't take much more than a minute to answer. I'm trying to add up the major gleason grade and minor gleason grade for an analysis of patients with prostate cancer. One column has values under "Major Gleason" and another column has values under "Minor
2012 Feb 28
1
Error in read.table(file = file, header = header, sep = sep, quote = quote, : more columns than column names
Hey, I just googled my error and many things came up. I followed the leads and read the ?read.delim page; I tried changing header = TRUE, and row.names = TRUE-- but I've still been having trouble fixing it, so I would greatly appreciate any help you can provide. Here is my code: rm(list=ls()) source("../../functions.R") uncurated <-
2006 Nov 20
1
sem package subscript out of bounds error
I'm having the most curious error while using the sem package. For the model I'm working with, I keep getting the following error: Error in J[cbind(1:n, observed)] <- 1 : subscript out of bounds I''ve used debug=TRUE with sem, and there don't appear to be any problems with model - there are no latent variables in this model. The variables in the covariance matrix
2012 Apr 22
4
How to take ID of number > 7.
I figured out something new that I would like to see if I can do this more easy with R then Excel. I have these huge files with data. For example: DataFile.csv ID Name log2 1 Fantasy 5.651 2 New 7.60518 3 Finding 8.9532 4 Looeka -0.248652 5 Vani 0.3548 With like header1: ID, header 2: Name, header 3: log2 Now I need to get the $ID out who have a &log2 value higher then 7. I
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]]
2009 May 01
3
adding zeros to dataframe
Greetings, I am new to R and am hoping to get some tips from experienced R-programmers. I have a dataset that I've read into R as a dataframe. There are 5 columns: Plot location,species name, a species number code (unique to each species name), abundance, and treatment. There are 272 plots in each treatment, but only the plots in which the species was recorded have an abundance value. For
2012 Oct 15
2
warning message
Hi list, Can somebody explain why there are these warning messages?? I just don't get it.? I'm using R 2.15.1 on WinXP. Thanks! Tao > x [1] -2.143510 -1.157450 -1.315581? 1.033562 -1.225440 -1.179909 >? ifelse(x>0, log2(x), -log2(-x)) [1] -1.099975 -0.210950 -0.395700? 0.047625 -0.293300 -0.238675 Warning messages: 1: In ifelse(x > 0, log2(x), -log2(-x)) : NaNs produced
2011 May 12
1
log transformation and mean question
I have question about log2 transformation and performing mean on log2 data. I am doing analysis for ELISA data. the OD values and the concentration values for the standards were log2 transformed before performing the lm. the OD values for samples were log2 transformed and coefficients of lm were applied to get the log2 concentration values. I then backtransformed these log2 concentrations and the
2007 Nov 29
2
How to manipulate a data frame
Dear list, I have a data frame like: > log2.ratios[1:3,1:4] Clone a1 a2 a3 1 GS1-232B23 -0.0207500 0.17553833 0.21939333 2 RP11-82D16 -0.1896667 0.02645167 -0.03112333 3 RP11-62M23 -0.1761700 0.08214500 -0.04877000 how to make it to look like: > log2.ratios[1:3,1:4] a1 a2