similar to: changing "," to "." in data.frame

Displaying 20 results from an estimated 1000 matches similar to: "changing "," to "." in data.frame"

2017 Oct 11
0
changing "," to "." in data.frame
And as follow up, fff<-function(x) gsub(",", ".", x) BX <- apply(apply(AX, 2, fff), 2, as.numeric) this seems to be easier. Cheers Petr S pozdravem | Best Regards RNDr. Petr PIKAL Vedouc? V?zkumu a v?voje | Research Manager PRECHEZA a.s. n?b?. Dr. Edvarda Bene?e 1170/24 | 750 02 P?erov | Czech Republic Tel: +420 581 252 256 | GSM: +420 724 008 364 petr.pikal at
2012 May 10
1
fda problems - version correct?
Dear friends - I am trying to understand fda and working with the 2009 book from Springer. I run the scripts directly from a new installed fda library and include sessionInfo() below. This is from the script fdarm-ch09.R - I seem to have got not fda_2.2.8 but 2.2.7 - is that the problem? Where do I get .8 as I just reinstalled? Best wishes Troels Ring, Nephrology Aalborg, Denmark >
2007 Mar 20
1
Error in nlme with factors in R 2.4.1
Hi, the following R lines work fine in R 2.4.0, but not in R 2.4.1 or any devel versions of R 2.5.0 (see below for details). library(drc) # to load the dataset 'PestSci' library(nlme) ## Setting starting values sv <- c(0.43355869, 2.49963220, 0.05861799, 1.73290589, 0.38153146, 0.24316978) ## No error m1 <- nlme(SLOPE ~ c + (d-c)/(1+exp(b*(log(DOSE)-log(e)))), fixed =
2007 Sep 12
1
plot vs curve
Dear list members, is it intentional that: curve(cos, xlim = c(-5, 5)) plot(cos, xlim = c(-5, 5)) produce different plots? Shouldn't the 'xlim' argument in both cases set the 'from' and 'to' argument if they aren't supplied (at least that's what I understood reading the help page for 'curve' and 'plot.function')? Christian >
2009 Feb 06
1
Introduction to maps (of Denmark)?
Dear R-listers, I am using R for Windows Vista 64-bit. I have no experience working with maps, but now I have to plot a map of Denmark in which each Danish county is color-coded according to its incidence rate of a particular disease. My problem is that I don't know where to start. I have read the help files to packages like 'mapplot', and their examples indicate that I am on the
2009 Feb 02
1
Assigning colnames in loop
Dear R-listers, I am trying to assign colnames to a data frame within a loop, but I keep getting a "target of assignment expands to non-language object"-error. I need to split up a large dataset into about 20 smaller ones, and I would like to assign colnames within the loop, so I won't have to type the same thing 20 times over. I have concocted this really goofy example which
2011 Jan 24
1
Strange result from sort: sort(c("aa", "ff")) gives "ff" "aa" with R.2.12.1 on windows 7
Dear list, Please consider the following call of sort > sort(c("a","f")) [1] "a" "f" > sort(c("f","a")) [1] "a" "f" > > sort(c("aa","ff")) [1] "ff" "aa" > sort(c("ff","aa")) [1] "ff" "aa" The last two results look strange
2009 Jan 26
1
Sweave'ing Danish characters
Hi, I am writing an Sweave document and am using 'xtable' to make frequency tables of diagnoses of people undergoing cholecystectomy. Some of these diagnoses contain Danish characters ("?", "?", and "?"), and these characters are all garbled in the Latex document after I run Sweave. The odd thing is, everything looks absolutely right in the R console, and if
2011 Sep 15
1
Can't get installing a package source (.tar.gz) from a web page to work...
I have created an R-package with datasets which I want my students to install (the package is not on CRAN). 1) I've put the package on the web in a directory called 'data' and I thought I could do: > install.packages("http://gbi.agrsci.dk/statistics/courses/2011-ISMLS-course/data/LiSciData_0.0-03.tar.gz",repos=NULL,type="source") Warning: invalid package
2017 Aug 16
5
strange behaviour read.table and clipboard
Hi Duncan The simples spreadsheet is: Put a name in the cell, let say "a1" Put number e.g. 1 below "a1" Copy the number to enough rows Select this column and press ctrl-c result is > temp<- read.delim("clipboard") > str(temp) 'data.frame': 1513 obs. of 1 variable: $ a1: Factor w/ 2 levels "1","a1": 1 1 1 1 1 1 1 1 1 1 ...
2017 Jul 10
4
fit lognorm to cdf data
Dear all I am struggling to fit data which form something like CDF by lognorm. Here are my data: proc <- c(0.9, 0.84, 0.5, 0.16, 0.1) size <- c(0.144, 0.172, 0.272, 0.481, 0.583) plot(size, proc, xlim=c(0,1), ylim=c(0,1)) fit<-nls(proc~SSfpl(size, 1, 0, xmid, scal), start=list(xmid=0.2, scal=.1)) lines(seq(0,1,.01), predict(fit, newdata=data.frame(sito=seq(0,1,.01))), col=2) I tried
2017 Jul 04
6
R and UBUNTU startup
Dear all I have 3 questions. Due to some reason I switched from Vista to Ubuntu on home PC. I was used to start with Rgui.exe. However I am not able to find it under Ubuntu and R starts as terminal (probably Rterm). Question 1. Is Rgui.exe available on linux? In Windows doc folder I can find manuals, however I did not find doc folder in Ubuntu. I found somewhere that manuals need to be
2018 Feb 08
2
plotting the regression coefficients
Hi Petr; Thanks for your reply. It is much appreciated. A small example is given below for 4 independent and 4 dependent variables only. The values given are regression coefficients.I have looked ggplot documents before writing to you. Unfortunately, I could not figure out as my experience in ggplot is ignorable Regards. Greg y1 y2 y3 y4 x1 -0.19 0.40 -0.06 0.13 x2 0.45 -0.75 -8.67 -0.46 x3
2018 Feb 08
2
plotting the regression coefficients
Hi Petr; Thanks so much. Exactly this is what I need. I will play to change color and so on but this backbound is perfect to me. I do appreciate your help and support. Regards, Greg On Thu, Feb 8, 2018 at 1:29 PM, PIKAL Petr <petr.pikal at precheza.cz> wrote: > Hi > > I copied your values to R, here it is > > > > > dput(temp) > > > > temp <-
2017 Aug 08
2
how to extract individual values from varcomp?
Hello, I am trying to use varcomp to decompose the variance across multiple nested levels on a lme object. I am able to successfully do this and when I view the varcomp object I can see the individual values / estimates for the variance at different levels. However, I want to be able to extract each of them separately, as I need to build a confidence interval using bootstrapping on the sample
2017 Aug 17
2
strange behaviour read.table and clipboard
Hi > -----Original Message----- > From: Robert Baer [mailto:rbaer at atsu.edu] > Sent: Wednesday, August 16, 2017 3:04 PM > To: PIKAL Petr <petr.pikal at precheza.cz>; Duncan Murdoch > <murdoch.duncan at gmail.com> > Cc: r-devel at r-project.org > Subject: Re: [Rd] strange behaviour read.table and clipboard > > You said, "put a name in the cell".
2018 Feb 16
2
Putting 733 discrete categories on Y-axis in qqplot2 as they are
Hi Petr; I would like to get a plot with names as they are in the original file. They are chemical names and I have 733 in the my file. For example, let me give to chemical names "*2-hydroxybutyrate/2-hydroxyisobutyrate*" and "*palmitoyl-arachidonoyl-glycerol (16:0/20:4) [1]**" .So, what should I put [c(2,3,1)] part in the command: iris$MySpecies<-factor(iris$Species,
2017 Aug 15
2
strange behaviour read.table and clipboard
Dear all I used to transfer data from excel to R by simple ctrl-c and read.delim("clipboard") construction. I know it is a bad practice but it is easy and for quick exploratory work it is OK. However after changing to new R devel few days ago I encountered weird behaviour. I tried one or two columns. In case of 2 columns, header is repeated after 526 items >
2018 Feb 15
2
Putting 733 discrete categories on Y-axis in qqplot2 as they are
Hi all; I have 733 discrete categories that will go on y-axis in ggplot2. I used the following command to put the name of x-axis. scale_x_discrete (limits = c("SI", "HOMAIR", "AIR","HOMAB","SG","DI","FI","FG")) Since there are only 8 categories on x it was easy to do. Is there any way to do the same for 733 discrete
2017 Jun 29
2
Changing ggplot2 legend key/title to custom text
Hi all, ok I have this issue: I want to change my graphs legends to custom text, often requiring the use of superscripts/subscripts I tried to use this instruction I found on stack overflow: labs(x = "R(Ohm)", y= "CDF", aesthetic= " Content (%)" ) but it wont' seem to work. Also tried bquote for super/ subscripts xlab(bquote(~x~/(~x~ + ~MO[2]~)*