我试图绘制一个U-Pb等时线,它基本上是一个xy图,在每个数据点周围有一个误差椭圆,表示该数据点的精度.这是我想要实现的一个例子,唯一的区别是我有更多的数据点:
我对x和y空间中的每个数据点都有对称的+和 - 错误,我想用它来指示错误椭圆的形状.
下面是我到目前为止编写的代码.这会绘制我的数据,但不是错误省略号,我目前有错误栏.
# Select data file.
fname<-file.choose()
# Rename imported data file.
upbiso <- read.table(file=fname, header= TRUE)
# Attaches data file as default data source.
attach(upbiso)
# Reads and display column headers in console.
names(upbiso)
# Sets margins around plot.
par(mar=c(5,5,4,2))
# Plots 238U/206Pb vs 207Pb/206Pb with superscript notation for isotopic masses, xlim and ylim sets min and max limit for axes, las rotates y axis labels, cex.lab increases the size of the axis labels.
plot(UPb, PbPb, …Run Code Online (Sandbox Code Playgroud) 假设我已经将我的应用程序(使用React Native构建)发布到Appstore/Playstore.我是否可以在不进行新版本的情况下将新的更改流式传输到应用程序(我的意思是新版本).
此外,如果你们遇到任何与React Native的应用程序发布过程相关的文章,请与我分享.
从昨天开始,我无法加载一些常用的包,例如reshape2,stringr通过库命令。
重现我的问题的步骤:
1) 在 Rstudio 服务器(版本 0.99.467)中启动一个新会话。我还杀死了 Rstudio 服务器中的活动会话。
2)运行这些代码
library(ggplot2)
library(stringr)
Run Code Online (Sandbox Code Playgroud)
3)获取错误信息:
unloadNamespace(package) 中的错误:命名空间“stringr”由“reshape2”导入,因此无法卸载 Show Traceback
用调试重新运行
库中的错误(stringr):无法卸载“stringr”版本 0.6.2。
但是如果stringr在之前加载,我不会出错ggplot2。我应该如何解决这个问题。感谢您的任何建议。
我可能需要将 R 更新到 3.2
我的 R 会话信息:
R version 3.1.3 (2015-03-09)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu precise (12.04.5 LTS)
locale:
[1] LC_CTYPE=en_AU.UTF-8 LC_NUMERIC=C LC_TIME=en_AU.UTF-8 LC_COLLATE=en_AU.UTF-8
[5] LC_MONETARY=en_AU.UTF-8 LC_MESSAGES=en_AU.UTF-8 LC_PAPER=en_AU.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_AU.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] …Run Code Online (Sandbox Code Playgroud) 我正在Spring Boot中开发一个多模块项目,其项目结构如下:
com.app.parent <- parent pom with version numbers and common dependencies (POM)
com.app.core <- repository and service layer, models, DTOs (JAR)
com.app.rest <- rest API (WAR)
com.app.soap <- soap API (WAR)
Run Code Online (Sandbox Code Playgroud)
父项目的pom.xml文件是:
<artifactId>app-parent</artifactId>
<packaging>pom</packaging>
<name>app-parent</name>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.3.RELEASE</version>
<relativePath/>
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
Run Code Online (Sandbox Code Playgroud)
核心项目的pom.xml文件是:
<artifactId>app-core</artifactId>
<packaging>jar</packaging>
<name>app-core</name>
<parent>
<groupId>com.app</groupId>
<artifactId>app-parent</artifactId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../app-parent/pom.xml</relativePath>
</parent>
<dependencies>
<dependency>
<groupId>mysql</groupId> …Run Code Online (Sandbox Code Playgroud) 考虑以下事项:
$ cd /home/mydir
$ jupyter notebook --port=8888
Run Code Online (Sandbox Code Playgroud)
用简单的英语,我从/home/mydir目录运行 jupyter 服务器。
有没有一种简单的方法可以从笔记本中获取此目录,无论它是 R 笔记本还是 Python 笔记本或其他什么?也许有一些神奇的命令或变量?
注意:getwd() 不是答案,因为它返回当前笔记本的目录,而不是 jupyter 服务器根目录。
有一些遗留代码,我应该转换iso-8859-2为UTF-8.其中一个问题是strlen功能的广泛使用.我首先想到的是我将替换所有的出现次数的strlen来mb_strlen.
但是,我的一位同事说这是一个错误.我知道这两个函数之间的区别 - 如果字符串中的重音字符,strlen将返回它真正需要的字节数,而mb_strlen将返回字符数.
而现在,一位同事说,或许,也许某个地方存在返回需要与字符串中的字节数有关的情况,但他不能给我任何这种情况的例子.
strlen整个代码中大约有900个出现,分析每一个出现都需要几天时间.
问题是 - 当有人需要字节数而不是字符串中的字符数时,有什么可能的情况?
我有这样的枚举
class testEnum(Enum):
Code_1 = "successful response"
Code_2 = "failure response"
Run Code Online (Sandbox Code Playgroud)
然后我有一个方法,它将枚举键名Code_1和枚举键值successful response作为输入.
如果我发送testEnum.Code_1然后解决,successful response而不是Code_1.
我检查了一些建议使用的在线文档,testEnum.Code_1.name但是这会引发一个错误,即enum项目不存在"name".
有谁知道如何获取枚举键的名称?
Clojure的逻辑and与正常的逻辑and(&&)有什么不同?为什么这会产生真实
((and odd? #(> 10 %)) 6)
Run Code Online (Sandbox Code Playgroud)
并不and需要真正的2个语句返回true?
我正在尝试使用以下命令从文本文件中删除所有非字母数字:
cat textfile.txt | tr -cd [:alnum:] > textfile_alnum.txt
Run Code Online (Sandbox Code Playgroud)
这是可行的,只不过现在其中的输出textfile_alnum.txt都在同一行上。如何将每个字符串保留在单独的行上?