Displaying 18 results from an estimated 18 matches for "char1".
Did you mean:
char
2012 Oct 14
3
Pivot Table "like" structure
...;O", "S",
"T"), class = "factor"), City = structure(c(1L, 8L, 7L, 2L, 3L,
6L, 5L, 4L), .Label = c("BEN", "HRD", "JKL", "KK", "KL", "KMM",
"OKC", "TYU"), class = "factor"), Char1 = structure(c(1L, 2L,
1L, 3L, 4L, 2L, 3L, 5L), .Label = c("A", "B", "C", "D", "M"), class = "factor"),
Char2 = structure(c(1L, 2L, 1L, 2L, 3L, 4L, 4L, 2L), .Label = c("ABCD",
"EFGH", "FGHJ", "G...
2011 May 08
3
%in% operator - NOT IN
Hello everyone,
I am attempting to use the %in% operator with the ! to produce a NOT IN type
of operation. Why does this not work? Suggestions?
> data2[data1$char1 %in% c("string1","string2"),1]<-min(data1$x1)
> data2[data1$char1 ! %in% c("string1","string2"),1]<-max(data1$x1)+1000
Error: unexpected '!' in "data2[data1$char1 !"
Thanks!
Dan
XXXX
[[alternative HTML version deleted]]
2003 Sep 02
3
How to avoid automatic coercion to factor?
I have a function that manipulates a list of numeric and character
components of equal length and wants to return a data.frame.
EG,
f<-function() {
a<-list(Int1=1:5,Char1=letters[1:5],Char2=letters[6:10])
b<-data.frame(a)
}
How can I get the columns Char1, Char2, (...CharN) returned coerced to
character and not factor?
It appears that I could coerce individual columns by
b$CharI<-as.character(b$CharI). Is there a less ugly way of doing this?
Thanks, Steve...
2008 Dec 19
1
How to write a Surv object to a csv-file?
...csv(df.soa, 'df.soa.csv') ## works as I expected
read.csv('df.soa.csv') ## works as I expected
df.soa2 <- data.frame(soa, soa2=soa)
write.csv(df.soa2, 'df.soa2.csv') ## works as I expected
read.csv('df.soa2.csv') ## works as I expected
char1 <- letters[1:5]
df.soac <- data.frame(soa, char1)
write.csv(df.soac, 'df.soac.csv') ## generates the following error message:
Error in dimnames(X) <- list(dn[[1L]], unlist(collabs, use.names = FALSE)) :
length of 'dimnames' [2] not equal to array extent
df.csoa <-...
2012 Nov 26
1
error in plot(table(c('a','a')))
...s of 1
dimension; if I attempt to make a plot of a table of characters with only
1 value I get an error (Error in xy.coords(x, y, xlabel, ylabel, log) :
'x' and 'y' lengths differ). With more than one value I don't get
errors, neither with integers (even if only 1 value):
tbl.char1 <- table(c('a','a'))
tbl.char2 <- table(c('a','a','b'))
tbl.int1 <- table(c(1,1))
# error:
plot(tbl.char1)
# no errors:
plot(tbl.char2)
plot(tbl.int1)
sessionInfo()
R version 2.14.0 (2011-10-31)
Platform: i686-pc-linux-gnu (32-bit)
locale:
[1...
2012 Nov 26
1
error in plot(table(c('a','a')))
...s of 1
dimension; if I attempt to make a plot of a table of characters with only
1 value I get an error (Error in xy.coords(x, y, xlabel, ylabel, log) :
'x' and 'y' lengths differ). With more than one value I don't get
errors, neither with integers (even if only 1 value):
tbl.char1 <- table(c('a','a'))
tbl.char2 <- table(c('a','a','b'))
tbl.int1 <- table(c(1,1))
# error:
plot(tbl.char1)
# no errors:
plot(tbl.char2)
plot(tbl.int1)
sessionInfo()
R version 2.14.0 (2011-10-31)
Platform: i686-pc-linux-gnu (32-bit)
locale:
[1...
2008 May 15
2
Adding columns to dataframe
Hi,
I have a dataframe SDF1 that looks like this:
Char1 Char2 Char 3 W.2007.02 W.2007.09 W.2007.16 W.2008.13
A C1 F1 F2 F3
A C2
F4
B C3 F5
F6
I have another dataframe SDF2 with 163 cols that has the following column
names
Char1 Char2...
2019 Aug 12
2
Add support for vhost-user-scsi-pci/vhost-user-blk-pci
Hi Guys,
And I want to add the vhost-user-scsi-pci/vhost-user-blk-pci support
for libvirt.
The usage in qemu like this:
Vhost-SCSI
-chardev socket,id=char0,path=/var/tmp/vhost.0
-device vhost-user-scsi-pci,id=scsi0,chardev=char0
Vhost-BLK
-chardev socket,id=char1,path=/var/tmp/vhost.1
-device vhost-user-blk-pci,id=blk0,chardev=char1
What type should I add for libvirt.
Type1:
<hostdev mode='subsystem' type='vhost-user'>
<source protocol='vhost-user-scsi' path='/tmp/vhost-scsi.sock'></source>...
2006 Aug 14
0
NEWBIE QUESTION - recode in Ruby
...value, 0);
i = 2
while i < value.length
curchar = text_decrypt_symbol(value, i) ^ enc++
result += curchar.chr
if enc > 255
enc = 0
end
i+=2
end
return result;
end
def text_decrypt_symbol(value, value2)
char1 = value[value2, 1]
char2 = value[value2+1, 1]
return (char1.chr - 100)*16 + char2.chr - 100;
end
Apparently the .chr method requires an integer to work. Anyone have
any advice?
2009 Apr 03
1
Discriminant Analysis - Obtaining Classification Functions
...sis in R.
I have some plant samples (divided into several groups) on which I
measured a few quantitative characteristics. Now, I need to infer some
classification rules usable for identifying new samples.
I have used the function lda from the MASS library in a usual fashion:
lda.1 <- lda(groups~char1+char2+char3, data=xxx)
I'd like to obtain the classification functions for the particular
groups, with the aid of which I could classify unknown samples. I know
I can use predict.lda to classify such samples, but I need to obtain
some equations into which I could simply put the measured values...
2019 Oct 14
2
Re: [libvirt] Add support for vhost-user-scsi-pci/vhost-user-blk-pci
...ci/vhost-user-blk-pci support
> > for libvirt.
> >
> > The usage in qemu like this:
> >
> > Vhost-SCSI
> > -chardev socket,id=char0,path=/var/tmp/vhost.0
> > -device vhost-user-scsi-pci,id=scsi0,chardev=char0
> > Vhost-BLK
> > -chardev socket,id=char1,path=/var/tmp/vhost.1
> > -device vhost-user-blk-pci,id=blk0,chardev=char1
> >
>
> Indeed that matches what I see for the qemu commits too:
>
> https://git.qemu.org/?p=qemu.git;a=commit;h=00343e4b54b
> https://git.qemu.org/?p=qemu.git;a=commit;h=f12c1ebddf7
>
> >...
2019 Oct 09
0
Re: [libvirt] Add support for vhost-user-scsi-pci/vhost-user-blk-pci
...gt; And I want to add the vhost-user-scsi-pci/vhost-user-blk-pci support
> for libvirt.
>
> The usage in qemu like this:
>
> Vhost-SCSI
> -chardev socket,id=char0,path=/var/tmp/vhost.0
> -device vhost-user-scsi-pci,id=scsi0,chardev=char0
> Vhost-BLK
> -chardev socket,id=char1,path=/var/tmp/vhost.1
> -device vhost-user-blk-pci,id=blk0,chardev=char1
>
Indeed that matches what I see for the qemu commits too:
https://git.qemu.org/?p=qemu.git;a=commit;h=00343e4b54b
https://git.qemu.org/?p=qemu.git;a=commit;h=f12c1ebddf7
> What type should I add for libvirt.
>...
2002 Aug 14
0
re: using mac-addr for selecting configfile now working
...al ; Convert to host byte
order
+ ror eax,16
+ xchg ah,al
+.hexify_loop1: rol eax,4
+ push eax
+ and al,0Fh
+ cmp al,10
+ jae .high1
+.low1: add al,'0'
+ jmp short .char1
+.high1: add al,'A'-10
+.char1: stosb
+ pop eax
+ loop .hexify_loop1
+
+ mov cx,6 ; 6 nibbles in netcard part
of MAC
+ mov eax,[MyMAC2] ; 3 byte netcard part of
MAC...
2019 Oct 15
1
Re: [libvirt] Add support for vhost-user-scsi-pci/vhost-user-blk-pci
...t;>
> >>> The usage in qemu like this:
> >>>
> >>> Vhost-SCSI
> >>> -chardev socket,id=char0,path=/var/tmp/vhost.0
> >>> -device vhost-user-scsi-pci,id=scsi0,chardev=char0
> >>> Vhost-BLK
> >>> -chardev socket,id=char1,path=/var/tmp/vhost.1
> >>> -device vhost-user-blk-pci,id=blk0,chardev=char1
> >>>
> >>
> >> Indeed that matches what I see for the qemu commits too:
> >>
> >> https://git.qemu.org/?p=qemu.git;a=commit;h=00343e4b54b
> >> https://g...
2019 Oct 14
0
Re: [libvirt] Add support for vhost-user-scsi-pci/vhost-user-blk-pci
...rt
>>> for libvirt.
>>>
>>> The usage in qemu like this:
>>>
>>> Vhost-SCSI
>>> -chardev socket,id=char0,path=/var/tmp/vhost.0
>>> -device vhost-user-scsi-pci,id=scsi0,chardev=char0
>>> Vhost-BLK
>>> -chardev socket,id=char1,path=/var/tmp/vhost.1
>>> -device vhost-user-blk-pci,id=blk0,chardev=char1
>>>
>>
>> Indeed that matches what I see for the qemu commits too:
>>
>> https://git.qemu.org/?p=qemu.git;a=commit;h=00343e4b54b
>> https://git.qemu.org/?p=qemu.git;a=commit;h=...
2011 May 08
0
Conditional values of a vector XXXX
...NA for
factors and character vectors. Can anyone suggestion the most succinct way
of going about this?
Variable Class Mode
1 id integer numeric
2 x1 numeric numeric
3 x2 numeric numeric
4 x3 numeric numeric
5 y numeric numeric
6 gender factor numeric
7 char1 factor numeric
I have the following, but it does not work:
x.contents.3<-data.frame(id=1:ncol(x),Min=NA,Max=NA,row.names="id")
x.contents.3[!(x.contents.2$Class("factor","character")),1]<-sapply(x,min)
x.contents.3[!(x.contents.2$Class("factor","...
2010 May 05
2
readLines with space-delimiter?
Hi,
I am reading a large space-delimited text file into R (41 columns and many
rows) and need to do run each row's values through another R object and then
write to another text file. So, far using readLines and writeLines seems to
be the best bet. I've gotten the data exchange working except each row is
read in as one 'chunk', meaning the row has all values between two quotes
2004 Nov 23
3
Problem with read.xport() from foreigh package (PR#7389)
Full_Name: Ruskin Chow
Version: R 2.0.1
OS: Windows 2000
Submission from: (NULL) (203.169.154.66)
Data imported from SAS using read.xport() in package foreign are converted to
<NA> when the SAS data field consists of character strings that are only one
character long.
This is apparently a previously reported bug and perhaps fixed in some platform
other than Windows (rw2001).Some