similar to: R: Optional argument to be used in a subset function

Displaying 20 results from an estimated 20000 matches similar to: "R: Optional argument to be used in a subset function"

2001 Mar 14
3
get statistics by group
Hi, I have a data set look like this: ================================= Fruit Quty apple 20 banana 10 orange 17 apple 30 apple 15 orange 26 banana 15 .........and so on .......... ================================= The level of fruit is 30, that is, there are 30 different fruits. I'd like to compute some simple statistics for each different fruit and get output like this:
2004 Mar 10
2
data frame filtration
Hi, R-help: I am a new user of R and am very pleased with R's features. Here I have one question regarding data frame manipulation. I have a data frame look like this: Fruit Condition 1 Orange Good 2 Orange Bad 3 Orange Good 4 Orange Good 5 Orange Bad 6 Apple Good 7 Apple Bad 8 Apple Good 9 Apple Good 10 Apple Bad 11 Apple Good 12 Apple Bad 13
2008 Sep 08
3
extracting max row from data matrix
dear group, i have a data matrix with some replicate items with different values. I want to extract the row with max value. for example: > x fruit weight 1 apple 1.3 2 apple 1.5 3 apple 1.6 4 orange 1.4 5 orange 1.6 x is a data frame. I want to extract unique items from fruits that has max weight. that is: 3 apple 1.6 5 orange 1.6 I want to be able to use
2005 Aug 15
2
randomForest Error passing string argument
I'm attempting to pass a string argument into the function randomForest but I get an error: state <- paste(list("fruit ~", "apples+oranges+blueberries", "data=fruits.data, mtry=2, do.trace=100, na.action=na.omit, keep.forest=TRUE"), sep= " ", collapse="") model.rf <- randomForest(state) Error in if (n==0) stop ("data(x) has 0
2011 Aug 11
1
help with loops
hi I need help with list object. I have a list object > a <- c('apple','orange','grape') > b <- c('car','truck','jeep') > c <- list(a,b) > names(c) <- c('fruit','vehicle') > c $fruit [1] "apple" "orange" "grape" $vehicle [1] "car" "truck"
2006 Sep 01
1
Reading many files at once
dear group, i have 100 files starting with 'hsa-*'. ex. file: fruit p-value ------------ apple 0.0003 orange 0.004 kiwi 0.0003 peach 0.0004 I want to read all these files and create a single matrix. here each file may have different fruit names. in the matrix i want to have a union of all fruits and those should be the rows in the matrix and file names should be columns.
2007 May 13
1
Dropdown boxes in tcltk and R
Hello, I'm very much a newbie in R and more so in tcltk so apologies if this question is stupid. Basically I am trying to use the combobox example found here: http://bioinf.wehi.edu.au/~wettenhall/RTclTkExamples/DropDown.html . What I want to do is in that example get fruitChoice as a variable in R in general. When I run that code, however, and the ask for fruitChoice it says
2011 Feb 18
1
plot3d, color points by group
Hello I've created a 3d scatterplot, and had no problems labeling the points. However, I've been really struggling to change the color of the points based on a factor (see 'group' below). Is such a thing possible? My data look like this: food group x y z apple fruit 0.216 -0.112 -0.893 orange fruit 0.814 0.097 0.460 broccoli veg -0.239 0.240 -0.425 banana
2004 Oct 18
3
答复: R plot problems
Thank you for your help! I gave you an example, you could run it in R . Maybe you will understand my meaning clearly. x <- data.frame(main.name="AAA", x.name=rep(c("Apply","Watermelon","Lemon","Banana",
2011 May 31
2
creating a vector from a file
Hello all, I am new to R and my question should be trivial. I need to create a word cloud from a txt file containing the words and their occurrence number. For that purposes I am using the snippets package [1]. As it can be seen at the bottom of the link, first I have to create a vector (is that right that words is a vector?) like bellow. > words <- c(apple=10, pie=14, orange=5, fruit=4)
2008 Sep 24
1
looping through variables
Hello everyone, I have the following problem: My analysis includes many predictor variables (>50) in the form of raster maps (asc), but I am trying to avoid having to type all their names over and over again in the analysis (e.g. for vectorisation, for deletion of NA's, etc.) So ideally I would like to store them in some way that their names only have to be typed once and can always
2002 Sep 10
3
print
Hi all, Suppose I have a vector Fruits <- c('Apple','Orange','Pear','Banana','Mango') I want to print the statement "The fruits in the basket are: Apple, Orange, Pear, Banana, Mango" If I do: print(paste('The fruits in the basket are:',Fruits)) The output is: [1] "The fruits in the basket are: Apple" "The fruits in
2006 Nov 16
3
Newbie problem ... Forest plot
Hello! I have some data stored into 2 separate csv file. 1 file (called A.csv) (12 results named Group1, Group2, Group3, etc...) odds ratios, 2 file (called B.csv) 12 corresponded errors. How to import that data into R and make forest plot like I saw inside help file Rmeta and meta with included different font colors and names trough X and Y axis. I know for meta libb ... out <-
2013 Mar 23
1
Error with custom function in apply: ”Error in FUN(newX[, i], ...) : unused argument(s) (newX[, i])”
Hi everyone, I wonder if I can get your help using a custom function in apply. Imagine the following dataframe called "data": LowLim HighLim A1 A2 A3 A4 4 6 3 4 5 6 4 6 4 5 5 6 2 3 1 4 2 3 2 3 NA NA NA NA We have created a custom function (see below) that takes the values in a given row between columns A1 to A4 to see if they are outside the limits in the same
2003 Nov 24
2
1.8.1 and subsetting dataframes
I've encountered something that didn't arise using earlier versions of R (Linux). A dataframe is created and new columns added to it by doing calculations using apply with various functions on some of the original columns. It's somewhat too involved to give a toy example that's reproducible. However, the resulting phenemonon can be characterised by the following: Browse[1]>
2011 Feb 07
2
Confused
Hi Im confused by one thing, and if someone can explain it I would be a happy > rev(strsplit("hej",NULL)) [[1]] [1] "h" "e" "j" > lapply(strsplit("hej",NULL),rev) [[1]] [1] "j" "e" "h" Why dossent the first one work? What is it in R that "fails" so to say that you need to use lapply for it to get
2020 Jun 01
1
Extended attributes not working on mac
I?m not sure if this is related, but there was a regression a while back in handling resource forks in folder icons. It was supposed to be fixed in 4.10.13 but I don?t think it quite works yet and I haven?t had the time to test it further yet. -Perttu > On 30 May 2020, at 21.00, Martin Steiner / 3MF GmbH via samba <samba at lists.samba.org> wrote: > > I changed the configuration
2020 May 29
3
Extended attributes not working on mac
I worked with Netatalk for years and want to switch to Samba now. Currently i use Ubuntu 20.04. and Debian 9 before, i had no issues with netatalk at all. As soon as i try to add a color tag (e.g. yellow) with Mac OS 10.15.5, the tag appears shortly but hides one second later. The file system is ZFS with no special options configured. I tried the Ubuntu package but also the builds from source
2004 Oct 18
1
How to draw x-axis time label.
Hi everybody, Could I consult one problem? It is about plot Now I do some analysis in plot . I need to draw a plot which x-axis is time . But when I run the funtion of plot . The x-label are very oddness number, such as the time is "2004-08-05 09:08:48", but the x-label is 1091800000. I don't know how to do . I have an example . Mybe It can explain my meaning clearly. Thank
2019 Jul 26
1
vfs_recycle throwing errors when files are deleted by a Mac on a share with vfs_fruit enabled
Hi, My log files are being flooded with errors like the ones below whenever a Mac delete files from a Samba share. [2019/07/26 14:02:26.182564, 0] ../source3/modules/vfs_recycle.c:243(recycle_get_file_size) recycle: stat for Chris_Mac/._videos.docx returned No such file or directory [2019/07/26 14:02:27.186472, 0] ../source3/modules/vfs_recycle.c:243(recycle_get_file_size) recycle: stat