Displaying 20 results from an estimated 60 matches for "new2".
Did you mean:
new
2010 Jun 01
1
loop
Can any one help it will be very kind, loop statements
I have this table and some more records, I want to reshape it
V1 V2 V3 V4 V5 V6 V7 V8 V9 V10
TP53 Dis1 Dis2 Dis3 Dis4 Dis5 Dis6
DCI New1 New2 New3 New4
FDI Hi2 H3 H4
GHD I1 I3 I4 I5 I6 I7 I8
I want my new table or matrix to be some thing like this
V1 V2 V3
Tp53 Dis1 Dis2
Tp53 Dis1 Dis3
Tp53 Dis1 Dis4
Tp53 Dis1 Dis5
Tp53 Dis1 Dis6
Tp53 Dis2 Dis3
Tp53 Dis2 Dis4
Tp53 Dis2 Dis5
Tp53 Dis2 Dis6
Tp53 Dis3 Dis4
Tp53 Dis3 Dis5
Tp53 Dis3 Dis6
Tp...
2011 Sep 23
4
replace multiple string
Hi
I would like to use a bash script that searches files and
subdirectories name in a directory /var/ww/html/web
for a specific string, and when it finds the search string, replaces
the string (old1) with new string (new1), and so on
old2 with new2 ....oldn with newn.
replace_string.sh
#!/bin/bash
for db in $(find /var/www/html/web -name * -exec)
do
sed -e "s/old1/new1/" \
sed -e "s/old2/new2/" \
...
sed -e "s/oldn/newn/" $db
done
Any recommendation..
Thanks
pons
2010 Mar 17
1
Cropped graph using lattice
...no-resin)
pseudo$hardness <- paint$hardness
m1 <- lm(hardness~(mono+cross+resin)^2-mono, data=pseudo)
trian <- expand.grid(base=seq(0,1,l=100*2), high=seq(0,sin(pi/3),l=87*2))
trian <- subset(trian, (base*sin(pi/3)*2)>high)
trian <- subset(trian, ((1-base)*sin(pi/3)*2)>high)
new2 <- data.frame(cross=trian$high*2/sqrt(3))
new2$resin <- trian$base-trian$high/sqrt(3)
new2$mono <- 1-new2$resin-new2$cross
trian$yhat <- predict(m1, newdata=new2)
grade.trellis <- function(from=0.2, to=0.8, step=0.2, col=1, lty=2, lwd=0.5){
x1 <- seq(from, to, step)
x2 <-...
2007 Oct 12
1
use 'lapply' to creat 2 new columns based on old ones in a data frame
There is a dataset 'm', which has 3 columns: 'index', 'old1' and 'old2';
I want to create 2 new columns: 'new1' and 'new2' on this condition:
if 'index'==i, then 'new1'='old1'+add[i].
'add' is a vector of numbers to be added to old columns, e.g. add=c(10,20,30
...)
Like this:
index old1 old2 new1 new2
1 5 6 15 16
2 5...
2008 Jul 09
2
sorting a data frame by rownames
...sub1<-subset(ex.dat, c=="1")
#put it back together; in my case, pull out the parts of the list generated
by the loop that hold the data
newdat<-rbind(sub3, sub2, sub1)
#rebuild it such that it can be re-organized into it's original order
rn<-as.numeric(row.names(newdat))
new2<-data.frame(newdat, rn)
new3 = new2[do.call(order, new2["rn"]), ]
######################
It's those last three lines of code that I'm sure are unnecessary; why
include a column of information for something that's already there? However,
most of the posted solutions to so...
2006 Jun 10
3
RJS & nested divs
...a newbie and I''ve been trying to figure this out for a little while
now, hopefully someone can point me in the right direction.
case1
<div id="new">
</div>
case2
<div id="new"><div id="item1"></div></div>
<div id="new2"><div id="item1"></div></div>
With RJS in case1, I can access "new" with page[''new'']. What would the
RJS syntax be if I wanted to access "item1" in "new2"?
--
Posted via http://www.ruby-forum.com/.
2010 Feb 16
3
Triangular filled contour plot
Hi all,
I am working on a filled contour plot which shows a triangular matrix data
set (as shown below). Is there a possibilty to draw a triangular filled
contour in a equilateral triangle (like a ternary plot)?
Thanks in advance
Johannes
http://n4.nabble.com/file/n1557386/Bild3.png
--
View this message in context: http://n4.nabble.com/Triangular-filled-contour-plot-tp1557386p1557386.html
2009 Jul 30
1
lmer() and "$ operator is invalid for atomic vectors"
...frame(lamda, age.o_1, Item.l2_2,Subject)
new
Subject <- factor(Subject)
Age <- factor(age.o_1,levels=c("0","1"),labels=c("young","old"))
Item <- factor(Item.l2_2,levels=c("1","2"),labels=c("lamda1","lamda2"))
new2<-data.frame(lamda, Subject, Age, Item)
new2
new3 <- na.omit(new2)
new3
new4=as.data.frame(new3)
> (lmer.lamda <- lmer(lamda ~ Age*Item + ( 1 | Subject), lamda, data=new4))
Error in family$family : $ operator is invalid for atomic vectors
Here are the first 25 values of the datafram...
2008 May 15
2
How to remove autocorrelation from a time series?
...auto-correlation from a frequencies time series?
I've tried by differencing (lag 1) the cumulative series (in order to have only positive numbers) , but I can't remove all auto-correlation.
If it's useful I can send my db.
x <- # autocorrelated series
new1<-cumsum(x)
new2<-diff(new1,lag=1,differences = 1)
acf(new2) # remains autocorrelated
Thanks in advance
Ciao
Claudia
___________________________________
Scopri i
http://www.ymailblogit.com/blog/
2012 Feb 09
2
fill an array by rows
I've dug around but not been able to find anything, am probably missing
something obvious.
How can I fill a three-dimensional (or higher dimension) array by rows
instead of columns.
eg
new1 <- array(c(1:125), c(5,5,5))
works fine for me but fills it by columns and
new2 <- array(c(1:125), c(5,5,5), byrow=TRUE)
throws an error.
Am I missing something obvious? I also tried transposing the 3-d array
but that didn't work either.
TIA
Jim
--
Dr. Jim Maas
University of East Anglia
2012 Sep 18
2
Formula in a data-frame
Hello all,
I'm new in R, and I have a data-frame like this (dput information below):
Specie Fooditem Occurrence Volume
1 Schizodon vegetal 1 0.05
2 Schizodon sediment 1 0.60
3 Schizodon vegetal 1 0.15
4 Schizodon alga 1 0.05
5 Schizodon sediment 1 0.90
6 Schizodon
2009 Jul 01
4
mbox format and UIDVALIDITY
...RE QRESYNC
ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH] Logged in
a2 list "" %
* LIST (\NoInferiors \UnMarked) "/" "Sent"
* LIST (\HasNoChildren \UnMarked) "/" "INBOX"
a2 OK List completed.
a3 create new1
a3 OK Create completed.
a4 create new2
a4 OK Create completed.
a5 select new1
* FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
* OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft \*)]
Flags permitted.
* 0 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 1] UIDs valid
* OK [UIDNEXT 1] Predicted next UID
* OK [HIGHESTMODSEQ 1]...
2012 Aug 28
4
predict.lm(...,type="terms") question
...pred <- predict(model, type = "terms", newdata = new)
#error
pred <- predict(model, type = "terms", newdata = new, se.fit = TRUE)
#error
pred <- predict(model, type = "terms", newdata = new, interval =
"prediction") #error
new2 <- data.frame(area = c(8172, 10220, 11570, 24150), concn = 0)
new2
pred <- predict(model, type = "terms", newdata = new2)
#wrong results
Can someone please show me what I'm doing wrong?
2008 Jun 10
2
convert characters into integers in a matrix
...problem. I have a matrix of
characters "A", "P", "M".
I want to convert those characters to integers 0,1, 1 respectively. I am
using the following R statements:
exprs.new<-gsub("P",1,exprs)
exprs.new1 <- gsub("A",0,exprs.new)
exprs.new2 <- gsub("M",1,exprs.new1)
The replaced integers are stored as characters and I cannot find a way to
convert the matrix to an integer matrix.
Thanks
manisha
[[alternative HTML version deleted]]
2008 Jul 25
0
nlminb--lower bound for parameters are dependent on each others
...xample,
param1>=0, param1 + param2*c1>=0 (c1 is a known positive constant)
When I wrote my program as:
...
myfunction1 <-function(param ){..}
myfunction2 <-function(param ){..}
#param1=param[1]
#param2=param[2]
...
while (difference.Params>eps){
...
res1 <- nlminb(param.new2, myfunction1, lower = c(0, -c1/res1$par[1]),
upper = Inf)
param.new1<-res1$par
res2 <- nlminb(param.new1, myfunction2, lower = c(0, -c1/res2$par[1]),
upper = Inf)
param.new2<-res2$par
difference.Params <-max(abs(param.new1-param.new2))
}
I got error message:
Error in -res1$par[1]...
2011 Oct 13
3
nls: singular convergeance
...1*Cd)*A+(Cmin-Cb)*exch)
/(0+const1*A+exch))
}
t.new <- t - trans
pt2 <-
exp(-(t.new*(R+const1*A+exch))/V)*(((Ci*R+const1*Cd*A+Cb*exch)
*exp((t.new*(R+const1*A+exch))/V))/
(R+const1*A+exch)+((Cmin.new-Ci)*R+(const1*Cmin.new-const1*Cd)*A+(Cmin.n
ew-Cb)*exch)/(R+const1*A+exch))
Cmin.new2 <-
exp(-((trans2-trans)*(R+const1*A+exch))/V)*(((Ci*R+const1*Cd*A+Cb*exch)
*exp(((trans2-trans)*(R+const1*A+exch))/V))/
(R+const1*A+exch)+((Cmin.new-Ci)*R+(const1*Cmin.new-const1*Cd)*A+(Cmin.n
ew-Cb)*exch)/(R+const1*A+exch))
t.new <- t - trans2
pt3 <-
exp(-(t.new*(0+const1*A...
2011 Feb 15
3
[LLVMdev] Possible LLVM or DragonEgg bug
....so.2.0.0 ../../lib/libcvhaartraining.a ../../lib/libhighgui.so.2.0.0 ../../lib/libcv.so.2.0.0 ../../lib/libcxcore.so.2.0.0 ../../3rdparty/lib/libopencv_lapack.a ../../3rdparty/lib/libzlib.a ../../3rdparty/lib/libflann.a -ldl -lm -lpthread -lrt -lgomp -Wl,-rpath,/home/Gytis/Documents/Project/OpenCV/new2/OpenCV-2.0.0/bin/lib:
../../lib/libcv.so.2.0.0: undefined reference to `_mm_cvtsd_si32(double __vector)'
collect2: ld returned 1 exit status
As I understand the linker can not find intrinsic SSE2 function "_mm_cvtsd_si32" while trying to link "opencv_createsamples" execu...
2006 Apr 26
5
Best way to split forms into steps?
I have a form with about 30+ fields, which the client is wanting to
separate into 3 pages/steps - just wondering what is the best way to go
about this, specifically remembering data entered, from one page to
another, and making sure the various bits of data are validated
correclty, error messages outputted etc etc...
is there a best practice method for doing this?
--
Posted via
2009 Apr 09
2
failed when merging two dataframes, why
...1810
BCPy01-02 BCPy01-02-2 0.6710850
BCPy01-02 BCPy01-02-2 0.7145839
BCPy01-02 BCPy01-02-3 0.9515256
BCPy01-02 BCPy01-02-3 0.6555006
BCPy01-03 BCPy01-03-1 0.8683875
code:
new1<-merge(df1,df2,by=c("popcode","popcode"),all=T) # It is processed well.
But, it is not what I want.
new2<-merge(df1,df2,by=c("codetot","codetoto"),all=T) # this one failed. I
exactly want to do that.
Mao J-F
IBCAS, AC
[[alternative HTML version deleted]]
2006 Jul 18
1
Need Help Updating Records
...the actual DB record instead?
def add_missing_zips
#find all records in source table that don''t have zip codes
no_zips = Source.find(:all, :conditions => [ "zipcode = ?", (nil ||
'''') ])
@starting_no_zips = no_zips.length
server = XMLRPC::Client.new2("http://geocoder.us/service/xmlrpc")
no_zips.each do |r|
result = server.call("geocode", r.full_address)
#update the record in the Source table if a zip code is found
unless (result.empty? || result[0]["zip"] == ('''' || nil))...