[R] read.xls without row number, column numbers, or factors

2019-07-01 Thread asteya
Is there a way to use read.xls to copy a portion of a single row of an XLS spreadsheet to a list, without getting assigning row and column numbers, and, if the data consists of strings, without assigning levels? Or alternatively, to take the single-row data frame generated by read.xls and c

Re: [R] Read Unicode text (*.txt)

2019-07-01 Thread javad bayat
Dear all; I use your suggestion but I gave the same warning messages. I changed the file name (Data.csv). " d4<-read.csv("./Data.csv",sep=";",header=TRUE,encoding="UTF-16") Warning messages: 1: In read.table(file = file, header = header, sep = sep, quote = quote, : line 1

Re: [R] Read Unicode text (*.txt)

2019-07-01 Thread William Dunlap via R-help
If I recall correctly, Excel's 'Unicode' used to mean "UTF-16", which R's scan() did not recognize without a hint. The relevant argument is fileEncoding, not encoding. UTF-16 files generally have lots of null bytes and UTF-8 files have no null bytes and if you try to read UTF-16 as UTF-8 you get

Re: [R] Looking for R package to extract Concept from text files

2019-07-01 Thread Mehdi Dadkhah
Thank you so much! Have a nice day! With best regards, On Mon, Jul 1, 2019 at 11:16 AM Jeff Newmiller wrote: > Or https://cran.r-project.org/web/views/NaturalLanguageProcessing.html > > On June 30, 2019 11:13:10 PM PDT, Richard O'Keefe > wrote: > >Are you aware of https://www.tidytextmining.com

Re: [R] Looking for R package to extract Concept from text files

2019-07-01 Thread Mehdi Dadkhah
Thank you so much! Have a nice day! With best regards, On Mon, Jul 1, 2019 at 10:43 AM Richard O'Keefe wrote: > Are you aware of https://www.tidytextmining.com/ > > On Mon, 1 Jul 2019 at 16:57, Mehdi Dadkhah > wrote: > >> Thank you!! >> Have a nice day! >> With best regards, >> >> On Mon, Jul 1

Re: [R] Read Unicode text (*.txt)

2019-07-01 Thread Abby Spurdle
> Don't be so US-centric, Abby... how do you know that javad's version of Excel doesn't default to using semicolons? I don't. However, Comma-Separated Values (CSV) are, comma separated, by definition. So, if the files use semicolons, then... Also, the use of the wrong sep="my.delim" argument is

[R] cancerclass, which genes are used in the predictor model and model details

2019-07-01 Thread Yong Han
Hi All, This is the first time I use 'cancerclass' package in R. It works pretty well. However, I can't find out which genes are used in the predictor model and how these genes are combined together to build the predictor model. Thanks in advance. Yong > Sys.info() sysname

Re: [R] Read Unicode text (*.txt)

2019-07-01 Thread Jeff Newmiller
Don't be so US-centric, Abby... how do you know that javad's version of Excel doesn't default to using semicolons? ?read.csv2 On July 1, 2019 6:06:32 PM PDT, Abby Spurdle wrote: >> I am trying to read an excel CSV file (1.csv). When I read it as csv >file >> in R, the R shows me the exact numbe

[R] placement of plot in rgl

2019-07-01 Thread Duncan Mackay
Dear All I rarely use the excellent rgl package but have sometimes run into a problem with placement of the plot within the window. Up to now I have avoided having to find a solution. I was going through the series of posts from https://stat.ethz.ch/pipermail/r-help/2019-June/463014.html when

Re: [R] Read Unicode text (*.txt)

2019-07-01 Thread Abby Spurdle
> I am trying to read an excel CSV file (1.csv). When I read it as csv file > in R, the R shows me the exact number of row. But it puts all columns in > one column, while I have 3 or 4 columns in the data frame. > d4 = read.table("./4.csv",sep=";",header=TRUE) Firstly, I recommend against naming y

Re: [R] sd in aggregate and help.search/?? seem not to work as usual in latest version

2019-07-01 Thread Duncan Murdoch
On 01/07/2019 8:28 p.m., Duncan Murdoch wrote: On 01/07/2019 5:41 a.m., Marvin Kiene wrote: Additionally, the 'help.search()' always just gives the result: "No results found", for all of my students. Those students are probably using RStudio. This appears to be an incompatibility in the RStu

