similar to: dput data frame

Displaying 20 results from an estimated 20000 matches similar to: "dput data frame"

2011 Jul 30
4
Replacing null values
I would like to reorder a two-column table by column A, then fill column B with the values above it. For example: Original:A B2 545 NA8 784 NULL3 269 NULL First sort by column A:A B2 543 264 NULL5 NA8 789 NULL Then replace null/na values in column B with the value above it:A B2 543 264 265 268 789 78 What is the best
2011 Aug 03
4
Convert matrix to numeric
I have a matrix that looks like this: structure(c("0.0376673981759913", "0.111066500741386", "1", "1103", "18", "OPEN", "DEPR", "0.0404073656092023", "0.115186044704599", "1", "719", "18", "OPEN", "DEPR", "0.0665342096693433",
2012 Feb 07
5
Table rearranging
I have a table that looks like this: measurement?? ?date??? door ?? color 0.93529385?? ?513?? ?open?? ?red 0.97419293?? ?420??? open ?? red 0.962053514?? ?513?? ?closed?? ?red 0.963909937?? ?1230?? ?open?? ?blue 0.97652034?? ?1230?? ?open?? ?green 0.989310795?? ?1230?? ?closed?? ?blue 0.9941022?? ?917?? ?closed?? ?yellow I would like to create a table that has: Open measurement, Closed
2011 Oct 20
2
Calculating differences
I have a table that looks like this: structure(list(speed = c(3,9,4,8,7,6), C = c(0.697, 0.011, 0.015, 0.012, 0.018, 0.019), house = c(1, 1, 1, 1, 1, 1), date = c(719, 1027, 1027, 1027, 1030, 1030), hour = c(18, 8, 8, 8, 11, 11), id = c("1000", "10000", "10001", "10002", "10003", "10004")), .Names = c("speed",
2012 Jan 25
3
Gray levels
The gray (level) function returns different shades of gray, where level is a vector of numbers ranging from 0 to 1.? 0 is white and 1 is black and everything in between is a shade of gray. Is there a function that will let me choose two different colors?? For example, a 0 might be blue and 1 might be red and in between might be a mix. Jeffrey
2011 Aug 05
2
Aggregating data
I aggregated my data: aggresults <-aggregate(results, by=list(results$a, results$b, results$c), FUN=mean, na.rm=TRUE) results has about 8000 lines of data, and aggresults has about 80 lines. I would like to create a separate variable for each of the 80 aggregates, each containing the 100 lines that were aggregated. I would also like to create plots for each of those 80 datasets. Is
2011 Nov 22
3
Binned line plot
I have a scatter plot with 10000 points.? I would like to add a line that bins every 50 points and connects the average of each bin.? I'm looking for something similar to line type "m" in Stata. With this dataset of 10000 points, I would also like to bin the data and make boxplots at certain intervals, so that I have a set of boxplots to represent each bin.? I would also like the
2011 Aug 02
1
Calculate mean ignore null
I have the following: Tout = c(". ", ". ", + "-51.0", " -9.6", " -9.6", " -9.6", " -9.6", " -9.6", " -9.6", + " -9.6", " -9.5", " -9.5", " -9.6", " -9.5", " -9.6", " -9.6", + " -9.5", " -9.4", "
2012 Jan 10
2
Aggregate by minimum
For each date, I would like to keep the line with the lowest speed and discard the rest. The result would have one line for each date. Can I use aggregate for this? My table is as follows: structure(list(speed = c(3,9,14,8,7,6), result = c(0.697, 0.011, 0.015, 0.012, 0.018, 0.019), house = c(1, 1, 1, 1, 1, 1), date = c(719, 1027, 1027, 1027, 1030, 1030), id = c("1000",
2012 Aug 28
1
Don't dput() data frames?
/src/main/attrib.c contains this comment in row_names_gets(): /* This should not happen, but if a careless user dput()s a data frame and sources the result, it will */ which svn blame says Prof Ripley placed there in r39830 with the commit message "correct the work of dput() on the row names of a data frame with compact representation." Is there a problem / better way to
2017 Oct 11
3
dput(treat)
I got advice here that I didn't understand! Can I ask to explain me the meaning of this procedure: first get the structure, and then assign it back. For what? Thanks!? (Great thanks to Moderator/Admin!) You should learn to post in plain text and use dput to present your data structures. At your console do this dput(treat) # and this will appear. Copy it to your plain-text message:
2007 Apr 22
1
dput/dget when a data frame has 2 rows (PR#9627)
This doesn't seem right; I'm using R version 2.4.1 (2006-12-18) on Mac OS and Win XP and find the same issue: > mydataframe <- data.frame(ppi=c(.5,.5),mmu=c(5,10)) > dput(mydataframe,"mydataframe.txt") > dget("mydataframe.txt") Error in attributes(.Data) <- c(attributes(.Data), attrib) : row names must be 'character' or 'integer', not
2014 Nov 10
1
subscripting a data.frame (without changing row order) changes internal row.names
Dear R-devel, Can anyone help me to understand this? It seems that subscripting the rows of a data.frame without actually changing their order, somehow changes an internal representation of row.names that is revealed by e.g. dput/dump/serialize I have read the docs and inspected the (R) code for data.frame, rownames, row.names and dput without enlightenment. df=data.frame(a=1:10, b=1)
2012 Aug 14
2
Communative Matrix Multiplcation
Friends I'm not seeing why the following occurs: > T1 <- (A1 - A2) %*% D > T2 <- (A1 %*% D) - (A2 %*% D) > identical(T1, T2) [1] FALSE Harold > dput(A1) new("dsCMatrix" , i = c(0L, 1L, 2L, 3L, 0L, 1L, 4L, 2L, 3L, 5L) , p = c(0L, 1L, 2L, 3L, 4L, 7L, 10L) , Dim = c(6L, 6L) , Dimnames = list(NULL, NULL) , x = c(5, 5, 5, 5, 5, 5, 10, 5, 5, 10)
2012 Nov 23
2
Data frame manipulation
Hello, I have a table that was constructed in a wrong way (dput data on bottom - wrong data-frame): Local Mês Dia Colonia X6h X7h X8h X9h X10h X11h X12h X13h X14h X15h X16h X17h 1 Conceição Junho 1 3 2.16137 2.20412 2.08991 1.72428 1.69897 1.62325 1.44716 1.51851 1.43136 1.47712 1.51851 1.04139 2 Conceição Junho 2 3 2.46538 2.13672
2007 Oct 17
1
dget not restoring dput in R 2.6.0 (PR#10350)
Full_Name: David States Version: 2.6.0 OS: Windows XP64 Submission from: (NULL) (141.211.38.9) # The pair of commands # # dput(object, "file.dput") # object = dget("file.dput") # # should be a no op, but this is not working correctly for all objects. # # Simple example: # # make a simple object of class "hclust" cl = hclust(dist(matrix(nrow=4,ncol=4, c(1:16)))) #
2006 Oct 25
1
sourcing dput output
Is this not supposed to work? > dput(BOD, file = "/BOD.R") > source("/BOD.R") Error in attributes(.Data) <- c(attributes(.Data), attrib) : row names must be 'character' or 'integer', not 'double' > dput(iris, file = "/iris.R") > source("/iris.R") Error in attributes(.Data) <- c(attributes(.Data), attrib) :
1999 Feb 12
1
more on dput
I would like to write data so that I can re-read it and reproduce results, preferably in both R and Splus. In the past when I have done this my data has been relatively simple and I've just scan()ed it. Now I have a fairly complicated structure I would like to preserve and I've been trying to use dput and dget. Is there a better way? If not, the following truncation by dput, which I
2018 Apr 23
4
R 3.5.0 fails its regression test suite on Linux/x86_64
Hi, I just tried to upgrade Nixpkgs to R 3.5.0, but unfortunately the new version fails its regression test suite. We configure the build using the flags "--without-recommended-packages", in case that's relevant. You can see a complete build log with all relevant information at [1]. Anyway, the test failures look like this: | make[3]: Entering directory
2012 Jun 19
1
how to manipulate dput output format
I am reading into Java dput output for a matrix, more specifically for a file backed big-matrix. I basically need to lift dimnames for a matrix from dput output. It's no big deal, but the code is very 'hackish' due to the need to get rid of quotes, endlines, parenthesis, etc. I was wondering if i could manipulate to an extent dput output with some options that define it, for example,