similar to: How to avoid automatic coercion to factor?

Displaying 20 results from an estimated 700 matches similar to: "How to avoid automatic coercion to factor?"

2012 Nov 26
1
error in plot(table(c('a','a')))
Hi all, there appears to be something strange with the plotting of tables 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 <-
2012 Nov 26
1
error in plot(table(c('a','a')))
Hi all, there appears to be something strange with the plotting of tables 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 <-
2012 Oct 14
3
Pivot Table "like" structure
HI Team, I am currently working on problem and stumped on "for" loop. Data: structure(list(Coutry = structure(c(3L, 3L, 3L, 3L, 2L, 2L, 1L, 1L), .Label = c("J", "M", "U"), class = "factor"), State = structure(c(1L, 1L, 4L, 2L, 5L, 5L, 3L, 6L), .Label = c("A", "C", "K", "O", "S",
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 Char 3 W.2007.02 W.2007.03 W.2007.04
2009 Apr 03
1
Discriminant Analysis - Obtaining Classification Functions
Hello! I need some help with the linear discriminant analysis 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
2006 Aug 14
0
NEWBIE QUESTION - recode in Ruby
I wish to recode the following php code to ruby: function text_decrypt_symbol($s, $i) { # $s is a text-encoded string, $i is index of 2-char code. function returns number in range 0-255 return (ord(substr($s, $i, 1)) - 100)*16 + ord(substr($s, $i +1, 1)) - 100; } function text_decrypt($s) { if ($s == "") return $s; $enc = 85 ^ text_decrypt_symbol($s,
2002 Aug 14
0
re: using mac-addr for selecting configfile now working
Hi everybody hacking in the 200-pre4 i found everything i needed, so i gave it a try ... and it works! But dont blame for the code, its just quick and dirty! --- ../syslinux-2.00-pre4/pxelinux.asm Sat Jun 15 07:25:51 2002 +++ ./pxelinux.asm Wed Aug 14 10:05:00 2002 @@ -17,6 +17,11 @@ ; version; incorporated herein by reference. ; ;
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
2008 Dec 19
1
How to write a Surv object to a csv-file?
Dear All, trying to write a data.frame, containing Surv objects to a csv-file I get "Error in dimnames(X) <- list(dn[[1L]], unlist(collabs, use.names = FALSE)) : length of 'dimnames' [2] not equal to array extent". See example below. May be, I overlooked something, but I expected that also data.frames containing Surv objects may be written to csv files. Is there a
2005 Feb 15
1
Apropos sprintf behavior
If changes to sprintf behavior are being considered, would it be possible to allow some of the other K&R conversion specifiers? xX - for integer to hex conversion, and c - for ascii value to character conversion would all be useful for me. Thanks, Steve Dutky On Mon, 14 Feb 2005 11:02:20 +0000 (GMT), Prof Brian Ripley wrote: +On Mon, 14 Feb 2005, Wolfgang Huber wrote: + +> Dear
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 19
1
R (unix) command line editing for native speakers of vi
As an inveterate user of vi, I was pleased to stumble on how to use it for editing R commands. When an interactive R session is launched under unix, the command line editor most likely defaults to emacs. Typing <esc>,<ctrl>+j will switch this to vi editing mode (see below for possible exceptions). excerpted from readline(3) manpage: vi-editing-mode (M-C-j) When in emacs
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
2007 Jun 04
1
Exclude option not working
Hi , Hope you are doing good. I am Madhavan from India . I was trying to implement the wonderful rsync concept in my project for file mirroring. I implemented the functunality but the only problem I am facing is in the * exclude* directory option. Though I am trying to exclude the directory by giving proper syntex for exclude but I find once the whole rsync is completed the directory still gets
2005 Jan 28
1
error in gmake CrossCompileBuild
Dear all, I expect that I am on thin ice trying to build this on freeBSD 4.10, however, after tweaking Makefile-rcb v11Oct04 /* MAKE=gmake; MINGW_CROSS = mingw-cross4 */, I encounter: mingw32-gcc -isystem ~/RCrossBuild/cross- tools/mingw32/include -O2 -Wall -pedantic -I../include -I. - DHAVE_CONFIG_H -DR_DLL_BUILD -c dynload.c -o dynload.o dynload.c: In function `R_loadLibrary':
2020 Jan 06
1
standard naming for components of R data structures
@steve Seek for online document named "writing R extensions" chapter 2. It tells how to describe a list structure using item markup for R documentation files, if indeed this matches your search, thing I am not sure. Something that looks like... value{ The \\code{list} owns following names \\item{alpha}{double vector} \\item{beta}{integer vector} \\item{delta}{raw vector} } Best Le
2019 Oct 14
2
Re: [libvirt] Add support for vhost-user-scsi-pci/vhost-user-blk-pci
Hi Cole & Michal, I'm sorry for my late response, I just end my journey today. Thank your response, your suggestion is very helpful to me. I have added Michal in this mail, Michal helps me review my initial patchset. (https://www.spinics.net/linux/fedora/libvir/msg191339.html) All concern about this feature is the XML design. My original XML design exposes more details of Qemu.
2007 Feb 14
1
Any packages for conducting AHP( Analytic Hierarchy Process) data
Hi, R Lovers! I have some survey data. I'd like to run R or R packages for processing data inputted from AHP(Analytic Hierarchy Process) survey. Are there any R packages or subsititues for running data from AHP survey. Thanks in advance, -- Kum-Hoe Hwang, Ph.D.Phone : 82-31-250-3516 Email : phdhwang@gmail.com [[alternative HTML version deleted]]
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
2012 Nov 30
3
loop function and integrate?
Hi guys! I have to compute something and i don't know what i'm doing wrong. my code is a bit complex, but imagine that is something like this: a = c(1,2,3,4) ia = length(a) x = seq(1,100,length=0.1) ib = length(x) int1 = numeric(ib) b = numeric(ib) for(j in 1:ia) { H = function(x) {sin(x + a[j])} for(i in 1:ib) { int = integrate(H, lower = 0, upper