Displaying 8 results from an estimated 8 matches for "rep_n_stack".
2011 Sep 07
1
Reshaping data from wide to tall format for multilevel modeling
Hi,
I'm trying to reshape my data set from wide to tall format for multilevel
modeling. Unfortunately, the function I typically use (make.univ from the
multilevel package) does not appear to work with unbalanced data frames,
which is what I'm dealing with.
Below is an example of the columns of a data frame similar to what I'm
working with:
ID a1 a2 a4 b2 b3 b4 b5 b6
Below
2013 Jan 22
1
simple reshape
Dear friends - this is a very simple question - I have a data frame
'data.frame': 87 obs. of 3 variables:
$ ID : int 1 1 1 2 2 2 3 3 3 4 ...
$ prep : num 1.18 1.38 1.34 1.93 2.38 2.24 1.17 1.13 1.21 1.89 ...
$ postp: num 0.63 0.71 0.75 1.01 1.12 1.07 0.87 0.64 0.7 0.8 ...
- 29 persons (ID) each measured three times before and after an
intervention: prep and postp -
I need
2013 Aug 26
4
transform variables
Dear all!
I have a data frame composed by 13 columns (year, and 12 months). I want to
transform this data base in another like this
year month values
1901 1
1901 2
1901 3
.....
1901 12
1902 1
1902 2
....
1902 12
Is there a possibility to succeed that in R?
Thank you!
best regards!
CR
--
---
Catalin-Constantin ROIBU
Lecturer PhD, Forestry engineer
Forestry Faculty of Suceava
Str.
2012 May 16
2
Splus equivalent of reshape in R
Hello R/Splus users..
I am posting in R discussion group in hope of wider response compared to
what I received from Splus user groups....
Was wondering if there is any function available in Splus 8.2 that is
equivalent to "reshape" of R?
Below is a sample dataset. Size [both rows and columns) of the dataset may
vary
X1 Y1 Y2 Y3
0.25 40 38 22
0.5 44 41
2013 Jan 03
3
Make a column from columns
Hi,
I have a data matrix with 13 columns and 55 rows. First coulmn is year and
other are monthly values for 55 years.
Now i want to create a single column of all the values ( i e a single time
series column from column 2 to 13 ).
Is it the for loop that works here ...how ?
or how i can rearrange the data so that it becomes a times series column.
hope i made the question clear .
thank you,
2012 Jun 01
2
how to add a 'label' column
Hello R users,
I'd like to ask a question about how to add a new column. So, below is my
situation.
In order to perform the repeated ANOVA, I first imported the following
table.
score=read.csv("patients_tests.csv");
subject test1 test2 test3 test4 test5 test6
test7
1 ab 0.17687 0.16715 0.17009 0.16480 0.16116 0.24502 0.17975
2 cl
2012 Feb 19
2
barplot with more than 1 variable
Dear R listers,
I am trying to produce a simple (for a stata user) barplot with 4
countries on the x axis, each country observed in 2 subsequent years
and 3 variables.
Basically, I should have three bars for each year for each country. I
am attaching the chart I made in Stata, but I am not sure you'll
manage to see it!
I did the following:
#here I create the data-set TUSE2. The vectors mw, st
2011 Oct 06
3
Wide to long form conversion
I have some data 'myData' in wide form (attached at the end), and
would like to convert it to long form. I wish to have five variables
in the result:
1) Subj: factor
2) Group: between-subjects factor (2 levels: s / w)
3) Reference: within-subject factor (2 levels: Me / She)
4) F: within-subject factor (2 levels: F1 / F2)
5) J: within-subject factor (2 levels: J1 / J2)
As this is the