Displaying 20 results from an estimated 74 matches for "name3".
Did you mean:
name
2017 Jul 16
3
Arranging column data to create plots
Dear All,
I need some help arranging data that was imported.
The imported data frame looks something like this (the actual file is huge, so this is example data)
DF:
IDKey X1 Y1 X2 Y2 X3 Y3 X4 Y4
Name1 21 15 25 10
Name2 15 18 35 24 27 45
Name3 17 21 30 22 15 40 32 55
I would like to create a new data frame with the following
NewDF:
IDKey X Y
Name1 21 15
Name1 25 10
Name2 15 18
Name2 35 24
Name2 27 45
Name3 17 21
Name3 30 22
Name3 15 40
Name3 32 55
With the data like this I think I can do the following
g...
2017 Jul 16
0
Arranging column data to create plots
...s the sample data
since you say you have already imported it.
> The imported data frame looks something like this (the actual file is
> huge, so this is example data)
>
> DF:
> IDKey X1 Y1 X2 Y2 X3 Y3 X4 Y4
> Name1 21 15 25 10
> Name2 15 18 35 24 27 45
> Name3 17 21 30 22 15 40 32 55
That data is missing in X3 etc, but would be NA in an actual data frame,
so I don't know if my workaround was the same as your workaround. Dput
would have clarified the starting point.
> I would like to create a new data frame with the following
>
> N...
2006 Jan 20
3
Selecting data frame components by name - do you know a shorter way?
Hi! I suspect there must be an easy way to access components of a data frame by name, i.e. the input should look like "name1 name2 name3 ..." and the output be a data frame of those components with the corresponding names. I ´ve been trying for hours, but only found the long way to do it (which is not feasible, since I have lots of components to select):
dframe[names(dframe)=="name1" | dframe=="name2" |...
2008 May 25
3
naming components of a list
...;)
> V
[1] "Fred" "Mary" "SAM"
> class(V)
[1] "character"
I would like to change it to a list:
> L=as.list(V)
> L
[[1]]
[1] "Fred"
[[2]]
[1] "Mary"
[[3]]
[1] "SAM"
but I need to name the components as name1, name2, name3, …
so it should look like this:
$name1
[1] "Fred"
$name2
[1] "Mary"
$name3
[1] "SAM"
Any help will be much appreciated
Joseph
[[alternative HTML version deleted]]
2001 May 23
1
Passing a string variable to Surv
...ept they have a max string length
of 7. Examples are mcw0045, adl0003, lei0101.
Now, what I want to do is
Function(M1, M2, M3, datafile)
{
xnew <- readtable(datafile)
name1 <- paste("time",M1",sep"")
name2 <- paste(status",M1,sep"")
name3 <- paste("x",M1,sep"")
fit1 <- survfit(Surv(name1,name2)~name3,data=xnew)
.
.
repeat for M2 and M3
.
.
par(mfcol=c(1,3))
plot(fit1)
plot(fit2)
plot(fit3)
}
When I try to pass name1 into the Surv function it give the following
error...
2020 Jul 23
5
Off Topic bash question
...d -r LINE
do
NODENAME=` echo $LINE | cut -f 1 -d ','`
IP=` echo $LINE | cut -f 2 -d ','`
names[index]="$NODENAME"
ip[index]="$IP"
index=`expr index+1`
total=`expr total+1`
done <<< $(cat list.txt)
simple file:
more list.txt
name1,ip1
name2,ip2
name3,ip3
output when running:
sh -x ./test_bash.sh
+ index=0
+ total=0
+ names=()
+ ip=()
++ cat list.txt
+ read -r LINE
++ echo name1,ip1 name2,ip2 name3,ip3
++ cut -f 1 -d ,
+ NODENAME=name1
++ echo name1,ip1 name2,ip2 name3,ip3
++ cut -f 2 -d ,
+ IP='ip1 name2'
+ names[index]=name1
+ ip[ind...
2010 May 26
1
Xen guest does not autostart
...oblem: one of the guests does not
start automatically after reboot.
[root at farm1 xen]# pwd
/etc/xen
[root at farm1 xen]# ls -l auto
total 0
lrwxrwxrwx 1 root root 8 Dec 11 17:25 name1 -> ../name1
lrwxrwxrwx 1 root root 8 May 5 21:10 name2 -> ../name2
lrwxrwxrwx 1 root root 8 Nov 26 11:43 name3 -> ../name3
lrwxrwxrwx 1 root root 6 Oct 29 2009 name4 -> ../name4
(I retyped the names there.)
[root at farm1 xen]# ls -l
total 88
drwxr-xr-x 2 root root 4096 Apr 3 15:15 auto
-rw------- 1 root root 430 Dec 11 13:14 name1
-rw------- 1 root root 610 May 7 12:07 name2
-rw------- 1 root...
2017 Jun 04
2
Warning from reshape2 when melting a data frame with uneven number of columns.
Here is a small reproducible example:
data <-
structure(list(V1 = structure(1:3, .Label = c("Name1", "Name2",
"Name3"), class = "factor"), V2 = structure(c(1L, 3L, 2L), .Label =
c("nam1",
"name-1", "name_12"), class = "factor"), V3 = structure(1:3, .Label =
c("nam2",
"nam_34", "name-2"), class = "factor"), V4 = structur...
2006 Nov 29
1
Extract some character from a character vector of length 1
the content of th character vector (of length 1) is as follows:
a <- "something2 ....pat1 name1 pat2 something2....pat1 name2
pat2....pat1 name3 pat2 "
I would like to extract the character bewteen pat1 and pat2. That's to
say, I would like to get a vecter of c("name1", "name2","name3").
What I did is use strsplit() twise. But I wonder if there any function
to this specific task?
Thanks.
2012 Mar 17
2
Reading then transposing from file
Hi,
I'm an R beginner and I'm struggling with what should be a rudimentary task.
My data is along these lines:
ID name1 name2 name3 name4
Class 0 1 0 2
Var1 A B C A
Var2 B C C A
Var3 C A B A
etc.
I'm using the following:
foo <- data.frame(t(read.table("file", header=FALSE)))
but of course now it's not using ID, Class, etc. as column names.
As you can imagine, I'd like to be able to use, say, foo$Va...
2017 Jun 04
0
Warning from reshape2 when melting a data frame with uneven number of columns.
Is this the solution?
> d1<- as.data.frame(lapply(data,as.character),stringsAsFactors=FALSE)
> str(d1)
'data.frame': 3 obs. of 5 variables:
$ V1: chr "Name1" "Name2" "Name3"
$ V2: chr "nam1" "name_12" "name-1"
$ V3: chr "nam2" "nam_34" "name-2"
$ V4: chr "nam3" "nam_56" ""
$ V5: chr "" "name_78" ""
> melt(d1,id.vars="V1")...
2003 Aug 24
0
SunOS-5.8 / Samba-2.2.0 W2K3 Domain Shares
...hat has joined the campus wide W2K3
domain. I am currently in the process of trying to setup the smb.conf file
so that users of a W2K3 security group can access a single share on the
instrument. If this is pedestrian to ask, please forgive me.
W2K3 Security Group = [user.name1, user.name2, user.name3]
<smb.conf>
# Global parameters
[global]
workgroup = nsm
netbios name = NMR
server string = Varian NMR
security = DOMAIN
browseable = yes
client code page = 437
encrypt passwords = Yes
password server = nsm-dc10
userna...
2002 Jul 18
3
Oddity with names
Hi all,
I'm using R 1.5.1 on Windows 2000. The following snippet of code doesn't
seem to do anything - no error is reported, and there is no name change.
names(myFrame[,c(1:3)]) <- c("name1", "name2", "name3")
This code however works nicely:
names(myFrame)[c(1:3)] <- c("name1", "name2", "name3")
Can anyone suggest why the first doesn't work? Ought an error be reported?
Thanks,
Andrew
Andrew Robinson Phone: 208-885-7115
Department of Fore...
2012 Mar 16
1
R merge two dataframes with different row?
Hi everyone,
I have a question for R code to merge.
Say I have two dataframes:
File1 is:
V1 V2 V3 V4
1 100 101 name1
2 200 201 name2
2 300 301 name3
3 400 401 name4
3 500 501 name5
4 600 601 name6
4 700 701 name7
File2 is:
V1 V2 V3 V4
1 50 55 p1
3 402 449 p2
4 550 650 p3
4 651 660 p4
2 150 250 p5
2 250 350 p6
3 450 499 p7
2 100 250...
2000 Oct 16
2
renaming an object
...file called exp.batch which contains 2 cols
The first col contains names of R objects the user would like to use.
The second col contains the file names which will be read in using
read.table
i.e. exp.batch may look like this.....
name1 complex/filename/path1.txt
name2 complex/filename/path2.txt
name3 complex/filename/path3.txt
name4 complex/filename/path4.txt
I want to have a function which will read in the files and make them into
the objects named in the 1st column - automatically (by just providing
exp.batch)
for(i in 1:nrow(exp.batch)){
tmp<-read.table(as.name(exp.batch[i,2]),...)
##...
2010 Feb 10
4
Readjusting the OUTPUT csv file
...f XYZ. Thus, I am keeping the (input) file names constant but the contents of each of these input files may change from one case to another case.
As an example, my input files are as given below.
input1.csv
name1 value1
DEF 10
input2.csv
name2 value2
LMN 8
input3.csv
name3 value3
PQR 7
## __________________________________________________________________
## The Problem
name1 = read.csv('input1.csv')$name1
value1 = read.csv('input1.csv')$value1
name2 = read.csv('input2.csv')$name2
value2 = read.csv('input2.csv')$value2...
2006 Aug 11
1
Group By
Hi,
I have a table similar structure below.
id name position page
1 name1 1 1
2 name2 2 1
3 name3 3 1
4 name4 1 1
5 name5 1 1
6 name6 1 2
What i want is to select all the items for a given page number grouped
by pos and displayed in a view using a loop like:
display position number, number of records
for how many records have the same po...
2009 Jan 19
2
How to assign names in a list
...How can you associate names with a list when names have not been
assigned? For example if you have a list like this:
list2<-list(1,2,3)
list2
[[1]]
[1] 1
[[2]]
[1] 2
[[3]]
[1] 3
How do you make it look like this with names? :
f1<-1
f2<-2
f3<-3
list1<-list(name1=f1, name2=f2, name3=f3)
list1
$name1
[1] 1
$name2
[1] 2
$name3
[1] 3
Thanks for any help.
I expect there is a simple answer but I cannot find it ...
Regards
John
---
2009 Feb 26
0
How do I retrieve column and row names after comparing two matrices?
Hello, I have two matrices as shown below:
Matrix 1
ID AB1 BC1 CD1 ...
name1 1,1 2,1 0,2 ...
name2 2,0 1,2 1,2 ...
name3 0,2 1,1 2,0 ...
name4 2,0 0,2 0,2 ...
Matrix 2
ID AB2 BC2 CD2 ...
name1 1,1 2,1 0,2 ...
name2 2,0 1,2 1,2 ...
name3 0,2 1,0 2,0...
2008 Oct 22
0
Bug when importing datas with tcltk window (PR#13191)
...OpenFile())
if (!nchar(name2))
tkmessageBox(message="Aucun fichier n'a ?t? s?lectionn?!") else
tkmessageBox(message=paste("Vous avez s?lectionn? le fichier ",name2))
assign("fileName2",name2,envir=.GlobalEnv)
}
openListespeces.f = function(){
name3<-tclvalue(tkgetOpenFile())
if (!nchar(name3))
tkmessageBox(message="Aucun fichier n'a ?t? s?lectionn?!") else
tkmessageBox(message=paste("Vous avez s?lectionn? le fichier ",name3))
assign("fileName3",name3,envir=.GlobalEnv)
}
tt <- tktople...