Re: [R] Joining tables with different order and matched values

2017-05-08 Thread Ulrik Stervbo
Hi Abo, ?merge or the join functions from dplyr. HTH Ulrik On Tue, 9 May 2017 at 06:44 abo dalash wrote: > Hi All .., > > > I have 2 tables and I'm trying to have some information from the 1st table > to appear in the second table with different order. > > > For Example, let's say this is my

Re: [R] passing arguments to simple plotting program.

2017-05-08 Thread Ulrik Stervbo
HI Gerard, You get the literals because the variables are not implicitly expanded - 'Placebo(N=n1) ' is just a string indicating the N = n1. What you want is to use paste() or paste0(): c(paste0("Placebo(N=", n1, ")"), paste0("Low Dose (N=", n2, ")"), paste0("High Dose (N=", n3, ")")) should do

Re: [R] How do I use R to build a dictionary of proper nouns?

2017-05-08 Thread θ "
Hi Boris : I'm very thanks for your reply and your suggestions. In order to be clear show my workflow, I have added my code and document file in the attachment. My research target is to get the topic technique of CMP (chemical mechanical polishing). So I want to use related patent texts to do te

Re: [R] Extract cells and their adjacent cells that may appear anywhere in a dataframe.

2017-05-08 Thread Jeff Newmiller
Please don't post in HTML... what YOU see is almost never what WE see (look below for something like what I saw). Read the Posting Guide for more help on how to use the list, including the recommendation to formulate your question as a minimal R example (runnable code). See for example [1] and/o

[R] passing arguments to simple plotting program.

2017-05-08 Thread Gerard Smits
Hi All, I thought I’d try to get a function working instead of block copying code and editing. My backorund is more SAS, so using a SAS Macro would be easy, but not so lucky with R functions. R being used on Mac Sierra 10.12.4: R version 3.3.1 (2016-06-21) -- "Bug in Your Hair" Copyright (C)

[R] Extract cells and their adjacent cells that may appear anywhere in a dataframe.

2017-05-08 Thread Brian Leo
Hello, I have a dataframe that contains information about vegetation cover and percent coverage, collected using a quadrat. The dataframe is set up so that each row represents a single quadrat. If there are multiple species within one quadrat, they are all listed within the same row with respect

Re: [R] Copy and Rename Folder in same directory

2017-05-08 Thread peter dalgaard
> On 8 May 2017, at 13:54 , Duncan Murdoch wrote: > > On 08/05/2017 7:12 AM, Archit Soni wrote: >> Hey Duncan, >> >> There are no sub folders in the folder which its content i want to copy. >> Just 4 files. > > Okay, so you won't need "recursive = TRUE". Um, wouldn't it work just to do file

[R] Revolutions blog: April 2017 roundup

