similar to: [[.data frame and row names

Displaying 20 results from an estimated 3000 matches similar to: "[[.data frame and row names"

2007 Apr 20
2
sorting data in R
hello, I'd like know how to sort a data frame in R for example how I should do to sort by Catholic with swiss data frame like below thanks Fertility Agriculture Examination Education Catholic Infant.Mortality Courtelary 80.2 17.0 15 12 9.96 22.2 Delemont 83.1 45.1 6 9 84.84 22.2
2007 Mar 14
0
cannot delete the last column of a dataframe using "[<-" (PR#9565)
Hi, If df is a dataframe, its last column can't be deleted using "[<-", but other columns can be deleted this way. Example: > (df <- df0 <- data.frame(x = 1:3, y = 4:6, z = 7:9)) x y z 1 1 4 7 2 2 5 8 3 3 6 9 > df[, "z"] <- NULL Error in x[[jj]] : subscript out of bounds > df[, 3] <- NULL Error in x[[jj]] : subscript out of bounds >
2010 Nov 18
3
problems subsetting
Dear all, I have searched the forums for an answer - and there is plenty of questions along the same line - but none of the paproaches shown worked to my problem: I have a data frame that I get from a csv: summarystats<-as.data.frame(read.csv(file=f_summary)); where I have the columns Dataset, Class, Type, Category,.. Problem1: I want to find a subset of this frame, based on values in
2007 Oct 14
1
bug (?) in [.data.frame with matrix-like indexing
Consider in R-2.6.0 (also R-patched from yesterday): iris[1, c(TRUE, FALSE, FALSE, FALSE, FALSE)] ## Error in .subset2(xx, j) : recursive indexing failed at level 2 iris[1, c(FALSE, FALSE, FALSE, FALSE, TRUE)] ## Error in .subset2(xx, j) : attempt to select less than one element i.e. matrix-like indexing on data.frames, one logically-indexed dimension with only one value TRUE in it. It is
2011 Feb 24
1
Creating objects (data.frames) with names stored in character vector
Hello, I'm fairly new to R. I'm a chemist, not a programmer so please bear with me. I have a large data.frame that I want to break down (subset) into smaller data.frames for analysis. I would like to give the data.frames descriptive names which I have stored in a character vector. My original thought was that I want the subsets to show up as individual objects, but haveing them stored
2019 Apr 12
2
Question of syslinux chainloading
On at 2019-04-12 11:28 +0800, Lu Wei via Syslinux wrote: >> Regarding the MSDOS 7.1 boot files... Do you still have access to that Win98 >> system? If you do, I would suggest searching for "io.dos" and "msdos.dos". >> These might be set as "hidden" and/or "system" (use attrib if needed), and >> there might be some additional
2008 Jul 01
1
[.data.frame speedup
Below is a version of [.data.frame that is faster for subscripting rows of large data frames; it avoids calling duplicated(rows) if there is no need to check for duplicate row names, when: i is logical attr(x, "dup.row.names") is not NULL (S+ compatibility) i is numeric and negative i is strictly increasing "[.data.frame" <- function (x, i, j,
2020 Jun 17
2
subset data.frame at C level
Hi, Hope you are well. I was wondering if there is a function at C level that is equivalent to mtcars$carb or .subset2(mtcars, "carb"). If I have the index of the column then the answer would be VECTOR_ELT(df, asInteger(idx)) but I was wondering if there is a way to do it directly from the name of the column without having to loop over columns names to find the index? Thank you Best
2011 Mar 10
1
Help writing a Scheffe Contrast function for R
Hello, As a new user of R (less than a month) I have got my hands on several books and am pouting through the net looking for help in gaining understanding of this powerful tool. I am becoming more proficient with using basic functions to conduct basic statistics. I am now looking to learn how to write code. After a few small worthless functions I decided to try to create a function that was
2019 Apr 19
1
Question of syslinux chainloading
On 2019-4-13 8:45, Lu Wei wrote: > On 2019-4-13 4:23, C. Masloch via Syslinux wrote: >> MS-DOS 7.10 (first appearing in MSW 95 OSR2, later re-used in MSW 98 >> and 98 SE) and 8.00 (MSW Me, and MSW XP DOS boot diskettes) both >> support FAT32 equally well. >> >> MS-DOS 8.00 (without some patches that are around) only supports >> booting in DOS mode from
2008 Jan 31
1
difficulties computing a simple anova
My grasp of R and statistics are both seriously lacking, so if this question is completely naive, I apologize in advance. I've hunted for a couple hours on the internet and none of the methods I've found have produced the result I'm looking for. I'm currently a student in a Statistics class and we are learning the ANOVA. We had to do one by hand and then reproduce our work in SAS.
2013 Nov 20
6
[PATCH] xen/gnttab: leave lazy MMU mode in the case of a m2p override failure
From: Matt Wilson <msw@amazon.com> Commit f62805f1 introduced a bug where lazy MMU mode isn''t exited if a m2p_add/remove_override call fails. Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com> Cc: David Vrabel <david.vrabel@citrix.com> Cc: Anthony
2011 May 03
1
Visiting Researcher, species distribution modelling, Cali, Colombia
Dear All, The Decision and Policy Analysis (DAPA) program of the International Center for Tropical Agriculture (CIAT), a not-for-profit agriculture, biodiversity and ecosystems research center, supported by the Consultative Group of International Agricultural Research (CGIAR), with headquarters in Cali, Colombia is looking for a visiting researcher to work on various modeling projects, primarily
2012 Jan 21
1
Function for multiple t tests
Hi, I want to run t.test() for several variables among two groups, and I would like to skip the tedious process of collecting information to assemble a table, but I am not sure if the function I want already exists. Any suggestion would be appreciated. I have a working example, as required by the posting guide: my_swiss = swiss[-1,] my_swiss$facto = rep(1:2,nrow(my_swiss)/2)
2009 Sep 13
1
Manage an unknown and variable number of data frames
Hi, In the code below I create a small data.frame (dat) and then cut it into different groups using CutList. The lists in CutList allow to me choose whatever columns I want from dat and allow me to cut it into any number of groups by changing the lists. It seems to work OK but when I'm done I have a variable number of data frames what I need to do further operations on and I don't know
2007 May 04
1
subset
hello, > subset(swiss, Agriculture > 60 & Examination != c(14,16), select = c(Agriculture,Examination,Catholic)) Agriculture Examination Catholic Broye 70.2 16 3.30 Glane 67.8 14 4.20 Aigle 62.0 21 5.16 Avenches 60.7 19 5.23 Cossonay 69.3 22 5.62
2004 Dec 14
1
Multiple options for a package
Hi R-devel, I am facing a situation where the number of options I would like to propose to the user is somewhat big (and could easily increase more and more as I will code up a little more - even coming to a point where an user should be able to implement his own options). What we have to handle options is the couple: options(par=value) and getOption("par") I was aking myselft what
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 =
2012 Apr 21
2
using "factor" to eliminate unused levels without dropping other variables
Hello, I have been banging my head against the wall trying to figure out this seemingly simple problem with no success. I'm hoping that one or some of you can help. Here is the code I am trying to use: #importing data data.file <-read.csv("/file/location", header=TRUE, sep = ",") #selecting a subset of data based on variable "Sample" data.subset1 <-
2006 Oct 04
1
Samba - CUPS - Fax
Hi, I need fax on linux server shared with MSW stations. If I use samba without CUPS support, it is simple - lpr comman for printer Fax is replaced by my faxspool programm - this connect via tcp/ip small gui on workstation and ask user for fax number and description. When I use CUPS, this seen simple too - i wrote backend using my faxspool, this connect via tcp/ip... eee? Something is wrong! How