Re: [R] sd in aggregate and help.search/?? seem not to work as usual in latest version

2019-07-01 Thread Duncan Murdoch
On 01/07/2019 5:41 a.m., Marvin Kiene wrote: Additionally, the 'help.search()' always just gives the result: "No results found", for all of my students. Those students are probably using RStudio. This appears to be an incompatibility in the RStudio browser to a nearly unannounced (as far as

Re: [R] Read Unicode text (*.txt)

2019-07-01 Thread Jim Lemon
Yep, you're right. Jim On Tue, Jul 2, 2019 at 7:52 AM William Dunlap wrote: > > Should that encoding="UTF-8" be encoding="UTF-16"? > > Bill Dunlap > TIBCO Software > wdunlap tibco.com > > > On Mon, Jul 1, 2019 at 2:45 PM Jim Lemon wrote: >> >> Hi Javad, >> Unicode characters do have embedded

Re: [R] [FORGED] sd in aggregate and help.search/?? seem not to work as usual in latest version

2019-07-01 Thread Rolf Turner
On 1/07/19 9:41 PM, Marvin Kiene wrote: Hello dear helpers, I am currently running a small R-crash course for beginners at my university, since I believe that there a far too few lectures about how to use R. Thereby, I showed the '??' or 'help.search()' function to the students as well as the '

Re: [R] sd in aggregate and help.search/?? seem not to work as usual in latest version

2019-07-01 Thread Jim Lemon
Hi Marvin, One way to get around the problem with "sd" is to only process those columns of a data frame for which the variance is defined. It is an opportunity to show students how to write wrapper functions as well: sd_num<-function(x) return(ifelse(is.numeric(x),sd(x),NA)) df<-data.frame(group=

Re: [R] Read Unicode text (*.txt)

2019-07-01 Thread William Dunlap via R-help
Should that encoding="UTF-8" be encoding="UTF-16"? Bill Dunlap TIBCO Software wdunlap tibco.com On Mon, Jul 1, 2019 at 2:45 PM Jim Lemon wrote: > Hi Javad, > Unicode characters do have embedded nulls. Try this: > > d4<-read.table("./4.csv",sep=";",header=TRUE,encoding="UTF-8") > > Jim > > O

Re: [R] Read Unicode text (*.txt)

2019-07-01 Thread Jim Lemon
Hi Javad, Unicode characters do have embedded nulls. Try this: d4<-read.table("./4.csv",sep=";",header=TRUE,encoding="UTF-8") Jim On Tue, Jul 2, 2019 at 3:47 AM javad bayat wrote: > > Dear R users; > I am trying to read an excel CSV file (1.csv). When I read it as csv file > in R, the R shows m

[R] Read Unicode text (*.txt)

2019-07-01 Thread javad bayat
Dear R users; I am trying to read an excel CSV file (1.csv). When I read it as csv file in R, the R shows me the exact number of row. But it puts all columns in one column, while I have 3 or 4 columns in the data frame. " d4 = read.table("./4.csv",sep=";",header=TRUE) Warning messages: 1:

[R] Using rms Package's Predict function with transformed variables

2019-07-01 Thread Marc Burgess
Hello, I would like to use the rms Package's Glm and Predict functions in order to use some of the additional details that they provide. I'm struggling to get them to work in cases where the formula contains multiple transformed versions of the same variable however. For example Y ~ x + x^2 + log(

[R] sd in aggregate and help.search/?? seem not to work as usual in latest version

2019-07-01 Thread Marvin Kiene
Hello dear helpers, I am currently running a small R-crash course for beginners at my university, since I believe that there a far too few lectures about how to use R. Thereby, I showed the '??' or 'help.search()' function to the students as well as the 'aggregate()' function with 'FUN=sd'. T

Re: [R] splitting a column of data into multiple columns

2019-07-01 Thread Glenn Doherty
A very elegant solution Jim. Here is a tidyverse solution. Janet, this is a different sample set (the same you sent in another post a couple days ago), but it will work with this data frame as well. ### RECREATING YOUR DATA FRAME scen<-c("1","1","2","2","3","3") streamflow<-c("0.019234","0.019027"