2017-05-08 Thread David Smith via R-help
Since 2008, Microsoft (formerly Revolution Analytics) staff and guests have written about R every weekday at the Revolutions blog (http://blog.revolutionanalytics.com) and every month I post a summary of articles from the previous month of particular interest to readers of r-help. In case you miss

Re: [R] visualization of KNN results in text classification

2017-05-08 Thread Ismail SEZEN
As far as I know, kNN groups by Eucledian distance. So, you need numerical data as input. You said your dataset has only “speeches” and “type of people”. Are these input? or one of them is input and the latter one is output? Type of people should be a factor variable (I guess). I don’t know how

Re: [R] visualization of KNN results in text classification

2017-05-08 Thread Sarah Goslee
Well, probably you need to first tell us why none of the suggestions that come up when you google "plot KNN results in R" work for you, and what other kind of plot you are trying to produce, and what you have tried, so we can offer advice that helps. As it is, we have no idea what you are after.

Re: [R] visualization of KNN results in text classification

2017-05-08 Thread Elahe chalabi via R-help
Any idea?! On Sunday, May 7, 2017 5:56 PM, Elahe chalabi via R-help wrote: Hi all, Does anyone know what is the best way to visualize KNN(K nearest neighbor) results for classification of texts in R? My data set has only speeches and the type of the people for them which is control

Re: [R] Copy and Rename Folder in same directory

2017-05-08 Thread Duncan Murdoch
On 08/05/2017 7:12 AM, Archit Soni wrote: Hey Duncan, There are no sub folders in the folder which its content i want to copy. Just 4 files. Okay, so you won't need "recursive = TRUE". list.files('Old Folder Path') gives me the files in this folder. That's not the same as you typed below.

Re: [R] Copy and Rename Folder in same directory

2017-05-08 Thread Archit Soni
No Ben, I want to copy the contents and have the original file is as master file. On Mon, May 8, 2017 at 4:42 PM, Ben Tupper wrote: > My eye gets drawn immediately to file.rename() - did you give that a shake? > > > > On May 8, 2017, at 6:59 AM, Archit Soni wrote: > > Hey Ben, > > I tried this,

Re: [R] Copy and Rename Folder in same directory

2017-05-08 Thread Archit Soni
Hey Duncan, There are no sub folders in the folder which its content i want to copy. Just 4 files. list.files('Old Folder Path') gives me the files in this folder. I am running this line that gives me False when running for all the 4 files file.copy(list.files(oldFolder),newFolder,recursive = T

Re: [R] Copy and Rename Folder in same directory

2017-05-08 Thread Ben Tupper
My eye gets drawn immediately to file.rename() - did you give that a shake? > On May 8, 2017, at 6:59 AM, Archit Soni wrote: > > Hey Ben, > > I tried this, > > # identify the folders > current.folder <- "C:/Where my files currently live" > new.folder <- "H:/Where I want my files to be copied

Re: [R] Copy and Rename Folder in same directory

2017-05-08 Thread Duncan Murdoch
On 08/05/2017 6:59 AM, Archit Soni wrote: Hey Ben, I tried this, # identify the folders current.folder <- "C:/Where my files currently live" new.folder <- "H:/Where I want my files to be copied to" # find the files that you want list.of.files <- list.files(current.folder, "SDM\\.tif$",full.nam

Re: [R] Copy and Rename Folder in same directory

2017-05-08 Thread Archit Soni
Hey Ben, I tried this, # identify the folders current.folder <- "C:/Where my files currently live" new.folder <- "H:/Where I want my files to be copied to" # find the files that you want list.of.files <- list.files(current.folder, "SDM\\.tif$",full.names=T) # copy the files to the new folder fi

Re: [R] Copy and Rename Folder in same directory

2017-05-08 Thread Archit Soni
Thanks Ben. :) On May 8, 2017 16:06, "Ben Tupper" wrote: > Hi, > > Checkout all of the functions for file/directory management under ?files > (note the plural). > > Cheers, > Ben > > > > On May 8, 2017, at 6:30 AM, Archit Soni > wrote: > > > > Hello, > > > > Forgive me to ask this kind of naive

Re: [R] Copy and Rename Folder in same directory

2017-05-08 Thread Ben Tupper
Hi, Checkout all of the functions for file/directory management under ?files (note the plural). Cheers, Ben > On May 8, 2017, at 6:30 AM, Archit Soni wrote: > > Hello, > > Forgive me to ask this kind of naive question. > > But it would be of immense help if you could help me suggesting a

[R] Copy and Rename Folder in same directory

2017-05-08 Thread Archit Soni
Hello, Forgive me to ask this kind of naive question. But it would be of immense help if you could help me suggesting a way to copy a folder in the same directory and paste it in the same directory with different name. Ex: C:/Folder A -- C:/Folder A_B Contents should be copied as is. Thanks f

Re: [R] How do I use R to build a dictionary of proper nouns?

2017-05-08 Thread Boris Steipe
Your workflow is not clear to me, so I can't give any specific advice. 1: I don't understand what you need. Do you need the column names changed? They correspond to the matched words. 2: How was the vector dictionary_word created? These are (mostly) stemmed nouns, but some of them are two or