similar to: TRUE/FALSE as numeric values

Displaying 20 results from an estimated 6000 matches similar to: "TRUE/FALSE as numeric values"

2009 Feb 18
2
Counting/processing a character vector
Dear List, I have a data set stored in the following format: > head(dat, n = 10) id sppcode abundance 1 10307 10000000 1 2 10307 16220602 2 3 10307 20000000 5 4 10307 20110000 2 5 10307 24000000 1 6 10307 40210000 83 7 10307 40210102 45 8 10307 45140000 1 9 10307 45630000 1 10 10307 45630600 41 >
2003 Aug 11
4
subscripts in lists
I am tying myself in knots over subscripts when applied to lists I have a list along the lines of: lis<-list(c("a","b","next","want1","c"),c("d", "next", "want2", "a")) >From which I want to extract the values following "next" in each member of the list, i.e. something along the lines of
2006 Sep 21
2
delete a entire vector of a dataframe
delete a entire vector of a dataframe Hello, i want to delete a vector and tried "rm (t.d$V712)". This did not work, message was, could not find variable. I thought the $ defines the vectro in a dataframe, when I just type "t.d$V712" the content of this vector is displayed. Greetings, Thomas
2007 Feb 16
1
Ubuntu Linux and X11
Hello, i have a problem with creating histograms and plots under ubuntu linux. After creating a vector "test" i want to make a histogram, but the following error appears: > hist (test) Error in X11() : could not find any X11 fonts Check that the Font Path is correct. Does anybody know this problem and a solution for this? Thanks in advance, Thomas
2004 Nov 18
1
ROracle connection problem
Hi, I found the same question in the mailing list already a few months ago - but there was no answer to it - so I'll try it again Could somebody help me to solve this following problem? I just begin to learn how to connect my Oracle database with R. > library(DBI) > library(ROracle) Warning message: DLL attempted to change FPU control word from 8001f to 9001f >
2013 Sep 11
8
Fallback in a multi-isp configuration
Hi, I have a multi-isp configuration both on ppp interfaces. As one of them is 32Mbit/s and the other is 8Mbit/s , I have a weight setting of 4 to 1 as in the following providers file entries: vdsl 1 0x10000 - ppp1 - track,balance=4 adsl 2 0x20000 - ppp0 - track,balance=1 I would also like to have fallback between them so that if one is
2006 Sep 21
3
how to ignore "NA" or replace it by another value
Hello, I`m a newbie to R so maybe this question is boring, but I have a large table with several empty missing values, which come out as "NA". How can i ignore them or replace them by another number? Greetings, Thomas
2006 Apr 04
2
is.numeric (NA + NA) is TRUE, should be FALSE (PR#8745)
Full_Name: c fillekes Version: Version 2.2.1 (2005-12-20 r36812) OS: Gentoo Linux kernel 2.6.12 Submission from: (NULL) (129.116.71.233) "Not Available" is of course not a numeric: R > is.numeric (NA) [1] FALSE But for some reason, all arithmetic operations on NA's are in fact numeric, even if it's with other NA's. > is.numeric (NA+NA) [1] TRUE >
2011 Nov 29
5
Why Numeric Values Become Factors in Data Frame
I have a data frame with 1 factor, one date, and 37 numeric values: str(waterchem) 'data.frame': 3525 obs. of 39 variables: site : Factor w/ 64 levels "D-1","D-2","D-3",..: 1 1 1 1 1 ... $ sampdate : Date, format: "2007-12-12" "2008-03-15" ... $ CO3 : num 1 1 6.7 1 1 1 1 1 1 1 ... $ HCO3 : num 231 228 118 246
2008 Jul 25
3
Numerical question
Hi all, I have n independent variables A_1, A_2, A_3,......,A_n, and each with known variances var(A_1), var(A_2),..., but unknown mean. How can I get the approximation of the variance of the product of the variables using numerical computation, i.e. var(A_1*A_2*A_3*.....*A_n)? Thanks. Sincerely, Yanwei Zhang Department of Actuarial Research and Modeling Munich Re America Tel: 609-275-2176
2011 Dec 26
2
Recoding multiple TRUE/FALSE columns into a single list of TRUE columns
Hi everyone, I need to recode multiple columns in a dataframe into a single column in a variety of different ways. Often the values will be TRUE/FALSE and I want a list of the columns that are true as in the Result column below: P1 P2 P3 P4 Result 1 0 0 1 1 P3,P4 2 0 1 1 1 P2,P3,P4 3 1 0 0 0 P1 4 0 0 0 0 NA 5 1 1 1
2006 Nov 09
3
function
R-help, I am trying to create a function that i pass a data set to and have the function return some calculations based on data. Allow me to illustrate: myfunc <- function(lst,mn,sd){ lst <- sort(lst) mn <- mean(lst) sd <- sqrt(var(lst)) return(lst,mn,sd) } data1 <-c (1,2,3,4,5) data2 <- c(6,7,8,9,10) myfunc(data1,data1mn,data1sd) myfunc(data2,data2mn,data2sd)
2002 May 02
2
coercing "numeric" components of data frame to "factor" or "ordered"?
I am getting ready to load a bunch of data into R. The data is all numeric, but some of the numbers are integer codes representing non-numeric semantics. What is the best way to "fix" the data frames so that these compenents are recognized as "factors" or "ordered", as appropriate? Can I "assign" to some attribute of the data frame component, like the
2015 Dec 21
3
Centos DVD -
I have been trying to run Centos 6 and 7 in virtualbox on this Fedora23 computer. Actually I also tried Scientific Linux and a DVD copy of Fedora 21 XFCE Live that I had on hand. The Fedora21 works as expected but I seem to be missing something in Centos and Scientific Linux. They boot and run with a text screen but startx reports "command not found" and a ping to other than
2003 Jul 17
1
Hosmer- Lemeshow test
dear all, i made some analysis with logistic regression. do you know if there is already a function available for the hosmer-lemeshow fitness test? thank you very much for the help best wishes andi
2000 Apr 24
2
paste ?
Dear friends. I've made a very simple procedure to make Bland-Altman plots and it works OK except for the inability to take a variate as argument in annotation. I'm sure it is a very simple error, so if you have 5 seconds please tell me. Best wishes Troels bland <- function (x) #accepts two columns { mn <- 0.5*(x[,1]+x[,2]) diff <- x[,1]-x[,2]
2009 Sep 15
5
identical(length(x), 1) returns FALSE, but print(length(x)) is 1, length(x)==1 is TRUE, and is.integer(lenght(x)) is TRUE????
Dear R, the condition: identical(length(x),1) returns FALSE but print(length(x)) returns 1 and: is.vector(x) is TRUE. is.integer(length(x)) is TRUE length(x) ==1 is TRUE I am puzzled. Regards -- Corrado Topi Global Climate Change & Biodiversity Indicators Area 18,Department of Biology University of York, York, YO10 5YW, UK Phone: + 44 (0) 1904 328645, E-mail: ct529 at york.ac.uk
2007 Jun 29
2
regexpr
Hi, I 'd like to match each member of a list to a target string, e.g. ------------------------------ mylist=c("MN","NY","FL") g=regexpr(mylist[1], "Those from MN:") if (g>0) { "On list" } ------------------------------ My question is: How to add an end-of-string symbol '$' to the to-match string? so that 'M' won't
2005 Jul 05
1
by (tapply) and for loop differences
I am getting a difference in results when running some analysis using by and tapply compare to using a for loop. I've tried searching the web but had no luck with the keywords I used. I've attached a simple example below to illustrates my problem. I get a difference in the mean of yvar, diff and the p-value using tapply & by compared to a for loop. I cannot see what I am doing wrong.
2007 Jan 31
2
Bug in 'pchisq' for x=0.0 (PR#9485)
The function 'pchisq' from the 'stats' library gives a wrong result if the argument equals exactly zero: # Upper tail of central 1-df chi^2 distribution > pchisq(1 , 1, ncp=0, lower.tail = F, log.p = FALSE) [1] 0.3173105 > pchisq(0.5 , 1, ncp=0, lower.tail = F, log.p = FALSE) [1] 0.4795001 > pchisq(0.01 , 1, ncp=0, lower.tail = F, log.p = FALSE) [1]