Displaying 11 results from an estimated 11 matches for "newvari".
Did you mean:
newvar
2008 Sep 19
2
Multiple logical operations in a subscript
Hello,
I would like to select cases using multiple logical operations (e.g. X
or Y or Z) without having to repeat the dataframe$variable within the
subscript. My working code (with a single logical operator) currently
looks like this:
dataframe$newvariable[data$oldvariable=="X"]<-"group1"
I thought this next line of code might do what I wanted, but it doesn't:
dataframe$newvariable[data$oldvariable=="X" | "Y" | "Z"]<-"group1"
I'd appreciate any suggestions. I've trie...
2005 Aug 12
2
coercing created variables into a new data frame using na.omit()
...ight3))
for (x in 1:length(new.variable))
{f<-((((age1[x]-7)*(weight[x]-mw))+((age2[x]-7)*(weight2[x]-mw))+((age3[x]-7)*
(weight3[x]-mw)))/(((age1[x]-7)^2)+((age2[x]-7)^2)+((age3[x]-7)^2)));
new.variable[x]<-f}
#then bind it into the existing old data frame
data.frame2<-cbind(data.frame1,newvariable)
rm(dat.frame1)
attach(data.frame2)
#everything o.k. so far but now the problem part... I basically want to remove
all the rows with NA in the new data frame including corresponding rows in the
new variable
data.frame3<-na.omit(data.frame2)
rm(data.frame2)
attach(data.frame3)
length of new...
2009 Aug 12
1
nominal to numeric function
Hi,
I'm training an SVM (C-classification from e1071 library)
Some of the variables in my data set are nominal. Is there some
easy/automatic way to convert them to numerical representations?
Thanks,
-N
2011 Jun 02
1
Help in a project
...rvation| Variable 1 | Variable 1 Flag
----------------|------------------|------------------
1 | 10000 | NA
2 | NA | A
3 | 631 | NA
please note | represents another column.
this is for a large data set and I cannot manually go through this:
my attempt to this was :
l=0 # placeholder
m<-c() #newvariable 1
v<-c() #newvariable flag
for (z in tablename1$Variable_1)
(if (is.numeric(z) ) m[z:l] l=l+1 else v[z:1] l=l+1
Can you please guide me as to how to approach this problem?
Any help would be greatly appreciated.
Tarun Manchanda
[[alternative HTML version deleted]]
2001 Sep 21
4
How to change the levels of a variable???
Hi,
I have a simple question.
I have a variable with 3 levels.
Variable
A A A A A A
B B B B B B
C C C C C C
I need to make a new vector renaming de levels B and C for D.
NewVariable
A A A A A A
D D D D D D
D D D D D D
I dont find how to make it in manuals or in this list.
Can anyone help-me???
Thank you
Ronaldo
--
Agnes' Law:
Almost everything in life is easier to get into than out of.
--
| //|\\ [*****************************][*******************]
|| ( ? ? ) [...
2010 Feb 27
1
New Variable from Several Existing Variables
..."Yes", then then the new variable
should also be "Yes", however if any one of the three existing variables is
a "No", then then new variable should be a "No". I would then use that new
variable as an exclusion for data in a new or existing dataset (i.e., if
NewVariable = "No" then delete):
Take this:
Column1, Column2, Column3
Yes, Yes, Yes
Yes, No, Yes
No, No, No
No, Yes, No
Yes, Yes, No
Generate this:
Column1, Column2, Column3, NewVariable1
Yes, Yes, Yes, Yes
Yes, No, Yes, No
No, No, No, No
No, Yes, No, No
Yes, Yes, No, No
And end up with this:...
2009 Sep 11
1
Fortran routine affected by unrelated R code
...ed output files
(.Rout.save). However, if I change an R file in the /R/ folder, some
calls to the Fortran code (called by ".Fortran()") return different
results, although the change of the R file is not related to this,
e.g. when I add the commands 'print("abc")' or 'newVariable <- 123' to
an R file that even does not call the Fortran code. However, adding
empty lines or comments does NOT change the values returned by the
Fortran code. Different modifications of the R files lead to different
results but the same modification always leads to the same results
(hen...
2005 Aug 29
4
echo system command and set the results to a new variable
...nal I am currently able to issue this command:
echo | date > date.txt
I end up with a file called date.txt with the contents: Mon Aug 29
18:32:45 EDT 2005
I would like to issue a command in my dialplan that puts the date
into a new variable something like this:
System(echo | date > Set(newVariableName=theDateEchoReturns)
So that the newVariableName=Mon Aug 29 18:32:45 EDT 2005
The objective in this case is to format the date according to the
Unix Time format listed above. I am certainly open to other options
for doing this. The default ${TIMESTAMP} format doesn't work for my...
2017 Nov 19
2
Changeing logarithms
Hi!
I'm using a large panel data, and now I have faced some difficulties with
my analysis. The predictors are not normally distributed and there are
quite many outliers (some of them are influential though).
I have tried to change the logarythm, but i'm not sure, how to do that. I
want also draw a plot picture in which logarythms of predictors x and y are
changed. How could I do that?
2007 Oct 31
1
segfault - asterisk crash and restart
...0x000000000044da80 in ast_var_name (var=0x10f1d58a0) at chanvars.c:69
name = 0x10f1d58b0 <Address 0x10f1d58b0 out of bounds>
#1 0x000000000049948f in pbx_builtin_setvar_helper (chan=0xf460320,
name=0x2aaabf53cbf7 "DIALSTATUS",
value=0x417a0690 "BUSY") at pbx.c:5825
newvariable = (struct ast_var_t *) 0x10f1d58a0
headp = (struct varshead *) 0xf460880
nametail = 0x2aaabf53cbf7 "DIALSTATUS"
__PRETTY_FUNCTION__ = "pbx_builtin_setvar_helper"
#2 0x00002aaabf53938e in dial_exec_full (chan=0xf460320,
data=0x417a2e50, peerflags=0x417a0c50, continue_exec...
2002 Nov 20
0
Plots by subject
...nes in some tables or something. I don?t
understand the mechanism behind ?for?, but it does not seem to just substitute
in a value like in a SAS macro variable. So what I tried was making one big
table (in SAS and replacing duplicated data with missing values?i.e. ?if not
first.(variable) then (newvariable)=?.?, etc) so when there was more genotype
entries than drug entries, for example, ?NA?s filled the corresponding drug
data cells. This results, however, in a lot of ?NA?s being printed in the
table sections, since there are many lines of data for the graph data.
Ccreating this big table w...