similar to: Pivot Table "like" structure

Displaying 20 results from an estimated 200 matches similar to: "Pivot Table "like" structure"

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
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
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
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
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 <-
2010 May 19
1
sample and rearrange
Dear Wu Gong and Peter Ehlers, thank you very much for your help debugging my script. Now I have a general following up question: Is there a straightforward way to rearrange the following dataset so that all first letters of each column will be combined in one column, all the second letters in a second column, all the third ones in a third column and so on, resulting in 7 columns, i.e. for
2009 Jun 23
2
Vector of string
Hi all. Suppose I have a vector of strings ie: ["12384", "TYU123123", "AVC3939", "hhr1919", "TYU0029"] Is there an efficient method that would allow me to return a vector of the position of strings that start with "TYU"? So essentially, I would like to get back in return [2, 5]. Anyways, any help with be greatly appreciated! -- View
2006 Oct 24
2
Question about Case Insensitivity
Hi, I am trying to make a Linux filesystem appear case-insensitive and I got the idea that I could use a SAMBA loopback mount to do this. I almost succeeded on my first try but I ran into a snag I have no answer for yet. My setup involves sharing filesystem "/a" and then mounting it on "/b". I can use "ls -l" on the "/b" filesystem in a case-insensitive
2012 Jun 28
3
Storing results in a single file after looping over all files
Hi All, I have a whole lot of *.raw files in my working folder and I am doing the same analysis on each of those and want to save all the results in a single file. I am making some mistake here and can't figure out how to solve it. Say, the *.raw files are ABCD.raw, EFGH.raw, IJKL.raw ... The files are of this format ID PHI?? aa1? aa2? aa3 .... 1??? 1???? 1.3?? 2.0?? 1.0 2??? 0????
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
2013 Jun 10
1
Sending Email with Attachment
Hi, I am trying to send an email through gmail or outlook from my Windows PC and finding trouble to send the email. The code which I am using is given below: Code : library("sendmailR") from <- "abcd@outlook.com" to <- <mailto:efgh@gmail.com> efgh@gmail.com subject <- "Run at" mailControl = list(smtpServer="blu-m.hotmail.com")
2006 Jun 09
2
barplot dataframes w/ varying dimensions
Hi all, I would like to do a barplot of a dataframe like this one: alfa beta gamma delta qwert 56.5 58.5 56.5 58.5 asdfg 73.0 73.0 43.0 73.0 zxcvb 63.0 63.0 43.0 63.0 yuiop 63.0 63.0 43.0 63.0 with the labels of the rows and columns. I would like to have something that works for dataframes with varying dimensions, and so far I haven't found any way to do it.
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
2011 Feb 10
2
for loop to merge .csvs
So I needed to merge 17 .csv files, and did so by brute force, but I might need to do so again. Anyone have suggestions for a for loop that might do the below for me (where a:r are separate .csv files) ab<-merge(a,b,all=TRUE) cd<-merge(c,d,all=TRUE) ef<-merge(e,f,all=TRUE) gh<-merge(g,h,all=TRUE) ij<-merge(i,j,all=TRUE) kl<-merge(k,l,all=TRUE) no<-merge(m,n,all=TRUE)
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
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
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 Jul 03
2
Samba logs
Hi! How come that the logfiles in my /var/log/samba looks like this: -rw-r--r-- 1 root root 0 Feb 24 04:02 log.data -rw-r--r-- 1 root root 3223 Jul 2 18:04 log.dell -rw-r--r-- 1 root root 0 Jun 22 04:29 log.dell.2 -rw-r--r-- 1 root root 0 Jun 1 04:02 log.dell.3 -rw-r--r-- 1 root root 0 Jul 3 04:09 log.gggg
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. ; ;