similar to: reshape "Error in data[, timevar] : incorrect number of dimensions"

Displaying 20 results from an estimated 2000 matches similar to: "reshape "Error in data[, timevar] : incorrect number of dimensions""

2008 Sep 28
1
reshape package does not recognize second id variable
I am trying to use the reshape package for the first time. I have two waves of a survey, so the id variables include a subject identification number and a variable denoting the wave of the survey. I used the following arguments: library(reshape) svy.melt <- melt(svy, id=c("id", "WAVE")) svy.wide <- cast(svy.melt, id ~ WAVE + ...) and got the following error:
2012 Mar 20
2
Reshaping data from long to wide without a "timevar"
Hello All, I was wondering if it's possible to reshape data from long to wide in R without using a "timevar". I've pasted some sample data below along with some code. The data are sorted by Subject and Drug. I want to transpose the Drug variable into multiple columns in alphabetical order. My data have a variable called "RowNo" that functions almost like a
2005 Feb 26
1
reshape without timevar argument?
Hi I have a data.frame with 2 columns. The first column is an ID column. The other columns are description of the ids. There is more than one description for each Id. Want I want to get as a value is a data.frame where each row corresponds to one ID and has as many columns as different descriptions. I have used a very convoluted step, but I'm very convinced there is an easier way to do
2009 Sep 14
2
problems with reshape
Hello * I would like to reshape wide the following dataset: > rl <- read.dta("intermedi/rapporti_lavoro.dta") [c("id_rl","prog","sil_pi","sil_cf","sil_dat_avv")] > dim(rl) [1] 12964 5 > object.size(rl) 1194728 bytes > head(rl) id_rl prog sil_pi sil_cf sil_dat_avv 1 638 1 04567XXXXXX
2008 Feb 10
2
reshape
Dear colleagues, I'd like to reshape a datafame in a long format to a wide format, but I do not quite get what I want. Here is an example of the data I've have (dat): sp <- c("a", "a", "a", "a", "b", "b", "b", "c", "d", "d", "d", "d") tr <- c("A",
2009 Dec 09
1
reshape() makes R run out of memory (PR#14121)
Full_Name: Alexander L. Belikoff Version: 2.8.1 OS: Ubuntu 9.04 (x86_64) Submission from: (NULL) (67.244.71.200) I'm trying to reshape the following data frame: ID DATE1 DATE2 VALUE_TYPE VALUE 'abcd1233' 2009-11-12 2009-12-23 'TYPE1' 123.45 ... VALUE_TYPE is a string and is a factor with only 2 values
2006 Feb 22
1
unused factor levels in reshape
When reshaping a dataframe in which there are unused factor levels in the id variable, I get the following error: Error in if (!all(really.constant)) warning(gettextf("some constant variables (%s) are really varying", : missing value where TRUE/FALSE needed For example, > df <- data.frame(i = factor(rep(1:5, each = 2)), t = factor(rep(1:2, 5)), x = rep(rbinom(5, 1,
2011 Jul 04
2
I need help for creating a "timevar"
Hi all! I have data in ?Long? format which I would like to reshape to ?Wide?. I know that one possibility is the ?reshape? command, which needs a ?timevar?. Data look as follows: There are approx. 3000 persons (?IDENTITY?) and, for each person, there are between 2 and 20 events (?EVENT?). For now, there's one row for each event (9506 rows)
2004 Aug 06
1
reshape (was: Comparing rows in a dataframe)
Hi all: I solved the previous stated problem in something of a brute force way (but it works). I seem to now be running into one little hiccup using reshape. Here is a quick snip of the data in long format: grade stability year schid 6 Grade 4 3 2001 100005 7 Grade 4 3 2002 100005 8 Grade 4 2 2003 100005 10 Grade 5 2 2001 100005 11 Grade 5
2009 Mar 31
2
'sep' argument in reshape()
I wonder if the 'sep' argument in reshape() is being ignored unintentionally: ## From example(reshape) df <- data.frame(id=rep(1:4,rep(2,4)), visit=I(rep(c("Before","After"),4)), x=rnorm(4), y=runif(4)) reshape(df, timevar="visit", idvar="id", direction="wide", sep = "_") id x.Before
2003 Oct 30
1
Trouble reshaping some data
I would appreciate some advice on the following task. I have some data that currently looks like this: t1 <- data.frame(id=c(1,1,2,2), aspect=c("A","B","A","B"), score=c(10,9,11,12)) I'd like it to look like this: id A B 1 10 9 2 11 12 reshape() looks like a good candidate for this job but I'm not really sure about the roles of
2004 Feb 19
1
reshape direction=wide
Hello I am reshaping a data.frame bids --> reshaped as shown below. I thought this should be possible with a single invocation of reshape, but the only way I came up with is reshaping subsets for each keyword and then joining them together. Does anyone have an idea how to solve this in a more elegant way? Efficiency is a concern as the datasets are very large. Is there a way to specify
2002 Oct 25
1
reshape: duplicate rows to multiple cols
I have a dataframe that I'm trying to reshape, and need advice. My data: > klam.merge[200:225,] stream lulc x sumlength pct.lgth 200 1223030419685 92 0.25000000 9.89 2.52780586 201 1223030419686 23 0.00274154 4.73 0.05796068 202 1223030419686 41 0.75009917 4.73 15.85833341 203 1223030419686 42 2.65000000 4.73 56.02536998 204
2001 Dec 27
3
reshape error in 1.4 (PR#1231)
Full_Name: Kevin Wright Version: 1.4 OS: Windows 95 Submission from: (NULL) (170.54.59.160) Note: This was the 1.4 build for Windows that Brian Ripley made available. The first example in the help for reshape doesn't work for me. When I cut and paste, this is what happens: > data(Indometh,package="nls") > summary(Indometh) Subject time conc
2006 Nov 29
2
reshape command is (stats) dropping instances
I would really appreciate it if anyone could determine what is going on with the following command. It is only half-working and is losing lots of data. For the life of me I cannot even see the pattern of what it is losing and what it is not. I am attaching the R data set which you can use with the Load Workspace menu function.
2008 Aug 25
3
Maintaining repeated ID numbers when transposing with reshape
I have a dataset in "long" format that looks something like this: ID TEST RESULT 1 A 17 1 A 12 1 B 15 1 C 12 2 B 8 2 B 9 Now what I would like to do is transpose it like so: ID TEST A TEST B TEST C 1 17 15 12 1 12 . . 2
2008 Nov 18
1
reshape question
Hi, It's probably a simple issue but I'm struggling with that. I'll use the example shown in the help page. head(Indometh) wide <- reshape(Indometh, v.names="conc", idvar="Subject", timevar="time", direction="wide") head(wide) reshape(wide, idvar="Subject", varying=list(2:12), v.names="conc",
2010 Jan 28
1
question about reshape
Hello everyone, I have a bit of a problem with reshape function in R. I have simulated some normal data, which I have saved in 4 vectors. y.1,y.2,y.3,y.4 which I combined a dataset: dataset<cbind(y1,y2,y3,y4). I have also generated some subject id number, and denoted that by subject. So, my dataset looks like this: subject y.1 y.2 y.3 y.4 [1,] 1 20.302707
2012 Mar 06
1
Reshape question
I have a data frame in wide format. There are six variables that represent two factors in long format 3x2, Valence and Temperature: > head(dpts) File Subj Time Group PainNeg.hot PainNeg.warm SociNeg.hot SociNeg.warm Positiv.hot Positiv.warm Errors 1 WB101_1_1_dp.txt 101 1 MNP 30.700000 13.75000 16.319048 35.166667 30.18333 14.383333 1 2
2012 Mar 19
2
Reshape from long to wide
Hi, I'm a total beginner in R and this question is probably very simple but I've spent hours reading about it and can't find the answer. I'm trying to reshape a data table from long to wide format. I've tried reshape() and cast() but I get error messages every time and I can't figure why. In my data, I have the length of two fish from each family. My data table (called