search for: state1

Displaying 20 results from an estimated 44 matches for "state1".

Did you mean: state
2018 Feb 09
1
Optim function returning always initial value for parameter to be optimized
Hello, I'm trying to fminimize the following problem: You have a data frame with 2 columns. data.input= data.frame(state1 = (1:500), state2 = (201:700) ) with data that partially overlap in terms of values. I want to minimize the assessment error of each state by using this function: err.th.scalar <- function(threshold, data){ state1 <- data$state1 state2 <- data$state2 op1l <- length(state...
2009 Aug 01
2
Add columns in a dataframe and fill them from another table according to a criteria
...below;- I have table called States.Prob which is given below:- This table gives the probabilities of the changes in the swap curve depending on the state of the swap curve. I want to put these probabilities in my dataframe mydata(given after the prob table). Prob of States Changes State1 State2 State3 State4 a Pa1 Pa2 Pa3 Pa4 b Pb1 Pb2 Pb3 Pb4 c Pc1 Pc2 Pc3 Pc4 d Pd1 Pd2 Pd3 Pd4 and I have a dataframe(with 93 rows) called mydata part of which(6 rows) is given below where I want to...
2011 Nov 15
1
Remove thw data from the dataframe
Hi, I want to remove the entire row from the dataset if any of the row contains blank or NA my dataset look like State Year Y X2 X3 X4 X5 X6 State1 1960 27.8 397.5 42.2 50.7 78.3 65.8 State2 1960 29.9 413.3 38.1 52 79.2 66.9 State1 1961 29.8 439.2 40.3 54 79.2 67.8 State2 1961 30.8 459.7 39.5 79.2 69.6 State1 1962 31.2 492.9 37.3 54.7 77.4 68.7 State2 1962 528.6 38.1 80.2 73.6 State1 1963 35.6 560.3 39.3 69.8 80.4 76.3 State2 1963 36.4 624....
2012 Mar 27
1
help in replacing for llop
Hi I have records like like this X1 X2 State 34 72 state1 9 63 state1 49 31 state1 60 34 state1 80 73 state1 60 20 state2 59 87 state2 88 20 state2 71 66 state2 65 56 state2 59 16 state1 60 100 state2 I want to get the summarize value like mean median histogram for X1 and X2 based on state. I'm using FOR loop for this. Is there any method to remove...
2011 Dec 06
1
making changes to global variables in functions
I'm trying to write a function that takes several objects with many different attributes and then changes their attributes. So what I wanted to happen in the simplified example below is for the function to change the attributes of the objects state1 and state2 that are passed to it. But because stateA and stateB are local, this isn't working. Are there any easy solutions? e.g., if I could combine the two objects stateA and stateB into a single object, I could return it and then assign it back to objects state1 and state2. Or if I could pa...
2018 Feb 10
0
Optim function returning always initial value for parameter to be optimized
On 02/10/2018 06:00 AM, r-help-request at r-project.org wrote: > Did you check the gradient? I don't think so. It's zero, so of course > you end up where you start. > > Try > > data.input= data.frame(state1 = (1:500), state2 = (201:700) ) > err.th.scalar <- function(threshold, data){ > > state1 <- data$state1 > state2 <- data$state2 > > op1l <- length(state1) > op2l <- length(state2) > > op1.err <- sum(state1 <= threshold)/op1...
2009 Jul 31
1
Fill dataframe from a table according to a criteria
Deare R users I am new to R. What I want to do is explained below;- I have table called States.Prob which is given below Prob of States Changes State1 State2 State3 State4 A Pa1 Pa2 Pa3 Pa4 B Pb1 Pb2 Pb3 Pb4 C Pc1 Pc2 Pc3 Pc4 D Pd1 Pd2 Pd3 Pd4 and I have a dataframe called mydata which is given below where I want to fill in the last four columns...
2011 Dec 19
2
summary vs anova
...his is simple, but I haven't been able to find this in TFM, say I have some data in R like this (pasted here: http://pastebin.com/raw.php?i=sjS9Zkup): > head(df) gender age smokes disease Y 1 female 65 ever control 0.18 2 female 77 never control 0.12 3 male 40 state1 0.11 4 female 67 ever control 0.20 5 male 63 ever state1 0.16 6 female 26 never state1 0.13 where unique(disease) == c("control", "state1", "state2") and unique(smokes) == c("ever", "never", "", "current") I t...
2019 Nov 20
1
virsh snapshot-create --print-xml seems to ignore most arguments
...the first one includes additional options (no-metadata and atomic). I want to use the generated XML to create a snapshot via a perl script, and Sys::Virt only seems to support snapshots using a XML description of the arguments. timos@cerberus:~$ sudo virsh snapshot-create-as --domain web guest- state1 --diskspec hda,file=overlay1.qcow2 --disk-only --atomic --no- metadata --print-xml <domainsnapshot> <name>guest-state1</name> <disks> <disk name='hda'> <source file='overlay1.qcow2'/> </disk> </disks> </domainsna...
2005 May 24
1
rsync incorrectly deletes files ?
rsync -e 'ssh -x' --log-format="%o /%n %b" -tLr --delete --files-from=files-to-sync --exclude-from=files-to-exclude user@host:/ /temp/ del. /etc/mail/spamfilter/mx1/whitelist.conf 0 del. /etc/mail/spamfilter/mx1/blacklist.conf 0 recv /etc/mail/spamfilter/mx1/ 0 recv /etc/mail/spamfilter/mx1/blacklist.conf 211 recv /etc/mail/spamfilter/mx1/whitelist.conf 924 Why does rsync
2010 Nov 03
0
[LLVMdev] Fw: Forcing the Interpreter segfaults
...being transmitted to the function right. If it is getting the wrong pointer value, that would explain why it barfs. Ciao, Duncan. > This segfaults : > define i32 @llvmre_1(i8* %str) { > entry: > %char = load i8* %str > %cond = icmp eq i8 %char, 97 > br i1 %cond, label %State1, label %End > > State1: ; preds = %entry > br label %End > > End: ; preds = %State1, %entry > %retPtr.0 = phi i32 [ 1, %State1 ], [ 0, %entry ] > ret i32 %retPtr.0 > } > > I...
2011 Jul 27
1
To Merge or to use Indicator Variables?
Greetings all, I have two sets of data that I would like to investigate. The first is gene/genome related data given different 'cell-states'. The second set of data is relates the genes to a biological pathway. /(I think in pictures so here goes.)/ *dataframe1* gene, cell-state1, cell-state2 gene1, x1, y1 gene2, x2, y2 gene.x, ..., ... *dataframe2* pathway1, gene-x1, gene-x2, ... pathway2, gene-y1, gene-y2, ... What I want to do is, see if 'cell-state1' (in-)activates different genes / pathways from 'cell-state2.' Furthermore, I would like to test for cor...
2009 Jul 14
2
SOS! error in GLM logistic regression...
...ld anybody tell me what happened to my logistic regression in R? mylog=glm(mytraindata$V1 ~ ., data=mytraindata, family=binomial("logit")) It generated the following error message: Error in model.frame.default(Terms, newdata, na.action = na.action, xlev = object$xlevels) : factor 'state1' has new level(s) AP Thank you!
2004 Apr 29
3
Dummies in R
...ty=0 replace city=1 if city==12&year==2000 and (2) Create a Time-Dummy-Variable g byte T2000=0 replace T2000=1 if year==2000 (3) I need the City DUmmy for the following combination: I have the financial flows between two cities in the state and I need the paired-Dummy for the exporter (state1) and importer (state2): g byte city11=0 replace city11=1 if state1==12¦state2==12 (4) I am interesting in residuals for particular city==12. I have the Dummy for City==12 and regress it on Y-Variable. How could I extract from the output in R the residulas for city==12 (1) to plot this residuals...
2010 Nov 03
4
[LLVMdev] Fw: Forcing the Interpreter segfaults
[I assume you meant to send this to the list as well, not just me.] Begin forwarded message: Date: Wed, 3 Nov 2010 14:43:54 +0000 From: Salomon Brys <salomon.brys at gmail.com> To: Török Edwin <edwintorok at gmail.com> Subject: Re: [LLVMdev] Forcing the Interpreter segfaults I have build LLVM in debug mode. Here are the informations of the segfault : memcpy() at 0x7ffff6f6581e
2001 Mar 16
1
combine dataset
Hi, I have two data sets look like below: ========================== state count1 percent1 CA 19 0.34 TX 22 0.35 FL 11 0.24 OR 34 0.42 GA 52 0.62 MN 12 0.17 NC 19 0.34 state count2 percent2 FL 22 0.35 MN 22 0.35 CA 11 0.24 TX 52 0.62 ========================== How to combine these two data set and make it look like below?
2009 Dec 01
1
LMER: How to specify Random Effects
I saw different specifications for Random Effects and I'm confused about the use of "/" and the use of "(0+...|)" . Let say we have a nested structure where some countries have some several plants in different states and we measure the reaction to a drug. The list of Countries = USA, France, Italy The States for USA = Michigan, Florida, California The States for France
2012 Jun 28
1
undefined S4 class in parallel computing at snowfall
...tClass("dogg", representation(bb = 'character', cc = "catt")) f1 <- function(y1) { new('catt', aa = y1 + 1) } f3 <- function(y2, y3) { new('dogg', bb=c(y2, 'GA'), cc = f1(y3)) } dat <- 1:5 f1(dat) f3('NY', dat) sapply(c("state1", 'state2', 'state3'), f3, dat) sfExportAll() sfClusterEval(ls()) sfSapply(c("s1", 's2', 's3'), f3, dat) sfStop() # sfSapply generates the following error # Error in checkForRemoteErrors(val) : # 2 nodes produced errors; first error: &quot...
2019 Apr 25
1
Live Disk Backup with Active Blockcommit
...; and then 'base.img'? I also saw another name that seems to be wrong based on the context. It doesn't have the same implication as my earlier example, as the name of the overlay file is not written in the command itself, but still: ------ $ virsh snapshot-create-as --domain vm1 guest-state1 \ --diskspec vda,file=/export/images/overlay1.qcow2 \ --disk-only --atomic Then: $ virsh domblklist vm1 Target Source ------------------------------------------------ vda /export/images/overlay.qcow2 Now that the backup is finished, perform active blockcommit by live mergning c...
2009 Jul 28
1
Sort a column in a dataframe
...5.3562 4 3.6457 3.6913 3.7725 3.8669 3.9410 5 5.3050 5.3575 5.4450 5.5425 5.6300 6 4.1230 4.1650 4.2360 4.3170 4.3960 DMSW30Curncy.x EUSA40Curncy.x EUSA50Curncy.x spread.x level.x State1 State2 1 4.8925 4.8400 4.7975 2.0005 4.006772 NA NA 2 4.2890 4.2460 4.2040 0.1640 4.165147 NA NA 3 5.3412 5.2913 5.2638 1.2602 4.792737 NA NA 4 3.9840 3.9760 3.9560 0.8168 3.550524...