similar to: Reconfiguring wide frame to long frame

Displaying 20 results from an estimated 1000 matches similar to: "Reconfiguring wide frame to long frame"

2006 Jul 13
1
looping using combinatorics
I have a problem where I need to loop over the total combinations of vectors (combined once chosen via combinatorics). Here is a simplification of the problem: STEP 1: Define three vectors a, b, c. STEP 2: Combine all possible pairwise vectors (i.e., 3 choose 2 = 3 possible pairs of vectors: ab,ac, bc) NOTE: the actual problem has 8 choose 4, 8 choose 5 and 8 choose 6 combinations. STEP
2006 Oct 29
2
Rgui.exe fix for "console not found" buffer overflow problem
I'm using R on Windows XP Professional SP2. I figured out the fix for my buffer overflow problem that did not allow me to use Rgui.exe for about two weeks. I would keep getting "console not found" and even when I uninstalled and re-installed got the same problem. Here's how the problem started. In Rgui.exe, I attempted to get more visible output in the buffer (I wanted
2006 Aug 18
1
Permutations with replacement
Is there a simple function or process that will create a matrix of permutations with replacement? I know that using the combinat package ###### begin R code ###### > library(combinat) > m <- t(array(unlist(permn(3)), dim = c(3, 6))) # we can get the permutations, for example 3!=6 # gives us > m [,1] [,2] [,3] [1,] 1 2 3 [2,] 1 3 2 [3,] 3 1 2 [4,]
2006 Aug 21
0
Fw: Permutations with replacement
My apologies, I forgot to CC: to the list on my previous communication with Daniel. Jesse ----- Forwarded by Jesse Albert Canchola/EMVL/DIAG/US/BAYER on 08/21/2006 10:50 AM ----- Jesse Albert Canchola/EMVL/DIAG/US/BAYER 08/21/2006 09:36 AM To "Daniel Nordlund" <res90sx5 at verizon.net> cc Subject RE: [R] Permutations with replacement Thanks, Daniel. I need to enumerate
2005 Apr 15
4
aggregation question
Is length(unique()) what you are looking for? Andy > From: Christoph Lehmann > > Hi I have a question concerning aggregation > > (simple demo code S. below) > > I have the data.frame > > id meas date > 1 a 0.637513747 1 > 2 a 0.187710063 2 > 3 a 0.247098459 2 > 4 a 0.306447690 3 > 5 b 0.407573577 2 > 6 b
2011 May 12
1
separate date and time
I have a combined date and time. I would like to separate them out into two columns so I can do things such as take the mean by time across all dates. meas<-runif(435) nTime<-seq(1303975800, 1304757000, 1800) nDateT<-as.POSIXct(nTime, origin="1970-01-01") mat1<-cbind(nDateT,meas) means1<- aggregate(mat1$meas, list(nDateT), mean) This doesn't do anything as each day
2011 Jan 23
2
Ordering box plots
Hello all, I want box plots by group to display in order of increasing mean (or median) of each group but can't seem to figure it out and couldn't find anything on R-seek, either. My data looks like this: meas unit sid grade rsprti 1 2.24 1002 99999902 NA 0.8600000 2 3.04 1007 43589520 3 0.9400000 3 4.95 2002 39910470 5 1.5300000 4 2.24 2002 39986280 5
2017 Dec 21
1
develop.raw error ( adimpro )
Hello all, I'm trying to use the adimpro package to read RAW files (image). Make readins is OK! > r <- read.raw( '20171218_210956.dng', type='RAW', compress=FALSE ) > summary( r ) > ### cut the many lines... Filter pattern: GR/BG > extract.info( r ) [1] "GR/B" > To next, develop the raw file using the "develop.raw" function. But the
2000 Jul 28
4
Language element manipulation
I am very confused about this. I want to convert a string to a name so I can use it to extract an element of a data frame using `$'. Here is my (non-working) code: do.graph <- function (meas) { fn <- paste("a", meas, ".dat", sep='') themeas <- read.table(fn, header=F) ameas <- as.name(paste("a", meas, sep=''))
2008 Jul 25
1
glht after lmer with "$S4class-" and "missing model.matrix-" errors
Hello everybody. In my case, calculating multiple comparisons (Tukey) after lmer produced the following two errors: > sv.mc <- glht(model.sv,linfct=mcp(comp="Tukey")) Error in x$terms : $ operator not defined for this S4 class Error in factor_contrasts(model) : no 'model.matrix' method for 'model' found! What I have done before: > sv.growth <-
2011 May 12
3
assigning creating missing rows and values
I have a dataset where I have missing times (11:00 and 16:00). I would like the outputs to include the missing time so that the final time vector looks like "realt" and has the previous time's value. Ex. If meas at time 15:30 is 0.45, then the meas for time 16:00 will also be 0.45. meas are the measurements and times are the times at which they were taken. meas<-runif(18)
2011 Dec 07
1
Convert a string to a variable name
Hello, I am trying to ask the user for which column their data is in, and then use this information in a function. So far I have: data <- read.csv(file.choose(), header=TRUE) col <- (winDialogString("Which column contains your data?","")) and I want to be able to reference such as: meas <- data$col and use this meas in the function. However, I can't seem to
2010 May 14
1
Elphel's JP4
Hi, just a small follow up of recent discussions about Elphel's JP4 format. I'm working with Andrey and fellows from Elphel to improve support for JP4 format in the context of Elphel's Apertus project (http://www.apert.us). As posted by Basil, on http://wiki.elphel.com/index.php?title=JP4 there is plenty of information about the format and how to post process it to get back your real
2003 Sep 10
1
scan() problem
Dear R-helpers, I have to read some large csv-files into R (30 - 100MB). Since reading with read.csv leads to "memory exhausted", I tried with scan(), skipping not needed columns by NULL-elements in "what". When these skipped elements are quoted strings with commata inside, R interprets each such quoted comma as element separator leading to wrong records in the rest of the
2005 Sep 14
1
Long lines with Sweave
I have used Sweave a lot the latest year, but never really used any long function calls. If I have code which look like this ------------------------------------------------------------- gof <- benthic.flux(ID="Gulf of Finland", meas.conc=conc, bw.conc=bw.conc, time=times,
2005 Nov 04
1
t test on data frame
Hi, I have constructed a dataframe as follows: Oil <- rep(c("Oil1","Oil2","Oil3"),8) Comp <- rep(rep(c("C1","C2"),c(4,4)),3) Mth <- rep(c("M1","M1","M2","M2"),6) Meas <- rep(c(1,2),12) Result <- rnorm(24,mean=100, sd=5) df <- data.frame(Oil, Comp, Mth, Meas, Result) The same compound
2007 Oct 29
3
syslinux.com: sector read error
Hello. I cannot install syslinux on my hard disk image. Steps to reproduce the problem: (1) Create a zeroed disk image with 800 tracks, 32 sides, and 63 sectors or 825753600 bytes (2) Fdisk and format it with "format.com /S C:" from windows 98SE boot disk. (3) Copy syslinux (tested version 3.11, 3.20, and latest released) to root. (4) Run "lock C:" and press
2012 Apr 18
1
R - fault creating a 3D and contour graph (SIGABRT)
Hello, when I tried to create 3D graph from attached file (at first: columns 1, 2, and 3 (longitude, latitude, altitude), then columns 1, 2 and 4 , then the same for column 5 etc) using Akima library for 3D interpolation (the data are neither equidistant nor regularly distributed), the console crashed by SIGABRT fault response. Do you know what is the main problem? Otherwise, can you advise me the
2012 Apr 01
1
extend data frame for plotting heat map in ggplot2
Hi all! I want to generate a heat map from an all-vs-all comparison. I have the data, already scaled to 0-1. However, I have the values only for the comparisons in one way, and not for the comparisons between the same group (which are always 1), i.e. I have half the matrix and am missing the other half and the diagonal. What is a good way to get it into a form that ggplot2 can use for the
2007 Apr 16
1
Dataimport with readLines using skip= and nlines= ?
Hello, I have a problem with readLines. I have a data file with many informations added with a different number of measurments (example at the end). I only want to read the measurments witch start with "START OF HEIGHT DATA" and end with "END OF HEIGHT DATA". The difficulty is: -I want to read the file with "readLines", because the measurments have letters and