similar to: copy the columns based on the code

Displaying 20 results from an estimated 3000 matches similar to: "copy the columns based on the code"

2012 Mar 20
2
Unique in DataFrame
Hello, I have little doubt, and I do not think that the way I solve the problem is the best way to do it. The following is a small dataset x<-data.frame(city="Barcelona",sales=253639) x<-rbind(x,data.frame(city="Madrid",sales=223455)) x<-rbind(x,data.frame(city="Lisbon",sales=273633)) x<-rbind(x,data.frame(city="Madrid",sales=266535))
2009 Jun 23
2
Long to wide format without time variable
Hi all, I am trying to convert a data set of physician death codings (each individual's cause of death is coded by multiple physicians) from long to wide format, but the "reshape" function doesn't seem to work because it requires a "time" variable to identify the sequence among the repeated observations within individuals. My data set has no order, and different
2009 Jul 28
1
Fwd: randomized block design analysis in R
---------- Forwarded message ---------- From: alis villiyam <aalisiyan at gmail.com> Date: Mon, Jul 27, 2009 at 9:47 AM Subject: randomized block design analysis in R To: bolker at zoology.ufl.edu Dear All user Hello, I'm a student and I have some trouble with the experimental (columns-experiments) design of my project. I use a randomized block design with 4 treatments including a
2001 Aug 30
1
imagenrgb: Function to display RGB images in R
I've writen this function (imagenrgb) to display a (m,n,3) array as a RGB image with ngris^3 colors and,optionally, stretching. If option ver=F, it does not display but saves a pseudocolor version of the image as a list (so that subsequent displays are faster). I'd appreciate feedback and improvements and hope that it's useful for others. Example of use: > dim(imatest) [1] 100
2012 May 29
1
problems with xlim in plot.zoo() and window()
I'm trying to get a minimally intuitive way of plotting zoo objects extracted for given periods of time I do: > plot(alyL32007z$NEE_st,col=cod,type="b",pch=18,xlim=time(alyL32007z)[c(3000,15000)]) and get a correct plot but the expression for xlim is hard to read by humans. I try > time(alyL32007z)[c(3000,15000)] [1] "2007-03-04 11:30:00 UTC" "2007-11-09
2011 May 19
2
Separating boot results
Good Morning, I'm having what I hope to be a simple problem. I am generating bootstrap confidence intervals using package (boot) - which works perfectly. The issue I am having is getting the results into a format which I can write out to a database. To be clear I am having no problems generating the results, I just need to convert the format of the results such that I can store the results in
2010 Jan 20
1
Merge and join data
Hi, I'm looking to combine two data frames. Several of the columns are in common while the others need to be summed up. The apply functions and the merge functions don't seem to be working. I've included a basic example of what I'm trying to do below. Thanks! Sean data.frame1<-as.data.frame(matrix(c('winter','dredge','515',100,150),1,5))
2010 Nov 04
5
Sorting data from one column with strings
Hello, I have tried to find this out some other way, but unsuccessful I have to try this list. I assume this should be quite simple. I have a dataset with 4 columns, "Sample_no", "Species", "Nitrogen", "Carbon" in csv format. In the species column I have many different species with varying number of obs per species Eg "Sample_no"
2007 Sep 21
3
Standardize environment between specs containing class defs
I have some specs that involve the use of eval and class definitions to test code generation. I want to always start with a clean slate so none of my tests fail or succeed incorrectly due to artifacts left over from previous specs. Example of my situation Spec 1 defines class Fish class Cod < Fish Spec 2 defines class Animal class Cod < Animal In this situation the
2010 Nov 19
1
library(datasets)
## i have one question anouth this package.. library(datasets) eurodist ## if i type this i get max distance between european cities > max(eurodist) [1] 4532 ## but i would like get something like this: 4532 Gilbratar - Anthens ## and another one.. ## if a live in barcelona and i would like travel in all cities ## how can i get sum of all distance to other cities... i try
2008 Nov 21
1
Problem with data.frame()
Given > str(x) 'data.frame': 5284 obs. of 5 variables: $ COD : chr "0800101001" "0800101002" "0800101003" "0800101004" ... $ 0-4 : num 79 215 84 58 127 134 15 122 101 99 ... $ 5-9 : num 76 180 32 56 81 106 10 112 128 96 ... $ 10-14: num 68 145 39 46 78 81 8 92 142 107 ... $ 15-19: num 73 170 49 52 103 77 10 116 129 129 ... I
2008 Nov 14
2
GAM and Poisson distribution
Hi -I'm running a GAM with 7 explanatory variables with a Poisson error structure. All of the variables are continuous so I'm getting error messages in R. cod.fall.full.gam.model<-gam(Kept.CPUE~s(HOUR)+s(LAT_dec)+s(LONG_dec)+s(meantemp_C)+s(meandepth_fa)+s(change_depth)+s(seds), data=cod.fall.version2,family=poisson) In dpois(y, mu, log = TRUE) ... : non-integer x = 5.325517
2010 Jan 03
3
R2HTML Report number format, or Better Way?
Here I am again with question I'll feel foolish for asking, when I see the answer. I'm trying to produce a report and here's where I get stuck: How do I get R2HTML to produce the same number format? Particularly remove the decimal places for Par and Sal. Are there better methods to produce this type of report? Thanks, L.A. R version 2.10.0 XP
2004 Aug 13
2
lapply problem
R-help, I wish to replace NULL elements(or missing) in the following list : > z2 $cod mean sd 62.56190 12.65452 $haddock mean sd 36.61490 11.50365 $ling mean sd 86.17949 20.43587 $saithe mean sd 50.275847 5.453606 $whiting NULL $"norway pout" mean sd 13.739623 1.393104 $"great silver smelt" mean
1997 Dec 19
1
R-beta: a bug in the lm function ?
I ran a function called BoxCox, taken from the book by Venables and Ripley, for checking the need for power transformation. This function works fine using the version 0.50 of R, but gives an error message with version 0.60. The lm function in version 0.60 is different from that in version 0.50. Is there a bug in the new lm function? Kung-Sik Chan >
2009 Mar 18
2
shutdown by o2net_idle_timer causes Xen to hang
Hello, we've had some serious trouble with a two-node Xen-based OCFS2 cluster. In brief: we had two incidents where one node detects an idle timeout and shuts the other node down which causes the other node and the Dom0 to hang. Both times this could only be resolved by rebooting the whole machine using the built-in IPMI card. All machines (including the other DomUs) run Centos 5.2
2010 Feb 25
1
tabla de datos...
COD.EST VARIABLE AÑO DIA ENERO FEBRERO MARZO ABRIL MAYO JUNIO JULIO AGOSTO SEPBRE OCTUBRE NOVBRE DICBRE 1 2501001 PT 1986 1 NaN NaN NaN NaN 2.0 .0 .0 9.0 NaN NaN NaN NaN 2 2501001 PT 1986 2 NaN NaN NaN NaN .0 11.0 19.0 .0 NaN NaN NaN NaN 3 2501001 PT 1986 3 NaN NaN NaN NaN 11.0 3.0 .0 .0 NaN NaN
2008 Feb 19
3
Incorrect paste() output (PR#10801)
Hello, I am writing this message because of an incorrect output by paste(). Please try the following script to see if the evidence I collected is reproducible: x <- c(10152, 28177); y <- c(9576, 26625); d <- y - x; d; [1] -576 -1552 paste(d, collapse = ", "); [1] "-576, -1552" x <- x / 1000; y <- y / 1000; d <- y - x; d; [1] -0.576 -1.552 paste(d,
2007 May 29
1
Fw: hierarhical cluster analysis of groups of vectors
Hi Rafael, What about multivariate logistic regression? ----- Forwarded Message ---- From: Rafael Duarte <rduarte@ipimar.pt> To: Anders Malmendal <anders@chem.au.dk> Cc: r-help@stat.math.ethz.ch Sent: Tuesday, May 29, 2007 3:21:11 PM Subject: Re: [R] hierarhical cluster analysis of groups of vectors It seems that you have already groups defined. Discriminant analysis would probably
2006 Nov 30
4
R_WinEdt question
if I want to put fig1plot to the left, figYPplot to the right figYAaplot on the bottom. How to modify the following cod to do these? \begin{figure}[H] \centering \begin{minipage}[t]{0.5\textwidth} \centering <<label=fig1plot,fig=TRUE,echo=FALSE>>= <<fig1plot>> @ %\caption{Caption 1} \end{minipage} \begin{minipage}[t]{0.5\textwidth} \centering