Displaying 20 results from an estimated 1000 matches similar to: "Question regarding to replace <NA>"
2010 Nov 09
1
Question related to combination and the corresponding probability
Dear r users,
I have 4 variables x1,x2,x3,x4 and each one has two levels, for example Y
and N.
For x1: prob(Y)=0.6, prob(N)=0.4;
For x2: prob(Y)=0.5, prob(N)=0.5;
For x3: prob(Y)=0.8, prob(N)=0.2;
For x4: prob(Y)=0.9, prob(N)=0.1;
Therefore, the sample space for (x1, x2, x3, x4)={YYYY, YYYN, YYNY,......}
(16 possible combination) and the corresponding probabilities are
{(0.6)(0.5)(0.8)(0.9),
2010 Nov 15
3
merge two dataset and replace missing by 0
Hi r users,
I have two data sets (X1, X2). For example,
time1<-c( 0, 8, 15, 22, 43, 64, 85, 106, 127, 148, 169, 190 ,211 )
outpue1<-c(171 ,164 ,150 ,141 ,109 , 73 , 47 ,26 ,15 ,12 ,6 ,2 ,1 )
X1<-cbind(time1,outpue1)
time2<-c( 0 ,8 ,15 , 22 ,43 , 64 ,85 ,106 ,148)
output2<-c( 5 ,5 ,4 ,5 ,5 ,4 ,1 ,2 , 1 )
X2<-cbind(time2,output2)
I want to
2009 Nov 11
1
loop through variable names
Often I perform the same task on a series of variables in a dataframe, by looping through a character vector that holds the names and using paste(), eval(), and parse() inside the loop.
For instance:
thesevars<-names(environmental)
environmental$ToyOutcome<-rnorm(nrow(environmental))
tableOfResults<-data.frame(var=thesevars)
tableOfResults$Beta<- NA
2002 Sep 09
1
getting variable names into formulas
Hello,
I have a dataframe with several hundred variables. I would like to
explore updates of some baseline lme fit by including each of some
subset of these variables, one at a time. For various reasons it is
inconvenient to rely on the positions of the numbered columns in the
dataframe. Here is what I want to do:
mod.baseline<-lme(fixed=foo,data=dat,random=bar)
for(thisvar in vars){
2009 Sep 16
1
re-code missing value
Dear all,
I have partial data set with four colums. First column is "site" with three
factors (i.e., A, B, and C). From second to fourth columns (v1 ~ v3) are my
observations. In the observations of the data set, "." indicates missing
value. I replaced "." with NA. To replace "." with NA, I used two steps.
First, I replaced "." with NA, and
2006 May 02
4
Repeating tdt function on thousands of variables
I am using dgc.genetics to perform TDT analysis on SNP data from a cohort of
trios.
I now have a file with about 6008 variables. The first few variables related
to the pedigree data such as the pedigree ID the person ID etc. Thereafter
each variable is a specific locus or marker. The variables are named by a
pattern such as "Genotype.nnnnn" with nnnnn corresponding to a number which
2008 Nov 24
2
64bit R for Mac
Dear R gurus,
On the CRAN website, it says that a 64bit version for Mac OS Tiger would be release shortly. Do we know what are the expected dates? Will the packages be also compiled for 64bit?
We are running large microarray analysis and we keep hitting the 3Gb memory limit.
I saw that there is a version available on the development mirrors, but I am not too excited to replace our very stable
2008 Oct 20
5
Combining all possible values of variables into a new...
I'm trying to create a new column in my data.frame where subjects are categorized depending on values on four other columns. In any other case I would just nest a few ifelse statements, however, in this case i have 4*6*2*3=144 combinations and i get weird 'context overflow' errors. So I wonder if there is a more efficient way of doing this.
For illustrational purposes, let's say
2012 Sep 26
3
replace string values with numbers
Hi everyone, I have a data frame Gene with SNPs eg. P1 P2 P3
CG CG GG
-- -- AC
-- AC CC
AC -- AC I tried to replace all the GG with a value 3. Gene[Gene=="GG"]<-3 It always give me: Warning in `[<-.factor`(`*tmp*`, thisvar, value = 3) :
invalid factor level, NAs generated Does any know if there is anything wrong with my code? Thanks, Zhengyu
2003 Sep 10
9
Free World Dialup (FWD).
Hi,
Is it possible to use asterisk with Free World Dialup (FWD) ?
Did someone manage to make it work? how?
Best,
-P
--
__________________________________________________________
Sign-up for your own personalized E-mail at Mail.com
http://www.mail.com/?sr=signup
CareerBuilder.com has over 400,000 jobs. Be smarter about your job search
http://corp.mail.com/careers
2016 Apr 06
2
LTO renaming of constants with inline assembly
On Wed, Apr 6, 2016 at 10:46 AM, Peter Collingbourne <peter at pcc.me.uk>
wrote:
> I suspect that the right way to do promotion/renaming of this sort is to
> rename at the MC layer just before writing the symbol table to the object
> file.
>
I think that is too late - how would the symbols be distinguished in the
LTO case below after the IR is linked but before we renamed the
2016 Apr 06
2
LTO renaming of constants with inline assembly
On Wed, Apr 6, 2016 at 11:16 AM, Peter Collingbourne <peter at pcc.me.uk>
wrote:
> On Wed, Apr 6, 2016 at 10:49 AM, Teresa Johnson <tejohnson at google.com>
> wrote:
>
>>
>>
>> On Wed, Apr 6, 2016 at 10:46 AM, Peter Collingbourne <peter at pcc.me.uk>
>> wrote:
>>
>>> I suspect that the right way to do promotion/renaming of this
2013 Mar 21
2
Howto create variable from the name of another one and get content of it
Hello,
I have a variable created like
... Set(__myVar=${ARG1})
... Set(__${myVar}STATUS=)
If ARG1 is abcd, variable is abcdSTATUS and should be empty. This is OK.
Now I would like to get the value of abcdSTATUS. How to do it?
${${myVar}STATUS}} isn't working, nor ${{myvar}STATUS}
Thanks for any hint
--
Daniel
2016 Apr 13
2
LTO renaming of constants with inline assembly
I still wonder if this would be an issue in _standard_ (not thin) LTO?
This test seems to be OK on my (slightly modified) standard LTO flow, but I do wonder for a more general case.
Sergei
---
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
From: llvm-dev [mailto:llvm-dev-bounces at lists.llvm.org] On Behalf Of Peter Collingbourne
2008 Mar 21
1
Problem with Makefile.win and environment variable
Dear all,
When porting my package to WinXP I have the following problem:
I need to create an environment variable "MYVAR=c:\mypath" which I have
saved in the control panel "System->My Computer" (under the `Advanced' tab).
I have two files which need to access MYVAR: config.win, Makefile.win
While "config.win" does recognize MYVAR correctly,
2000 Dec 20
2
Names
I am trying to create a set of vectors which have similar names. They have
a common part and an extra unique part. I am sure I have seen questions on
this before but I have been unable to find it in the archive. There are
examples of sets of names for columns of a data frame, but not for
individual vectors.
Suppose I want vectors named myvar.1 myvar.2 etc.
I tried:
>
2010 Oct 06
5
Create variable by name
Can one create a variable through a function by name
createVariable <- function(name) {
outputVariable = name
name <- NULL
}
after calling
createVariable("myVar")
I would like to have a variable myVar initialized with NULL in my
environment. Is this possible?
Ralf
2012 May 24
1
svychisq using two frames
Hello,
I?m hoping you have a few minutes to help out someone very new to R. I?ve
done some searching, but cannot find this particular issue.
I have survey data from two different time periods (years). Both years are
stratified samples and have the same variables (and variable names), but are
different people in the community answering in the different years.
Everything loads into the survey
2016 Apr 06
2
LTO renaming of constants with inline assembly
I encountered an issue with ThinLTO handling of inline assembly, where the
inline assembly referenced a constant that was a local variable. The local
var was renamed because it was promoted in ThinLTO mode, but the inline
assembly copy was not renamed and we ended up with an undef at link time.
It looks like this is a general problem with inline assembly and LTO.
Wondering if it is a known issue.
2006 May 03
2
Conditional statement style
This is a bit of a nuby question methinks but i''ve had a play/search
around and it''s just bugging me now :0)
Say I have a conditional statement, testing a variable against a number
of values. The first way i did this is like so:
if myvar != "" and myvar != 0 and myvar != nil
# .. code
end
This seems a bit messy - is there neater way of doing this? I thought of: