similar to: Help with reshape/reshape2 needed

Displaying 17 results from an estimated 17 matches similar to: "Help with reshape/reshape2 needed"

2017 Jul 05
0
Help with reshape/reshape2 needed
The reason it doesn't work easily with reshape/reshape2 is that the order of the rows is not determined. Your answer could be 1957 1958 ... 1985 1986 0.8625000 0.7500000 ... 0.7307692 0.23750000 0.0733945 0.6435644 ... NA 0.05769231 0.5096154 NA ... NA 0.65137615 or 1957 1958 ... 1985 1986 0.0733945 0.6435644 ... NA
2017 Jul 05
1
Help with reshape/reshape2 needed
Hi Tom, Or perhaps: #assume the data frame is named "tadf" library(prettyR) stretch_df(tadf,1,2) Jim On Thu, Jul 6, 2017 at 6:50 AM, Ista Zahn <istazahn at gmail.com> wrote: > The reason it doesn't work easily with reshape/reshape2 is that the > order of the rows is not determined. Your answer could be > > 1957 1958 ... 1985 1986 >
2017 Jul 05
0
Help with reshape/reshape2 needed
This does not use reshape/reshape2, but it is pretty straightforward. Assuming X is your example data: > Y <- split(X[, 2], X[, 1]) > vals <- sapply(Y, length) > pad <- max(vals) - vals > Y2 <- lapply(seq_along(Y), function(x) c(Y[[x]], rep(NA, pad[x]))) > names(Y2) <- names(Y) > X2 <- do.call(cbind, Y2) > X2[, 1:6] 1957 1958 1959
2012 Mar 12
2
How to create interrupted boxplot
Hello, I have created two boxplots with following R code. There is one outlier in B group. The outlier is 33. But the all other data are between 0 to 4. How can I skip y-axis around 5 to 25, and expand 0-4 for this case. Also I want keep the outlier in my boxplot. I want my boxplot look like the second one, keep the outlier, and make an interrupt of y-axis from 5 to 25. Thanks, Jianghong
2010 Aug 18
2
How to Perform CCA in ??!! Help please
Performing CCA in R I know they say don't say please... or plead...but I'm sorry but I really need some help with this problem. I have tried to perform CCA in R and I can never do this successfully. Can someone please tell me what I'm doing wrong. I can't attach any file...so Please email me and I'll attach the necessary files. (there's only two) the files will be my CCA R
2011 Mar 03
2
lattice custom axis function -- right side margins
Dear R help list, I have a plot with two different vertical scales that I want to display on either side of the plot. It's quite similar to the Fahrenheit-Centigrade example in the examples section of the documentation for axis.default. The right-side axis is clipped off, though, and I haven't been able to figure out anything with viewport() and clipping or trellis.par.set to fix
2006 Apr 30
7
Rich text aera?
Hi all, I am trying to add an article editing interface to my future webstore, and I am wondering what to use for text formatting. I would like to avoid using HTML, and calibre-bbcode just won''t work (see my last post). Is there some kind of library for live text formatting right in the browser? I would just need bold, italics, size and ul lists... Do you know of a good solution?
2008 Jun 07
2
rcov causing a segmentation fault on rspec 1.1.4 and rails 2.1
Hello again :) I''m trying to run rcov on my specs here but i''m getting a lot of segmentation faults (and they usually happen at different places): /home/mauricio/NetBeansProjects/reeds/vendor/rails/activerecord/lib/active_record/attribute_methods.rb:211: [BUG] Segmentation fault ruby 1.8.6 (2007-09-24) [i486-linux]
2011 Jun 09
2
Calculating a mean based on a factor range
Hello all, I have been using an instrument that collects a temperature profile of a water column. The instrument records the temperature and depth any time it takes a reading. I was sampling many times at discrete depth rather than a complete profile of the water column (e.g. interested in 5m, 10m and 20m depth position only). The issue was that these measurement were taken with the instrument
2009 Feb 18
2
Counting/processing a character vector
Dear List, I have a data set stored in the following format: > head(dat, n = 10) id sppcode abundance 1 10307 10000000 1 2 10307 16220602 2 3 10307 20000000 5 4 10307 20110000 2 5 10307 24000000 1 6 10307 40210000 83 7 10307 40210102 45 8 10307 45140000 1 9 10307 45630000 1 10 10307 45630600 41 >
2010 May 20
1
Mixed Effects Model on Within-Subjects Design
Dear R Experts, I am attempting to run a mixed effects model on a within-subjects repeated measures design, but I am unsure if I am doing it properly. I was hoping that someone would be able to offer some guidance. There are 5 independent variables (subject, condition, difficulty, repetition) and 1 dependent measure (value). Condition and difficulty are fixed effects and have 3 levels each
2003 Apr 10
1
Classification problem - rpart
I am performing a binary classification using a classification tree. Ironically, the data themselves are 2483 tree (real biological ones) locations as described by a suite of environmental variables (slope, soil moisture, radiation load, etc). I want to separate them from an equal number of random points. Doing eda on the data shows that there is substantial difference between the tree and random
2006 Feb 21
2
rotated labels in barplot with beside=T and multiple groups
I have a data set that I display using barplot. I don't know what you call it, but when I look at it, it looks like this: > lsu (0,0.1] (0.1,0.2] (0.2,0.3] (0.3,0.4] (0.4,0.5] (0.5,0.6] A 0.052631579 0.000000000 0.000000000 0.000000000 0.000000000 0.000000000 B 0.000000000 0.000000000 0.001007049 0.003021148 0.000000000 0.000000000 E 0.200000000 0.000000000
2009 Dec 15
3
RFC: lchoose() vs lfactorial() etc
lgamma(x) and lfactorial(x) are defined to return ln|Gamma(x)| {= log(abs(gamma(x)))} or ln|Gamma(x+1)| respectively. Unfortunately, we haven't chosen the analogous definition for lchoose(). So, currently > lchoose(1/2, 1:10) [1] -0.6931472 -2.0794415 NaN -3.2425924 NaN -3.8869494 [7] NaN -4.3357508 NaN -4.6805913 Warning message: In
2018 May 01
2
Specifying priors in a multi-response MCMCglmm
Hi all, I previously emailed about a multinomial model, and after seeking some additional help, realized that since my response/outcome variables are not mutually exclusive, I need to use a multi-response model that is *not* multinomial. I'm now trying to figure out how to specify the priors on the multi-response model. Any help would be much appreciated. My data look like this: X
2018 May 01
0
Specifying priors in a multi-response MCMCglmm
1. (Mainly) Statistical issues are generally off topic on this list. You might want to try the r-sig-mixed-models list instead. 2. However, I think a better answer is to seek local statistical expertise in order to have an extended discussion about your research intent in order to avoid producing yet more irreproducible psychological research. Cheers, Bert Bert Gunter "The trouble with
2018 May 01
2
Specifying priors in a multi-response MCMCglmm
Hi Bert, That was distinctly unhelpful, and your outward hostility to a field you obviously don't understand reveals a regrettable level of ignorance. By the way, my research is Anthropology despite my job title. Michelle On Tue, May 1, 2018 at 2:48 PM, Bert Gunter <bgunter.4567 at gmail.com> wrote: > 1. (Mainly) Statistical issues are generally off topic on this list. > You