search for: variable3

Displaying 20 results from an estimated 32 matches for "variable3".

Did you mean: variables
2010 Feb 26
3
Preserving lists in a function
..., we discovered that R does not necessarily preserve the defaults if we were to input them in the form of list() when initializing the function. For example, if you feed the function codes below into R: myfunction=function( list1=list (variable1=1, variable2=2, variable3=3), list2=list (variable1="variable1", variable2="variable2", variable3="variable3"), list3=list (variable1="character", variable2=24, variable3=c(0.1,0.1,0.1,0.1), va...
2012 Jan 02
4
Create variable with AND IF statement
Hello, I'm using SPSS at work but really would like to switch to R. Right now I'm trying to learn R in reproducing calculations I did with SPSS but am stuck with something that is quite simple and comprehensible in SPSS-Syntax: IF (variable1.fac = 0 AND variable2.num = 0) variable3=1. IF (variable1.fac = 0 AND variable2.num >= 1) variable3=2. IF (variable1.fac = 1 AND variable2.num = 0) variable3=3. IF (variable1.fac = 1 AND variable2.num >= 1) variable3=4. I want to create four different groups out of different conditions of two variables: * variable1.fac is a facto...
2011 Apr 18
4
altering identity column
...ual to 60,001 regarding the very first identity column. So I have a transformed dataframe now including 10,000 obeservations (from 60,001 - to 70,000) and if you send "head(transformed_dataframe)" into R it looks like this: variable1 variable2 variable3 variable4 ... 60 001 ... ... ... ... 60 002 ... ... ... ... 60 003 ... ... ......
2011 Apr 07
3
Correlation Matrix
...ild a correlation matrix of an entire data frame. I simply use the command cor(MyDataFrame). However, what I would like to do is construct a smaller correlation matrix using just three of the variable out of my data set. When I run this: cor(MyDataFrame$variable1, MyDataFrame$variable2,MyDataFrame$variable3) I get an error. Is there a way to do this through a built in function or is this something I have to construct manually? Thanks [[alternative HTML version deleted]]
2009 Dec 04
2
Multiple Channel Variables with AMI Originate
...guys I seem to be having a problem, I don't know if it's a bug or whether I'm just doing it incorrectly. I want to set about 3 channel variables when I originate a call via AMI. All the documentation I have found says to do it like this: Variable: variable1=value|variable2=value|variable3=value However when I do this it runs them all together and I end up with: variable1 = "value|variable2=value|variable3=value" Instead of: variable1 = "value" variable2 = "value" variable3 = "value" So I think the delimiters are not wor...
2012 Jul 09
4
Skipping lines and incomplete rows
I have a text file that has semi-colon separated values. The table is nearly 10,000 by 585. The files looks as follows: ******************************************* First line: Skip this line Second line: skip this line Third line: skip this line variable1 Variable2 Variable3 Variable4 Unit1 Unit2 Unit3 10 0.1 0.01 0.001 20 0.2 0.02 0.002 30 0.3 0.03 0.003 40 0.4 0.04 0.004 ***************...
2006 Sep 24
2
printing a variable name in a for loop
Hello, How do you print a variable name in a for loop? I'm trying to construct a csv file that looks like this: Hello, variable1, value_of_variable1, World, Hello, variable2, value_of_variable2, World, Hello, variable3, value_of_variable3, World, Using this: for (variable in list(variable1, variable2, variable3)){ cat("Hello,", ???variable???, variable, ", World,") } This works fine if I'm trying to print the VALUE of variable, but I want to print the NAME of variable as well. Th...
2010 Sep 01
8
how to replace NA with a specific score that is dependant on another indicator variable
...st be a neater, better way of doing it. Any ideas at all will be much appreciated, I’m dreading coding up all those if statements!!!!! My problem is as follows: I have a data set with lots of missing data: EG Raw Data Set Category variable1 variable2 variable3 1 5 NA NA 1 NA 3 4 2 NA 7 NA etc Now I want to replace the NA’s with the average for each category,...
2009 Jan 29
1
Multiple tables
Dear list, I have a set of 100+ variables. I would like to have one by one crosstables for each variable. I started with table(variable1, variable2) table(variable1, variable3) table(variable1, variable4) ... table(variable2, variable3) table(variable2, variable4) ... It seems rather tedious. Any better ideas around? Thanks for any help! Gerit -- NUR NOCH BIS 31.01.! GMX FreeDSL - Telefonanschluss + DSL f?r nur 16,37 EURO/mtl.!* http://dsl.gmx.de/?ac=OM.AD.PD003K113...
2008 May 05
1
Is there any way to find out how a certain functions are implemented in R?
...any way that I can get the actual codes that implement functions in R so that I can translate them into other languages? For example, after I generate bootstrap samples in C, I want to simplify the new dataset just like I did it in R using "aggregate(data$variable1, list(data$variable2,data$variable3), length) or aggregate(data$variable1, list(data$variable2,data$variable3), sum) etc". How could I do that in C and is there any way to find out how it is implemented in R? Thank you. Kyeongmi Univ. Memphis
2012 Feb 20
0
repeating or looping within an apply statement to handle multiple variables
Dear R experts, I would like to please ask for your help with repeating steps in an apply statement. I have a dataframe that lists multiple variables for a given id and visit, as well as drug treatment. > head(exp) id visit variable1 variable2 variable3 variable4 drug 1 3 1 13 10 7 11 0 2 3 5 10 15 9 9 0 3 3 12 9 10 8 8 0 4 7 1 12 8 9 8 1 5 7 5 16 9 3 10 1 6 7...
2011 Mar 28
2
deleting the first two characters in each row of a factorized column
Hello, I'd like to ask you something again. I have a database and it has a column which looks like this one here: small_factor <- factor(c("d_variable1","d_variable2","d_variable3")) small_factor Now the thing is that I would like to convert each element of this factorized column. Basically I want to rewrite the words in it without the first two characters: "d" and "_" and I would like to get the followings as a result: "variable1", "...
2006 Apr 11
2
variable-substitution / command-substitution
Hello, I have about 2000 data files which I want to analyse. The file names are all very similar => p"variable1"_t"variable2"_c"variable3".txt There aren?t so much different variables (about 70) , just different combinations of them. To allow an easy way of handling those data files I was wondering whether R is able to do variable-substitution /command-substitution similar to shell-programming, so that I could imbed the read....
2009 Dec 01
3
Using two (...) in a function
...nce1 else if (caracteristica == variable2) variance2 else ... } } but to turn this in a function, I would like to replace ("DAP", "ALT") by any variable and var1, var2 to any variance, and not only necessary 2, for example data ("variable1","variable2","variable3", "variance1", "variance2", "variance3") I am not sure if I made myself clear and if this is an "answerable" doubt, anyway thank you vey much M?rcio -- View this message in context: http://n4.nabble.com/Using-two-in-a-function-tp932200p932200.html Sent...
2012 Apr 04
2
cluster analysis with pairwise data
Hello, I want to do a cluster analysis with my data. The problem is, that the variables dont't consist of single value but the entries are pairs of values. That lokks like this: Variable 1: Variable2: Variable3: . . . (1,2) (1,5) (4,2) (7,8) (3,88) (6,5) (4,7) (12,4) (4,4) . . . . . . . . . Is it possible to perform a cluster-analysis with this kind of data in R ?...
2012 Apr 02
5
Usando R CMD BATCH no me funciona savePlot()
...ormato pdf. Concretamente éste es el código: > savePlot(filename = ruta_pdf, type = "pdf", device = dev.cur(), restoreConsole = TRUE) Este comando está dentro de un bucle de "n" ejecuciones, por lo que guardo un pdf por cada variable que trabajo: variable1.pdf, variable2.pdf, variable3.pdf... Sin embargo, estoy empezando a meterme en automatización de procesos en R, para lo cual lanzo un script desde Windows a través de la ejecución de R en la consola de DOS ("CMD BATCH script.r"), es decir, sin abrir Rgui en Windows. El problema es que como no abro R en Windows, no exi...
2006 May 17
9
Render No Layout?
Hi guys, Am having a problem. I have this def in my index controller that works like this: def do_something $a = variable1 $b = variable2 $c = variable3 $d = ""<script language=\"Javascript\"> \n new Insertion.Bottom(''#{$c}'', ''#{$a} - #{$b}''); \n </script>" $trigger = "1" render(:partial => "do_something") end on my do_something.rhtml, my code is th...
2003 Apr 27
0
Radius app ?
...e could be done so theft of time doesn't occur. basically.. send to radiusauth(variable1,variable2) retunrs auth (yes/no) send to radiusstart(variable1,variable2) returns auth yes/no returns number of minutes (being number of minutes or charge units left) send to radiusstop(variable1,variable3) variable1 = session-id (identifying user) variable3 = number of units used Gary .
2012 Jan 22
1
how to load R data file into a structure?
...ve.image"... But how do I avoid the newly loaded data/variables messing with my existing data/variables? In Matlab, I can do: mynewdata=load("imagefromlastRsession.rData") and then I can access the variables therein as follows: mynewdata.variable1 mynewdata.variable2 mynewdata.variable3 ... ... ... As you can see, this way, these variables won't interfere with my existing variables in the current R session... How to do that? Thanks a lot! [[alternative HTML version deleted]]
2009 Apr 16
0
incorrect handling of NAs by na.action with lmList (package nlme) (PR#13658)
....8.1 running under windows XP 32-bits. I have a data table with various columns corresponding to continuous variables as well as treatment variables taken on several years and several sites. Here is an example : Id year treatment A treatment B variable1 variable2 variable3 1 1 0 0 6.47 3.76 NA 2 1 0 1 3.23 2.15 NA 3 1 1 0 NA...