similar to: error when copy and transform within a data frame

Displaying 20 results from an estimated 10000 matches similar to: "error when copy and transform within a data frame"

2007 Jun 27
3
exaustive subgrouping or combination
Dear Colleagues, I am looking for a package or previous implemented R to subgroup and exaustively divide a vector of squence into 2 groups. For example: 1, 2, 3, 4 I want to have a group of 1, (2,3,4) (1,2), (3,4) (1,3), (2,4) (1,4), (2,3) (1,2,3), 4 (2,3), (1,4) ... Can someone help me as how to implement this? I get some imaginary problem when the sequence becomes large. Thanks much in
2013 Jan 26
1
Attempting to confirm a program i wrote in C (normalize 2 datasets, transform into histogram, transform into CDF, perform KS test)
I have written a program in C that two xy datasets, aligns these 2 datasets based on shared features, transforms them into equal sized histograms, transforms the histograms into cumulative distribution functions (via GSL) and finally performs a KS_test. I am wanting to validate my program's results and figure'd i would use R but i am kinda stuck at ithe histograms (I have 2 histogram
2012 Apr 22
1
Transform dataframe
Ein eingebundener Text mit undefiniertem Zeichensatz wurde abgetrennt. Name: nicht verf?gbar URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20120422/bb638d28/attachment.pl>
2018 Mar 30
2
getting all circular arrangements without accounting for order
Jeff, I wanted to let you know that your function is faster than generating the directional circular permutations and weeding. Here is the time for n = 10. I compared with just doing the permutations, there is no point in proceeding further with the weeding since it is slower at the start itself. system.time(directionless_circular_permutations(10)) user system elapsed 1.576 0.000
2012 Oct 28
6
Having some Trouble Data Structures
Hi All, I'm trying to run a simulation of host-pathogen evolution based around individuals. What I need to have is a dataframe or table of some description - describing all the individuals of a pathogen population (so far I've implemented this as a matrix): ID No_of_Effectors Effectors (Sequences) [1,] 0001 3 ## 3
2011 Nov 29
2
how to transform a data file
Hello R people, I have a data file with 101 numeric variables: one variable called IDN (the individual's unique id number, which I need to retain, and which ranges from 1000 to 1320; some numbers are obviously skipped), and V1 to V100 (each has a value of 0 or 1; these 100 variables represent sequentially ordered days and whether a characteristic was present or absent--e.g., v1 is day 1 and a
2018 Mar 30
0
getting all circular arrangements without accounting for order
New function below is a bit faster due to more efficent memory handling. for-loop FTW! directionless_circular_permutations2 <- function( n ) { n1 <- n - 1L v <- seq.int( n1 ) ix <- combinations( n1, 2L ) jx <- permutations( n-3L, n-3L ) jxrows <- nrow( jx ) jxoffsets <- seq.int( jxrows ) result <- matrix( n, nrow = factorial( n1 )/2L, ncol = n ) k
2012 May 27
1
How do I modify sytem shell environment from within R?
Hi all, Could you please tell me how do I modify the environment variable (as below), from within R session? LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/mypath export LD_LIBRARY_PATH Thanks a lot! [[alternative HTML version deleted]]
2012 Sep 25
2
Strange data frame behavior
Hello all, I don't understand a strange behavior in data frame manipulation. data_frame1 = data.frame(Site = c("S1", "S2", "S3", "S4", "L1", "L2", "L3", "L4"), Number = c(1, 3, 5, 2, 1, 1, 2, 1)) data_frame2 = data_frame1 [data_frame1$Site != "S1", ] dput (data_frame2) structure(list(Site =
2011 Nov 29
2
Help with recast() syntax
Dear Help-Rs,   I have data similar to the following:   DF <- structure(list(X = 1:22, RESULT = structure(c(2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L), .Label = c("NEG", "POS"), class = "factor"), YR_MO = c(201011L, 201012L, 201101L, 201102L, 201103L, 201104L, 201105L, 201106L, 201107L, 201108L, 201109L, 201011L,
2013 Feb 15
1
file copy to password protected network drive
I am trying to copy files to a password protected drive which is "Ranch" at TACC from another network drive. I am logged in to the source drive and can run R there. The following code does not even find the destination folder. file.copy("sourcedrive/file.tar", " username@ranch.tacc.utexas.edu/uniqueID/destinationfolder/file.tar", overwrite = FALSE) Thanks in
2012 Aug 06
2
Identify points that lie within polygon
I have a complex 2D polygon with thousands of vertices, and I'd like to be able to identify points from a large set contained within the polygon, and was wondering if there might be an efficient way of doing this? Any advice would be useful! Here is a small example of what I mean: # make polygon v1<-c(0,1,1,2,1,3,6,7) v2<-c(1,3,3,5,6,7,8,9) plot(v1, v2, type = "n" )
2012 Jul 04
4
how to get list of files within a particular local file folder
Dear List, Say I can use getwd() and setwd() to change my working directory. How can I read in all the files within that directory using command line (like a ls() but for the path specified) Regards Ajay Websites- Technology http://decisionstats.com On Wed, Jul 4, 2012 at 3:30 PM, <r-help-request@r-project.org> wrote: > r-help@r-project.org [[alternative HTML version deleted]]
2013 Apr 15
6
Sorting data.frame and again sorting within data.frame
Dear R forum, I have a data.frame as defied below - df = data.frame(names = c("C", "A", "A", "B", "C", "B", "A", "B", "C"), dates = c("4/15/2013", "4/13/2013", "4/15/2013", "4/13/2013", "4/13/2013", "4/15/2013", "4/14/2013",
2011 Dec 29
2
sorting a data.frame (df) by a vector (which is not contained in the df) - unexpected behaviour of match and factor
Dear R colleagues, consider my data.frame named "df" with 3 columns - being level, prevalence and sensitivity - and 7 rows of data (see dump below). df <- structure(list(level = structure(1:7, .Label = c("0", "1", "10", "100", "1010", "11", "110"), class = "factor"), prevalence = structure(c(4L, 2L, 3L,
2013 Jan 31
2
Automated Start for new Rgui within existing R code?
Is there a way to start multiple instances of R in an automated manner? Since I'm not sure that question makes tons of sense, here's my scenario: I have a number of data updates that need to be completed on an ongoing basis with the data pulled from and then stored to another location. The updates are manually triggered, so can build up in terms of the volume that needs to be updated.
2018 May 01
0
how can I convert a long to wide matrix?
Hi Marna, This is a condition that the function cannot handle. It would be possible to reformat the result based on the time intervals, but the stretch_df function doesn't try to interpret the values, just stretches them out to a wide format. Jim On Wed, May 2, 2018 at 9:16 AM, Marna Wagley <marna.wagley at gmail.com> wrote: > Hi Jim, > The data set is correct. I took two
2012 Sep 06
1
use of ddply() within function
Dear all, I am encountering problems with the application of ddply within the body of a self-defined function. The script is the following: moncostcarmoto <- function(costtype){ costaux_result <- data.frame() for (purp in PURPcount){for (per in PERcount){ costcarin =
2013 Feb 08
2
Can not melt data.frame
I realize it's -12C and we're having the next best thing to a blizzard but why can I not melt this data frame. I am missing something terribly obvious but I just don't understand what the error message is saying. John Kane Kingston ON Canada Code and aata below #================================================# library(reshape2) melt(mydata, id.vars = c("date"))
2012 Aug 07
3
reshape2's dcast() Adds NAs to Data Frame
I need to understand how and why dcast() adds NAs to a data frame that contained no missing values. The database table of chemical concentrations has all missing values removed because they cannot contribute to data analyses. The structure of the R data frame of these data have no NA values, and neither does the data frame resulting from applying the reshape2 melt() function to it. However,